From 049402e2fb6213e863dbc9c8f3814cf7ab66af49 Mon Sep 17 00:00:00 2001 From: tacklequestions Date: Mon, 6 Oct 2025 23:50:43 +0800 Subject: [PATCH 1/2] fix: fixed operator issue --- apollo-openapi.yaml | 134 +- generate.sh | 14 +- java-client/.github/workflows/maven.yml | 6 +- java-client/.openapi-generator/FILES | 84 +- java-client/.openapi-generator/VERSION | 2 +- java-client/README.md | 202 +- java-client/api/openapi.yaml | 2658 +++++----- java-client/build.gradle | 22 +- java-client/build.sbt | 19 +- java-client/docs/AppManagementApi.md | 450 +- java-client/docs/Change.md | 24 - java-client/docs/ClusterDTO.md | 23 - java-client/docs/ClusterManagementApi.md | 234 +- java-client/docs/EntityPairKVEntity.md | 14 - java-client/docs/EnvClusterInfo.md | 14 - java-client/docs/InstanceManagementApi.md | 81 +- java-client/docs/ItemChangeSets.md | 21 - java-client/docs/ItemDTO.md | 25 - java-client/docs/ItemManagementApi.md | 635 ++- java-client/docs/KVEntity.md | 7 +- java-client/docs/ListItemDiffs.md | 15 - java-client/docs/MapString.md | 14 - java-client/docs/MultiResponseEntity.md | 12 + .../docs/NamespaceBranchManagementApi.md | 503 +- .../docs/NamespaceGrayDelReleaseDTO.md | 3 - java-client/docs/NamespaceIdentifier.md | 16 - java-client/docs/NamespaceManagementApi.md | 569 ++- java-client/docs/NamespaceReleaseDTO.md | 3 - java-client/docs/NamespaceSyncModel.md | 14 - java-client/docs/NamespaceTextModel.md | 20 - java-client/docs/OpenAppDTO.md | 3 - java-client/docs/OpenAppNamespaceDTO.md | 3 - java-client/docs/OpenClusterDTO.md | 3 - java-client/docs/OpenCreateAppDTO.md | 3 - java-client/docs/OpenEnvClusterDTO.md | 7 +- java-client/docs/OpenEnvClusterInfo.md | 11 + java-client/docs/OpenGrayReleaseRuleDTO.md | 3 - .../docs/OpenGrayReleaseRuleItemDTO.md | 3 - java-client/docs/OpenInstanceConfigDTO.md | 7 +- java-client/docs/OpenInstanceDTO.md | 17 +- java-client/docs/OpenItemChangeSets.md | 18 + java-client/docs/OpenItemDTO.md | 3 - java-client/docs/OpenItemDiffs.md | 12 + java-client/docs/OpenNamespaceDTO.md | 3 - java-client/docs/OpenNamespaceIdentifier.md | 13 + java-client/docs/OpenNamespaceLockDTO.md | 3 - java-client/docs/OpenNamespaceSyncModel.md | 11 + java-client/docs/OpenNamespaceTextModel.md | 17 + java-client/docs/OpenOrganizationDto.md | 7 +- .../docs/OpenPageDTOOpenInstanceDTO.md | 3 - java-client/docs/OpenPageDTOOpenItemDTO.md | 3 - .../{ListReleaseBO.md => OpenReleaseBO.md} | 7 +- java-client/docs/OpenReleaseDTO.md | 5 +- .../docs/OpenapiV1AppsGet401Response.md | 13 - .../docs/OpenapiV1AppsPost400Response.md | 14 - java-client/docs/OpenapiV1AppsPostRequest.md | 16 - ...mespaceNameItemsValidatePost200Response.md | 14 - ...mespaceNameItemsValidatePost400Response.md | 15 - ...iV1EnvsEnvReleasesCompareGet200Response.md | 13 - java-client/docs/OrganizationManagementApi.md | 17 +- java-client/docs/ReleaseDTO.md | 27 - java-client/docs/ReleaseManagementApi.md | 433 +- java-client/docs/RichResponseEntity.md | 13 + java-client/gradle/wrapper/gradle-wrapper.jar | Bin 43453 -> 59536 bytes .../gradle/wrapper/gradle-wrapper.properties | 4 +- java-client/gradlew | 189 +- java-client/gradlew.bat | 37 +- java-client/pom.xml | 53 +- java-client/settings.gradle | 2 +- .../org/openapitools/client/ApiCallback.java | 4 +- .../org/openapitools/client/ApiClient.java | 157 +- .../org/openapitools/client/ApiException.java | 9 +- .../org/openapitools/client/ApiResponse.java | 6 +- .../openapitools/client/Configuration.java | 72 +- .../client/GzipRequestInterceptor.java | 4 +- .../java/org/openapitools/client/JSON.java | 59 +- .../java/org/openapitools/client/Pair.java | 56 +- .../client/ProgressRequestBody.java | 4 +- .../client/ProgressResponseBody.java | 4 +- .../client/ServerConfiguration.java | 14 - .../openapitools/client/ServerVariable.java | 14 - .../org/openapitools/client/StringUtil.java | 6 +- .../client/api/AppManagementApi.java | 1232 ++--- .../client/api/ClusterManagementApi.java | 549 +- .../client/api/InstanceManagementApi.java | 207 +- .../client/api/ItemManagementApi.java | 1727 ++++--- .../api/NamespaceBranchManagementApi.java | 1286 ++--- .../client/api/NamespaceManagementApi.java | 1405 ++++-- .../client/api/OrganizationManagementApi.java | 44 +- .../client/api/ReleaseManagementApi.java | 1159 +++-- .../openapitools/client/auth/ApiKeyAuth.java | 6 +- .../client/auth/Authentication.java | 5 +- .../client/auth/HttpBasicAuth.java | 6 +- .../client/auth/HttpBearerAuth.java | 26 +- .../client/model/AbstractOpenApiSchema.java | 11 +- .../org/openapitools/client/model/Change.java | 294 -- .../openapitools/client/model/ClusterDTO.java | 496 -- .../client/model/EntityPairKVEntity.java | 237 - .../openapitools/client/model/ItemDTO.java | 541 -- .../openapitools/client/model/KVEntity.java | 102 +- .../openapitools/client/model/MapString.java | 205 - .../client/model/MultiResponseEntity.java | 262 + .../model/NamespaceGrayDelReleaseDTO.java | 134 +- .../client/model/NamespaceReleaseDTO.java | 118 +- .../openapitools/client/model/OpenAppDTO.java | 194 +- .../client/model/OpenAppNamespaceDTO.java | 194 +- .../client/model/OpenClusterDTO.java | 142 +- .../client/model/OpenCreateAppDTO.java | 112 +- .../client/model/OpenEnvClusterDTO.java | 106 +- ...usterInfo.java => OpenEnvClusterInfo.java} | 144 +- .../client/model/OpenGrayReleaseRuleDTO.java | 186 +- .../model/OpenGrayReleaseRuleItemDTO.java | 114 +- .../client/model/OpenInstanceConfigDTO.java | 112 +- .../client/model/OpenInstanceDTO.java | 176 +- ...hangeSets.java => OpenItemChangeSets.java} | 282 +- .../client/model/OpenItemDTO.java | 170 +- ...{ListItemDiffs.java => OpenItemDiffs.java} | 162 +- .../client/model/OpenNamespaceDTO.java | 210 +- ...fier.java => OpenNamespaceIdentifier.java} | 166 +- .../client/model/OpenNamespaceLockDTO.java | 106 +- ...Model.java => OpenNamespaceSyncModel.java} | 154 +- ...Model.java => OpenNamespaceTextModel.java} | 234 +- .../client/model/OpenOrganizationDto.java | 102 +- .../model/OpenPageDTOOpenInstanceDTO.java | 122 +- .../client/model/OpenPageDTOOpenItemDTO.java | 122 +- ...{ListReleaseBO.java => OpenReleaseBO.java} | 146 +- .../client/model/OpenReleaseDTO.java | 225 +- .../model/OpenapiV1AppsGet401Response.java | 205 - .../model/OpenapiV1AppsPost400Response.java | 234 - .../model/OpenapiV1AppsPostRequest.java | 280 -- ...spaceNameItemsValidatePost200Response.java | 231 - ...spaceNameItemsValidatePost400Response.java | 271 - ...1EnvsEnvReleasesCompareGet200Response.java | 227 - .../openapitools/client/model/ReleaseDTO.java | 605 --- .../client/model/RichResponseEntity.java | 269 + .../client/api/AppManagementApiTest.java | 144 +- .../client/api/ClusterManagementApiTest.java | 64 +- .../client/api/InstanceManagementApiTest.java | 21 +- .../client/api/ItemManagementApiTest.java | 165 +- .../api/NamespaceBranchManagementApiTest.java | 116 +- .../api/NamespaceManagementApiTest.java | 147 +- .../api/OrganizationManagementApiTest.java | 11 +- .../client/api/ReleaseManagementApiTest.java | 121 +- .../openapitools/client/model/ChangeTest.java | 57 - .../client/model/ClusterDTOTest.java | 128 - .../client/model/EntityPairKVEntityTest.java | 57 - .../client/model/EnvClusterInfoTest.java | 59 - .../client/model/ItemDTOTest.java | 144 - .../client/model/KVEntityTest.java | 6 +- .../client/model/ListItemDiffsTest.java | 66 - .../client/model/ListReleaseBOTest.java | 60 - .../client/model/MapStringTest.java | 48 - .../client/model/MultiResponseEntityTest.java | 59 + .../model/NamespaceGrayDelReleaseDTOTest.java | 6 +- .../client/model/NamespaceReleaseDTOTest.java | 6 +- .../client/model/NamespaceSyncModelTest.java | 60 - .../client/model/OpenAppDTOTest.java | 6 +- .../client/model/OpenAppNamespaceDTOTest.java | 6 +- .../client/model/OpenClusterDTOTest.java | 6 +- .../client/model/OpenCreateAppDTOTest.java | 6 +- .../client/model/OpenEnvClusterDTOTest.java | 6 +- .../client/model/OpenEnvClusterInfoTest.java | 59 + .../model/OpenGrayReleaseRuleDTOTest.java | 6 +- .../model/OpenGrayReleaseRuleItemDTOTest.java | 6 +- .../model/OpenInstanceConfigDTOTest.java | 6 +- .../client/model/OpenInstanceDTOTest.java | 6 +- ...sTest.java => OpenItemChangeSetsTest.java} | 20 +- .../client/model/OpenItemDTOTest.java | 6 +- .../client/model/OpenItemDiffsTest.java | 66 + .../client/model/OpenNamespaceDTOTest.java | 6 +- ....java => OpenNamespaceIdentifierTest.java} | 18 +- .../model/OpenNamespaceLockDTOTest.java | 6 +- .../model/OpenNamespaceSyncModelTest.java | 60 + ...t.java => OpenNamespaceTextModelTest.java} | 18 +- .../client/model/OpenOrganizationDtoTest.java | 6 +- .../model/OpenPageDTOOpenInstanceDTOTest.java | 6 +- .../model/OpenPageDTOOpenItemDTOTest.java | 6 +- .../client/model/OpenReleaseBOTest.java | 60 + .../client/model/OpenReleaseDTOTest.java | 9 +- .../OpenapiV1AppsGet401ResponseTest.java | 48 - .../OpenapiV1AppsPost400ResponseTest.java | 56 - .../model/OpenapiV1AppsPostRequestTest.java | 67 - ...eNameItemsValidatePost200ResponseTest.java | 56 - ...eNameItemsValidatePost400ResponseTest.java | 66 - ...sEnvReleasesCompareGet200ResponseTest.java | 51 - .../client/model/ReleaseDTOTest.java | 160 - .../client/model/RichResponseEntityTest.java | 64 + python/.github/workflows/python.yml | 34 - python/.gitignore | 1 + python/.gitlab-ci.yml | 33 +- python/.openapi-generator/FILES | 287 +- python/.openapi-generator/VERSION | 2 +- python/.travis.yml | 12 +- python/README.md | 398 +- python/apollo_openapi/__init__.py | 215 +- python/apollo_openapi/api/__init__.py | 34 - .../apollo_openapi/api/app_management_api.py | 3591 ------------- .../api/cluster_management_api.py | 1545 ------ .../api/instance_management_api.py | 964 ---- .../apollo_openapi/api/item_management_api.py | 4464 ----------------- .../api/namespace_branch_management_api.py | 3164 ------------ .../api/namespace_management_api.py | 2656 ---------- .../api/organization_management_api.py | 286 -- .../api/release_management_api.py | 2234 --------- python/apollo_openapi/api_client.py | 2031 +++++--- python/apollo_openapi/api_response.py | 21 - python/apollo_openapi/apis/__init__.py | 3 + python/apollo_openapi/apis/path_to_api.py | 152 + python/apollo_openapi/apis/paths/__init__.py | 3 + .../apis/paths/openapi_v1_appnamespaces.py | 7 + .../apis/paths/openapi_v1_apps.py | 9 + .../apis/paths/openapi_v1_apps_app_id.py | 11 + .../openapi_v1_apps_app_id_appnamespaces.py | 9 + ...pps_app_id_appnamespaces_namespace_name.py | 9 + .../openapi_v1_apps_app_id_envclusters.py | 7 + ...cluster_name_namespaces_integrity_check.py | 7 + ...er_name_namespaces_namespace_name_links.py | 7 + ...paces_namespace_name_public_association.py | 7 + .../paths/openapi_v1_apps_app_id_miss_envs.py | 7 + ..._apps_app_id_namespaces_releases_status.py | 7 + .../paths/openapi_v1_apps_app_id_navtree.py | 7 + .../apis/paths/openapi_v1_apps_authorized.py | 7 + .../apis/paths/openapi_v1_apps_by_self.py | 7 + .../apis/paths/openapi_v1_apps_envs_env.py | 7 + ...espaces_public_namespace_name_instances.py | 7 + ...penapi_v1_envs_env_apps_app_id_clusters.py | 7 + ...s_env_apps_app_id_clusters_cluster_name.py | 9 + ...app_id_clusters_cluster_name_namespaces.py | 7 + ..._cluster_name_namespaces_namespace_name.py | 7 + ...name_namespaces_namespace_name_branches.py | 9 + ...ces_namespace_name_branches_branch_name.py | 9 + ..._branches_branch_name_gray_del_releases.py | 7 + ...mespace_name_branches_branch_name_items.py | 7 + ...mespace_name_branches_branch_name_merge.py | 7 + ...pace_name_branches_branch_name_releases.py | 7 + ...mespace_name_branches_branch_name_rules.py | 9 + ...spaces_namespace_name_encoded_items_key.py | 11 + ...ame_namespaces_namespace_name_instances.py | 7 + ...spaces_namespace_name_instances_not_int.py | 7 + ...er_name_namespaces_namespace_name_items.py | 9 + ...paces_namespace_name_items_batch_update.py | 7 + ...namespaces_namespace_name_items_compare.py | 7 + ...ame_namespaces_namespace_name_items_key.py | 11 + ..._namespaces_namespace_name_items_revert.py | 7 + ...me_namespaces_namespace_name_items_sync.py | 7 + ...amespaces_namespace_name_items_validate.py | 7 + ...ter_name_namespaces_namespace_name_lock.py | 7 + ...name_namespaces_namespace_name_releases.py | 7 + ...mespaces_namespace_name_releases_active.py | 7 + ..._namespaces_namespace_name_releases_all.py | 7 + ...mespaces_namespace_name_releases_latest.py | 7 + ...openapi_v1_envs_env_releases_release_id.py | 7 + ..._envs_env_releases_release_id_instances.py | 7 + ...1_envs_env_releases_release_id_rollback.py | 7 + .../apis/paths/openapi_v1_organizations.py | 7 + python/apollo_openapi/apis/tag_to_api.py | 41 + python/apollo_openapi/apis/tags/__init__.py | 17 + .../apis/tags/app_management_api.py | 43 + .../apis/tags/cluster_management_api.py | 27 + .../apis/tags/instance_management_api.py | 27 + .../apis/tags/item_management_api.py | 49 + .../tags/namespace_branch_management_api.py | 33 + .../apis/tags/namespace_management_api.py | 47 + .../apis/tags/organization_management_api.py | 23 + .../apis/tags/release_management_api.py | 39 + python/apollo_openapi/configuration.py | 322 +- python/apollo_openapi/exceptions.py | 133 +- python/apollo_openapi/model/__init__.py | 5 + .../model/exception_response.py | 60 + .../model/exception_response.pyi | 60 + python/apollo_openapi/model/kv_entity.py | 88 + python/apollo_openapi/model/kv_entity.pyi | 88 + python/apollo_openapi/model/map_string.py | 57 + python/apollo_openapi/model/map_string.pyi | 57 + .../model/multi_response_entity.py | 124 + .../model/multi_response_entity.pyi | 124 + .../model/namespace_gray_del_release_dto.py | 142 + .../model/namespace_gray_del_release_dto.pyi | 142 + .../model/namespace_release_dto.py | 110 + .../model/namespace_release_dto.pyi | 110 + python/apollo_openapi/model/open_app_dto.py | 170 + python/apollo_openapi/model/open_app_dto.pyi | 170 + .../model/open_app_namespace_dto.py | 170 + .../model/open_app_namespace_dto.pyi | 170 + .../apollo_openapi/model/open_cluster_dto.py | 130 + .../apollo_openapi/model/open_cluster_dto.pyi | 130 + .../model/open_create_app_dto.py | 127 + .../model/open_create_app_dto.pyi | 127 + .../model/open_env_cluster_dto.py | 110 + .../model/open_env_cluster_dto.pyi | 110 + .../model/open_env_cluster_info.py | 115 + .../model/open_env_cluster_info.pyi | 115 + .../model/open_gray_release_rule_dto.py | 187 + .../model/open_gray_release_rule_dto.pyi | 187 + .../model/open_gray_release_rule_item_dto.py | 144 + .../model/open_gray_release_rule_item_dto.pyi | 144 + .../model/open_instance_config_dto.py | 103 + .../model/open_instance_config_dto.pyi | 103 + .../apollo_openapi/model/open_instance_dto.py | 165 + .../model/open_instance_dto.pyi | 165 + .../model/open_item_change_sets.py | 235 + .../model/open_item_change_sets.pyi | 235 + .../apollo_openapi/model/open_item_diffs.py | 107 + .../apollo_openapi/model/open_item_diffs.pyi | 107 + python/apollo_openapi/model/open_item_dto.py | 150 + python/apollo_openapi/model/open_item_dto.pyi | 150 + .../model/open_namespace_dto.py | 207 + .../model/open_namespace_dto.pyi | 207 + .../model/open_namespace_identifier.py | 108 + .../model/open_namespace_identifier.pyi | 108 + .../model/open_namespace_lock_dto.py | 100 + .../model/open_namespace_lock_dto.pyi | 100 + .../model/open_namespace_sync_model.py | 141 + .../model/open_namespace_sync_model.pyi | 141 + .../model/open_namespace_text_model.py | 148 + .../model/open_namespace_text_model.pyi | 148 + .../model/open_organization_dto.py | 88 + .../model/open_organization_dto.pyi | 88 + .../model/open_page_dto_open_instance_dto.py | 137 + .../model/open_page_dto_open_instance_dto.pyi | 137 + .../model/open_page_dto_open_item_dto.py | 137 + .../model/open_page_dto_open_item_dto.pyi | 137 + .../apollo_openapi/model/open_release_bo.py | 119 + .../apollo_openapi/model/open_release_bo.pyi | 119 + .../apollo_openapi/model/open_release_dto.py | 185 + .../apollo_openapi/model/open_release_dto.pyi | 185 + .../model/rich_response_entity.py | 107 + .../model/rich_response_entity.pyi | 107 + .../model/string_to_string_bool_map.py | 85 + .../model/string_to_string_bool_map.pyi | 85 + python/apollo_openapi/models/__init__.py | 143 +- python/apollo_openapi/models/change.py | 103 - python/apollo_openapi/models/cluster_dto.py | 115 - .../models/entity_pair_kv_entity.py | 96 - .../apollo_openapi/models/env_cluster_info.py | 97 - .../apollo_openapi/models/item_change_sets.py | 125 - python/apollo_openapi/models/item_dto.py | 111 - python/apollo_openapi/models/kv_entity.py | 89 - .../apollo_openapi/models/list_item_diffs.py | 99 - .../apollo_openapi/models/list_release_bo.py | 101 - python/apollo_openapi/models/map_string.py | 87 - .../models/namespace_gray_del_release_dto.py | 95 - .../models/namespace_identifier.py | 93 - .../models/namespace_release_dto.py | 93 - .../models/namespace_sync_model.py | 105 - .../models/namespace_text_model.py | 101 - python/apollo_openapi/models/open_app_dto.py | 105 - .../models/open_app_namespace_dto.py | 105 - .../apollo_openapi/models/open_cluster_dto.py | 97 - .../models/open_create_app_dto.py | 95 - .../models/open_env_cluster_dto.py | 89 - .../models/open_gray_release_rule_dto.py | 111 - .../models/open_gray_release_rule_item_dto.py | 91 - .../models/open_instance_config_dto.py | 95 - .../models/open_instance_dto.py | 107 - python/apollo_openapi/models/open_item_dto.py | 101 - .../models/open_namespace_dto.py | 115 - .../models/open_namespace_lock_dto.py | 91 - .../models/open_organization_dto.py | 89 - .../models/open_page_dto_open_instance_dto.py | 101 - .../models/open_page_dto_open_item_dto.py | 101 - .../apollo_openapi/models/open_release_dto.py | 111 - .../models/openapi_v1_apps_get401_response.py | 87 - .../openapi_v1_apps_post400_response.py | 89 - .../models/openapi_v1_apps_post_request.py | 95 - ...ce_name_items_validate_post200_response.py | 89 - ...ce_name_items_validate_post400_response.py | 91 - ...vs_env_releases_compare_get200_response.py | 95 - python/apollo_openapi/models/release_dto.py | 115 - python/apollo_openapi/paths/__init__.py | 54 + .../openapi_v1_appnamespaces/__init__.py | 7 + .../paths/openapi_v1_appnamespaces/get.py | 321 ++ .../paths/openapi_v1_appnamespaces/get.pyi | 313 ++ .../paths/openapi_v1_apps/__init__.py | 7 + .../paths/openapi_v1_apps/get.py | 377 ++ .../paths/openapi_v1_apps/get.pyi | 368 ++ .../paths/openapi_v1_apps/post.py | 448 ++ .../paths/openapi_v1_apps/post.pyi | 438 ++ .../paths/openapi_v1_apps_app_id/__init__.py | 7 + .../paths/openapi_v1_apps_app_id/delete.py | 499 ++ .../paths/openapi_v1_apps_app_id/delete.pyi | 489 ++ .../paths/openapi_v1_apps_app_id/get.py | 352 ++ .../paths/openapi_v1_apps_app_id/get.pyi | 343 ++ .../paths/openapi_v1_apps_app_id/put.py | 563 +++ .../paths/openapi_v1_apps_app_id/put.pyi | 553 ++ .../__init__.py | 7 + .../get.py | 320 ++ .../get.pyi | 312 ++ .../post.py | 505 ++ .../post.pyi | 495 ++ .../__init__.py | 7 + .../delete.py | 394 ++ .../delete.pyi | 386 ++ .../get.py | 304 ++ .../get.pyi | 296 ++ .../__init__.py | 7 + .../openapi_v1_apps_app_id_envclusters/get.py | 377 ++ .../get.pyi | 368 ++ .../__init__.py | 7 + .../get.py | 333 ++ .../get.pyi | 325 ++ .../__init__.py | 7 + .../delete.py | 412 ++ .../delete.pyi | 404 ++ .../__init__.py | 7 + .../get.py | 322 ++ .../get.pyi | 314 ++ .../__init__.py | 7 + .../openapi_v1_apps_app_id_miss_envs/get.py | 352 ++ .../openapi_v1_apps_app_id_miss_envs/get.pyi | 343 ++ .../__init__.py | 7 + .../get.py | 295 ++ .../get.pyi | 287 ++ .../__init__.py | 7 + .../openapi_v1_apps_app_id_navtree/get.py | 295 ++ .../openapi_v1_apps_app_id_navtree/get.pyi | 287 ++ .../openapi_v1_apps_authorized/__init__.py | 7 + .../paths/openapi_v1_apps_authorized/get.py | 323 ++ .../paths/openapi_v1_apps_authorized/get.pyi | 314 ++ .../paths/openapi_v1_apps_by_self/__init__.py | 7 + .../paths/openapi_v1_apps_by_self/get.py | 404 ++ .../paths/openapi_v1_apps_by_self/get.pyi | 389 ++ .../openapi_v1_apps_envs_env/__init__.py | 7 + .../paths/openapi_v1_apps_envs_env/post.py | 600 +++ .../paths/openapi_v1_apps_envs_env/post.pyi | 590 +++ .../__init__.py | 7 + .../get.py | 394 ++ .../get.pyi | 386 ++ .../__init__.py | 7 + .../post.py | 514 ++ .../post.pyi | 504 ++ .../__init__.py | 7 + .../delete.py | 573 +++ .../delete.pyi | 562 +++ .../get.py | 370 ++ .../get.pyi | 361 ++ .../__init__.py | 7 + .../get.py | 393 ++ .../get.pyi | 385 ++ .../__init__.py | 7 + .../get.py | 377 ++ .../get.pyi | 369 ++ .../__init__.py | 7 + .../get.py | 379 ++ .../get.pyi | 370 ++ .../post.py | 377 ++ .../post.pyi | 369 ++ .../__init__.py | 7 + .../delete.py | 421 ++ .../delete.pyi | 413 ++ .../patch.py | 497 ++ .../patch.pyi | 489 ++ .../__init__.py | 7 + .../post.py | 429 ++ .../post.pyi | 421 ++ .../__init__.py | 7 + .../get.py | 413 ++ .../get.pyi | 404 ++ .../__init__.py | 7 + .../post.py | 600 +++ .../post.pyi | 590 +++ .../__init__.py | 7 + .../post.py | 429 ++ .../post.pyi | 421 ++ .../__init__.py | 7 + .../get.py | 331 ++ .../get.pyi | 323 ++ .../put.py | 523 ++ .../put.pyi | 515 ++ .../__init__.py | 7 + .../delete.py | 421 ++ .../delete.pyi | 413 ++ .../get.py | 388 ++ .../get.pyi | 379 ++ .../put.py | 692 +++ .../put.pyi | 681 +++ .../__init__.py | 7 + .../get.py | 320 ++ .../get.pyi | 312 ++ .../__init__.py | 7 + .../get.py | 401 ++ .../get.pyi | 393 ++ .../__init__.py | 7 + .../get.py | 460 ++ .../get.pyi | 445 ++ .../post.py | 590 +++ .../post.pyi | 580 +++ .../__init__.py | 7 + .../put.py | 571 +++ .../put.pyi | 562 +++ .../__init__.py | 7 + .../post.py | 445 ++ .../post.pyi | 437 ++ .../__init__.py | 7 + .../delete.py | 421 ++ .../delete.pyi | 413 ++ .../get.py | 388 ++ .../get.pyi | 379 ++ .../put.py | 692 +++ .../put.pyi | 681 +++ .../__init__.py | 7 + .../post.py | 526 ++ .../post.pyi | 516 ++ .../__init__.py | 7 + .../post.py | 627 +++ .../post.pyi | 617 +++ .../__init__.py | 7 + .../post.py | 513 ++ .../post.pyi | 504 ++ .../__init__.py | 7 + .../get.py | 322 ++ .../get.pyi | 314 ++ .../__init__.py | 7 + .../post.py | 533 ++ .../post.pyi | 523 ++ .../__init__.py | 7 + .../get.py | 412 ++ .../get.pyi | 404 ++ .../__init__.py | 7 + .../get.py | 412 ++ .../get.pyi | 404 ++ .../__init__.py | 7 + .../get.py | 379 ++ .../get.pyi | 370 ++ .../__init__.py | 7 + .../get.py | 304 ++ .../get.pyi | 296 ++ .../__init__.py | 7 + .../get.py | 369 ++ .../get.pyi | 361 ++ .../__init__.py | 7 + .../put.py | 394 ++ .../put.pyi | 386 ++ .../openapi_v1_organizations/__init__.py | 7 + .../paths/openapi_v1_organizations/get.py | 323 ++ .../paths/openapi_v1_organizations/get.pyi | 314 ++ python/apollo_openapi/py.typed | 0 python/apollo_openapi/rest.py | 331 +- python/apollo_openapi/schemas.py | 2475 +++++++++ python/docs/AppManagementApi.md | 1067 ---- python/docs/Change.md | 30 - python/docs/ClusterDTO.md | 39 - python/docs/ClusterManagementApi.md | 437 -- python/docs/EntityPairKVEntity.md | 30 - python/docs/EnvClusterInfo.md | 30 - python/docs/InstanceManagementApi.md | 265 - python/docs/ItemChangeSets.md | 37 - python/docs/ItemDTO.md | 41 - python/docs/ItemManagementApi.md | 1186 ----- python/docs/KVEntity.md | 30 - python/docs/ListItemDiffs.md | 31 - python/docs/ListReleaseBO.md | 30 - python/docs/MapString.md | 30 - python/docs/NamespaceBranchManagementApi.md | 828 --- python/docs/NamespaceGrayDelReleaseDTO.md | 34 - python/docs/NamespaceIdentifier.md | 32 - python/docs/NamespaceManagementApi.md | 761 --- python/docs/NamespaceReleaseDTO.md | 33 - python/docs/NamespaceSyncModel.md | 30 - python/docs/NamespaceTextModel.md | 36 - python/docs/OpenAppDTO.md | 39 - python/docs/OpenAppNamespaceDTO.md | 39 - python/docs/OpenClusterDTO.md | 35 - python/docs/OpenCreateAppDTO.md | 32 - python/docs/OpenEnvClusterDTO.md | 30 - python/docs/OpenGrayReleaseRuleDTO.md | 38 - python/docs/OpenGrayReleaseRuleItemDTO.md | 32 - python/docs/OpenInstanceConfigDTO.md | 31 - python/docs/OpenInstanceDTO.md | 35 - python/docs/OpenItemDTO.md | 37 - python/docs/OpenNamespaceDTO.md | 40 - python/docs/OpenNamespaceLockDTO.md | 32 - python/docs/OpenOrganizationDto.md | 30 - python/docs/OpenPageDTOOpenInstanceDTO.md | 33 - python/docs/OpenPageDTOOpenItemDTO.md | 33 - python/docs/OpenReleaseDTO.md | 40 - python/docs/OpenapiV1AppsGet401Response.md | 29 - python/docs/OpenapiV1AppsPost400Response.md | 30 - python/docs/OpenapiV1AppsPostRequest.md | 32 - ...mespaceNameItemsValidatePost200Response.md | 30 - ...mespaceNameItemsValidatePost400Response.md | 31 - ...iV1EnvsEnvReleasesCompareGet200Response.md | 29 - python/docs/OrganizationManagementApi.md | 85 - python/docs/ReleaseDTO.md | 43 - python/docs/ReleaseManagementApi.md | 615 --- python/docs/apis/tags/AppManagementApi.md | 1575 ++++++ python/docs/apis/tags/ClusterManagementApi.md | 536 ++ .../docs/apis/tags/InstanceManagementApi.md | 447 ++ python/docs/apis/tags/ItemManagementApi.md | 2733 ++++++++++ .../apis/tags/NamespaceBranchManagementApi.md | 999 ++++ .../docs/apis/tags/NamespaceManagementApi.md | 1722 +++++++ .../apis/tags/OrganizationManagementApi.md | 112 + python/docs/apis/tags/ReleaseManagementApi.md | 1454 ++++++ python/docs/models/ExceptionResponse.md | 15 + python/docs/models/KVEntity.md | 15 + python/docs/models/MapString.md | 13 + python/docs/models/MultiResponseEntity.md | 31 + .../docs/models/NamespaceGrayDelReleaseDTO.md | 34 + python/docs/models/NamespaceReleaseDTO.md | 19 + python/docs/models/OpenAppDTO.md | 25 + python/docs/models/OpenAppNamespaceDTO.md | 25 + python/docs/models/OpenClusterDTO.md | 21 + python/docs/models/OpenCreateAppDTO.md | 32 + python/docs/models/OpenEnvClusterDTO.md | 29 + python/docs/models/OpenEnvClusterInfo.md | 29 + python/docs/models/OpenGrayReleaseRuleDTO.md | 38 + .../docs/models/OpenGrayReleaseRuleItemDTO.md | 46 + python/docs/models/OpenInstanceConfigDTO.md | 16 + python/docs/models/OpenInstanceDTO.md | 34 + python/docs/models/OpenItemChangeSets.md | 64 + python/docs/models/OpenItemDTO.md | 23 + python/docs/models/OpenItemDiffs.md | 16 + python/docs/models/OpenNamespaceDTO.md | 40 + python/docs/models/OpenNamespaceIdentifier.md | 17 + python/docs/models/OpenNamespaceLockDTO.md | 18 + python/docs/models/OpenNamespaceSyncModel.md | 43 + python/docs/models/OpenNamespaceTextModel.md | 21 + python/docs/models/OpenOrganizationDto.md | 15 + .../docs/models/OpenPageDTOOpenInstanceDTO.md | 33 + python/docs/models/OpenPageDTOOpenItemDTO.md | 33 + python/docs/models/OpenReleaseBO.md | 27 + python/docs/models/OpenReleaseDTO.md | 26 + python/docs/models/RichResponseEntity.md | 36 + python/docs/models/StringToStringBoolMap.md | 25 + python/git_push.sh | 4 +- python/pyproject.toml | 95 - python/requirements.txt | 11 +- python/setup.py | 35 +- python/test-requirements.txt | 9 +- python/test/__init__.py | 1 + python/test/test_app_management_api.py | 122 - python/test/test_change.py | 58 - python/test/test_cluster_dto.py | 63 - python/test/test_cluster_management_api.py | 66 - python/test/test_entity_pair_kv_entity.py | 56 - python/test/test_env_cluster_info.py | 65 - python/test/test_instance_management_api.py | 52 - python/test/test_item_change_sets.py | 104 - python/test/test_item_dto.py | 63 - python/test/test_item_management_api.py | 122 - python/test/test_kv_entity.py | 52 - python/test/test_list_item_diffs.py | 98 - python/test/test_list_release_bo.py | 71 - python/test/test_map_string.py | 51 - python/test/test_models/__init__.py | 1 + .../test_models/test_exception_response.py | 25 + python/test/test_models/test_kv_entity.py | 25 + python/test/test_models/test_map_string.py | 25 + .../test_models/test_multi_response_entity.py | 25 + .../test_namespace_gray_del_release_dto.py | 25 + .../test_models/test_namespace_release_dto.py | 25 + python/test/test_models/test_open_app_dto.py | 25 + .../test_open_app_namespace_dto.py | 25 + .../test/test_models/test_open_cluster_dto.py | 25 + .../test_models/test_open_create_app_dto.py | 25 + .../test_models/test_open_env_cluster_dto.py | 25 + .../test_models/test_open_env_cluster_info.py | 25 + .../test_open_gray_release_rule_dto.py | 25 + .../test_open_gray_release_rule_item_dto.py | 25 + .../test_open_instance_config_dto.py | 25 + .../test_models/test_open_instance_dto.py | 25 + .../test_models/test_open_item_change_sets.py | 25 + .../test/test_models/test_open_item_diffs.py | 25 + python/test/test_models/test_open_item_dto.py | 25 + .../test_models/test_open_namespace_dto.py | 25 + .../test_open_namespace_identifier.py | 25 + .../test_open_namespace_lock_dto.py | 25 + .../test_open_namespace_sync_model.py | 25 + .../test_open_namespace_text_model.py | 25 + .../test_models/test_open_organization_dto.py | 25 + .../test_open_page_dto_open_instance_dto.py | 25 + .../test_open_page_dto_open_item_dto.py | 25 + .../test/test_models/test_open_release_bo.py | 25 + .../test/test_models/test_open_release_dto.py | 25 + .../test_models/test_rich_response_entity.py | 25 + .../test_string_to_string_bool_map.py | 25 + .../test_namespace_branch_management_api.py | 94 - .../test_namespace_gray_del_release_dto.py | 57 - python/test/test_namespace_identifier.py | 54 - python/test/test_namespace_management_api.py | 94 - python/test/test_namespace_release_dto.py | 54 - python/test/test_namespace_sync_model.py | 73 - python/test/test_namespace_text_model.py | 58 - python/test/test_open_app_dto.py | 60 - python/test/test_open_app_namespace_dto.py | 60 - python/test/test_open_cluster_dto.py | 56 - python/test/test_open_create_app_dto.py | 65 - python/test/test_open_env_cluster_dto.py | 54 - .../test/test_open_gray_release_rule_dto.py | 68 - .../test_open_gray_release_rule_item_dto.py | 57 - python/test/test_open_instance_config_dto.py | 65 - python/test/test_open_instance_dto.py | 74 - python/test/test_open_item_dto.py | 58 - python/test/test_open_namespace_dto.py | 71 - python/test/test_open_namespace_lock_dto.py | 53 - python/test/test_open_organization_dto.py | 52 - .../test_open_page_dto_open_instance_dto.py | 80 - .../test/test_open_page_dto_open_item_dto.py | 64 - python/test/test_open_release_dto.py | 62 - .../test_openapi_v1_apps_get401_response.py | 51 - .../test_openapi_v1_apps_post400_response.py | 52 - .../test/test_openapi_v1_apps_post_request.py | 80 - ...ce_name_items_validate_post200_response.py | 52 - ...ce_name_items_validate_post400_response.py | 55 - ...vs_env_releases_compare_get200_response.py | 61 - .../test/test_organization_management_api.py | 38 - python/test/test_paths/__init__.py | 68 + .../test_openapi_v1_appnamespaces/__init__.py | 1 + .../test_openapi_v1_appnamespaces/test_get.py | 41 + .../test_openapi_v1_apps/__init__.py | 1 + .../test_openapi_v1_apps/test_get.py | 41 + .../test_openapi_v1_apps/test_post.py | 43 + .../test_openapi_v1_apps_app_id/__init__.py | 1 + .../test_delete.py | 41 + .../test_openapi_v1_apps_app_id/test_get.py | 41 + .../test_openapi_v1_apps_app_id/test_put.py | 43 + .../__init__.py | 1 + .../test_get.py | 41 + .../test_post.py | 43 + .../__init__.py | 1 + .../test_delete.py | 41 + .../test_get.py | 41 + .../__init__.py | 1 + .../test_get.py | 41 + .../__init__.py | 1 + .../test_get.py | 41 + .../__init__.py | 1 + .../test_delete.py | 41 + .../__init__.py | 1 + .../test_get.py | 41 + .../__init__.py | 1 + .../test_get.py | 41 + .../__init__.py | 1 + .../test_get.py | 41 + .../__init__.py | 1 + .../test_get.py | 41 + .../__init__.py | 1 + .../test_get.py | 41 + .../test_openapi_v1_apps_by_self/__init__.py | 1 + .../test_openapi_v1_apps_by_self/test_get.py | 41 + .../test_openapi_v1_apps_envs_env/__init__.py | 1 + .../test_post.py | 43 + .../__init__.py | 1 + .../test_get.py | 41 + .../__init__.py | 1 + .../test_post.py | 43 + .../__init__.py | 1 + .../test_delete.py | 41 + .../test_get.py | 41 + .../__init__.py | 1 + .../test_get.py | 41 + .../__init__.py | 1 + .../test_get.py | 41 + .../__init__.py | 1 + .../test_get.py | 41 + .../test_post.py | 41 + .../__init__.py | 1 + .../test_delete.py | 41 + .../test_patch.py | 43 + .../__init__.py | 1 + .../test_post.py | 43 + .../__init__.py | 1 + .../test_get.py | 41 + .../__init__.py | 1 + .../test_post.py | 43 + .../__init__.py | 1 + .../test_post.py | 43 + .../__init__.py | 1 + .../test_get.py | 41 + .../test_put.py | 43 + .../__init__.py | 1 + .../test_delete.py | 41 + .../test_get.py | 41 + .../test_put.py | 43 + .../__init__.py | 1 + .../test_get.py | 41 + .../__init__.py | 1 + .../test_get.py | 41 + .../__init__.py | 1 + .../test_get.py | 41 + .../test_post.py | 43 + .../__init__.py | 1 + .../test_put.py | 43 + .../__init__.py | 1 + .../test_post.py | 43 + .../__init__.py | 1 + .../test_delete.py | 41 + .../test_get.py | 41 + .../test_put.py | 43 + .../__init__.py | 1 + .../test_post.py | 41 + .../__init__.py | 1 + .../test_post.py | 43 + .../__init__.py | 1 + .../test_post.py | 43 + .../__init__.py | 1 + .../test_get.py | 41 + .../__init__.py | 1 + .../test_post.py | 43 + .../__init__.py | 1 + .../test_get.py | 41 + .../__init__.py | 1 + .../test_get.py | 41 + .../__init__.py | 1 + .../test_get.py | 41 + .../__init__.py | 1 + .../test_get.py | 41 + .../__init__.py | 1 + .../test_get.py | 41 + .../__init__.py | 1 + .../test_put.py | 41 + .../test_openapi_v1_organizations/__init__.py | 1 + .../test_openapi_v1_organizations/test_get.py | 41 + python/test/test_release_dto.py | 65 - python/test/test_release_management_api.py | 80 - python/tox.ini | 3 +- rust/.openapi-generator/FILES | 56 +- rust/.openapi-generator/VERSION | 2 +- rust/Cargo.toml | 15 +- rust/README.md | 68 +- rust/docs/ClusterDto.md | 21 - rust/docs/ItemChangeSets.md | 19 - rust/docs/ItemDto.md | 23 - rust/docs/KvEntity.md | 6 +- rust/docs/ListItemDiffs.md | 13 - rust/docs/MapString.md | 11 - ...istReleaseBo.md => MultiResponseEntity.md} | 8 +- rust/docs/NamespaceGrayDelReleaseDto.md | 2 - rust/docs/NamespaceIdentifier.md | 14 - rust/docs/NamespaceReleaseDto.md | 2 - rust/docs/NamespaceSyncModel.md | 12 - rust/docs/NamespaceTextModel.md | 18 - rust/docs/OpenAppDto.md | 2 - rust/docs/OpenAppNamespaceDto.md | 2 - rust/docs/OpenClusterDto.md | 2 - rust/docs/OpenCreateAppDto.md | 4 +- rust/docs/OpenEnvClusterDto.md | 6 +- ...yPairKvEntity.md => OpenEnvClusterInfo.md} | 8 +- rust/docs/OpenGrayReleaseRuleDto.md | 4 +- rust/docs/OpenGrayReleaseRuleItemDto.md | 2 - rust/docs/OpenInstanceConfigDto.md | 8 +- rust/docs/OpenInstanceDto.md | 16 +- rust/docs/OpenItemChangeSets.md | 17 + rust/docs/OpenItemDiffs.md | 11 + rust/docs/OpenItemDto.md | 2 - rust/docs/OpenNamespaceDto.md | 4 +- rust/docs/OpenNamespaceIdentifier.md | 12 + rust/docs/OpenNamespaceLockDto.md | 2 - rust/docs/OpenNamespaceSyncModel.md | 10 + rust/docs/OpenNamespaceTextModel.md | 16 + rust/docs/OpenOrganizationDto.md | 6 +- rust/docs/OpenPageDtoOpenInstanceDto.md | 4 +- rust/docs/OpenPageDtoOpenItemDto.md | 4 +- .../{EnvClusterInfo.md => OpenReleaseBo.md} | 8 +- rust/docs/OpenReleaseDto.md | 4 +- rust/docs/OpenapiV1AppsGet401Response.md | 11 - rust/docs/OpenapiV1AppsPost400Response.md | 12 - rust/docs/OpenapiV1AppsPostRequest.md | 13 - ...mespaceNameItemsValidatePost200Response.md | 12 - ...mespaceNameItemsValidatePost400Response.md | 13 - ...iV1EnvsEnvReleasesCompareGet200Response.md | 11 - rust/docs/ReleaseDto.md | 25 - .../docs/{Change.md => RichResponseEntity.md} | 9 +- rust/src/apis/configuration.rs | 6 +- rust/src/apis/mod.rs | 21 - rust/src/lib.rs | 5 +- .../_openapi_v1_apps_get_401_response.rs | 27 - .../_openapi_v1_apps_post_400_response.rs | 30 - .../models/_openapi_v1_apps_post_request.rs | 37 - ..._name__items_validate_post_200_response.rs | 30 - ..._name__items_validate_post_400_response.rs | 33 - ..._env__releases_compare_get_200_response.rs | 27 - rust/src/models/change.rs | 47 - rust/src/models/cluster_dto.rs | 68 - rust/src/models/entity_pair_kv_entity.rs | 30 - rust/src/models/env_cluster_info.rs | 32 - rust/src/models/item_dto.rs | 76 - rust/src/models/kv_entity.rs | 15 +- rust/src/models/list_item_diffs.rs | 34 - rust/src/models/list_release_bo.rs | 31 - rust/src/models/map_string.rs | 29 - rust/src/models/mod.rs | 56 +- rust/src/models/multi_response_entity.rs | 33 + .../models/namespace_gray_del_release_dto.rs | 13 +- rust/src/models/namespace_identifier.rs | 40 - rust/src/models/namespace_release_dto.rs | 13 +- rust/src/models/namespace_sync_model.rs | 32 - rust/src/models/open_app_dto.rs | 13 +- rust/src/models/open_app_namespace_dto.rs | 13 +- rust/src/models/open_cluster_dto.rs | 13 +- rust/src/models/open_create_app_dto.rs | 15 +- rust/src/models/open_env_cluster_dto.rs | 15 +- rust/src/models/open_env_cluster_info.rs | 31 + rust/src/models/open_gray_release_rule_dto.rs | 15 +- .../models/open_gray_release_rule_item_dto.rs | 13 +- rust/src/models/open_instance_config_dto.rs | 17 +- rust/src/models/open_instance_dto.rs | 27 +- ...hange_sets.rs => open_item_change_sets.rs} | 43 +- rust/src/models/open_item_diffs.rs | 33 + rust/src/models/open_item_dto.rs | 13 +- rust/src/models/open_namespace_dto.rs | 15 +- rust/src/models/open_namespace_identifier.rs | 39 + rust/src/models/open_namespace_lock_dto.rs | 13 +- rust/src/models/open_namespace_sync_model.rs | 31 + ..._model.rs => open_namespace_text_model.rs} | 35 +- rust/src/models/open_organization_dto.rs | 15 +- .../models/open_page_dto_open_instance_dto.rs | 15 +- .../src/models/open_page_dto_open_item_dto.rs | 15 +- rust/src/models/open_release_bo.rs | 29 + rust/src/models/open_release_dto.rs | 15 +- rust/src/models/release_dto.rs | 84 - rust/src/models/rich_response_entity.rs | 37 + spring-boot2/.openapi-generator/FILES | 28 +- spring-boot2/.openapi-generator/VERSION | 2 +- spring-boot2/README.md | 34 +- spring-boot2/pom.xml | 12 +- .../server/OpenApiGeneratorApplication.java | 2 +- .../openapi/server/RFC3339DateFormat.java | 2 +- .../openapi/server/api/AppManagementApi.java | 468 +- .../api/AppManagementApiController.java | 9 +- .../server/api/AppManagementApiDelegate.java | 305 +- .../server/api/ClusterManagementApi.java | 185 +- .../api/ClusterManagementApiController.java | 6 +- .../api/ClusterManagementApiDelegate.java | 149 +- .../server/api/InstanceManagementApi.java | 84 +- .../api/InstanceManagementApiController.java | 3 +- .../api/InstanceManagementApiDelegate.java | 43 +- .../openapi/server/api/ItemManagementApi.java | 665 +-- .../api/ItemManagementApiController.java | 13 +- .../server/api/ItemManagementApiDelegate.java | 475 +- .../api/NamespaceBranchManagementApi.java | 436 +- ...amespaceBranchManagementApiController.java | 7 +- .../NamespaceBranchManagementApiDelegate.java | 268 +- .../server/api/NamespaceManagementApi.java | 436 +- .../api/NamespaceManagementApiController.java | 5 +- .../api/NamespaceManagementApiDelegate.java | 241 +- .../server/api/OrganizationManagementApi.java | 28 +- .../OrganizationManagementApiController.java | 5 +- .../OrganizationManagementApiDelegate.java | 18 +- .../server/api/ReleaseManagementApi.java | 409 +- .../api/ReleaseManagementApiController.java | 9 +- .../api/ReleaseManagementApiDelegate.java | 238 +- .../openapi/server/config/HomeController.java | 2 +- .../server/config/SpringDocConfiguration.java | 4 +- .../apollo/openapi/server/model/Change.java | 147 - .../openapi/server/model/ClusterDTO.java | 336 -- .../server/model/EntityPairKVEntity.java | 109 - .../openapi/server/model/ItemChangeSets.java | 307 -- .../apollo/openapi/server/model/ItemDTO.java | 372 -- .../apollo/openapi/server/model/KVEntity.java | 36 +- .../openapi/server/model/MapString.java | 85 - .../server/model/MultiResponseEntity.java | 136 + .../model/NamespaceGrayDelReleaseDTO.java | 59 +- .../server/model/NamespaceReleaseDTO.java | 52 +- .../server/model/NamespaceTextModel.java | 252 - .../openapi/server/model/OpenAppDTO.java | 128 +- .../server/model/OpenAppNamespaceDTO.java | 120 +- .../openapi/server/model/OpenClusterDTO.java | 80 +- .../server/model/OpenCreateAppDTO.java | 35 +- .../server/model/OpenEnvClusterDTO.java | 31 +- ...usterInfo.java => OpenEnvClusterInfo.java} | 53 +- .../server/model/OpenGrayReleaseRuleDTO.java | 111 +- .../model/OpenGrayReleaseRuleItemDTO.java | 29 +- .../server/model/OpenInstanceConfigDTO.java | 48 +- .../openapi/server/model/OpenInstanceDTO.java | 111 +- .../server/model/OpenItemChangeSets.java | 304 ++ .../openapi/server/model/OpenItemDTO.java | 104 +- ...{ListItemDiffs.java => OpenItemDiffs.java} | 62 +- .../server/model/OpenNamespaceDTO.java | 135 +- ...fier.java => OpenNamespaceIdentifier.java} | 84 +- .../server/model/OpenNamespaceLockDTO.java | 40 +- ...Model.java => OpenNamespaceSyncModel.java} | 57 +- .../server/model/OpenNamespaceTextModel.java | 250 + .../server/model/OpenOrganizationDto.java | 36 +- .../model/OpenPageDTOOpenInstanceDTO.java | 47 +- .../server/model/OpenPageDTOOpenItemDTO.java | 47 +- ...{ListReleaseBO.java => OpenReleaseBO.java} | 45 +- .../openapi/server/model/OpenReleaseDTO.java | 152 +- .../model/OpenapiV1AppsGet401Response.java | 86 - .../model/OpenapiV1AppsPost400Response.java | 110 - .../model/OpenapiV1AppsPostRequest.java | 161 - ...spaceNameItemsValidatePost200Response.java | 110 - ...spaceNameItemsValidatePost400Response.java | 146 - ...1EnvsEnvReleasesCompareGet200Response.java | 99 - .../openapi/server/model/ReleaseDTO.java | 420 -- .../server/model/RichResponseEntity.java | 148 + spring-boot2/src/main/resources/openapi.yaml | 2669 +++++----- .../OpenApiGeneratorApplicationTests.java | 2 +- typescript/.npmignore | 2 +- typescript/.openapi-generator/FILES | 28 +- typescript/.openapi-generator/VERSION | 2 +- typescript/README.md | 5 +- typescript/package.json | 2 +- typescript/src/apis/AppManagementApi.ts | 576 +-- typescript/src/apis/ClusterManagementApi.ts | 309 +- typescript/src/apis/InstanceManagementApi.ts | 166 +- typescript/src/apis/ItemManagementApi.ts | 1115 ++-- .../src/apis/NamespaceBranchManagementApi.ts | 769 +-- typescript/src/apis/NamespaceManagementApi.ts | 673 +-- .../src/apis/OrganizationManagementApi.ts | 30 +- typescript/src/apis/ReleaseManagementApi.ts | 635 +-- typescript/src/index.ts | 4 +- typescript/src/models/Change.ts | 93 - typescript/src/models/ClusterDTO.ts | 147 - typescript/src/models/EntityPairKVEntity.ts | 81 - typescript/src/models/EnvClusterInfo.ts | 81 - typescript/src/models/ItemChangeSets.ts | 137 - typescript/src/models/ItemDTO.ts | 161 - typescript/src/models/KVEntity.ts | 47 +- typescript/src/models/ListItemDiffs.ts | 96 - typescript/src/models/ListReleaseBO.ts | 88 - typescript/src/models/MapString.ts | 65 - typescript/src/models/MultiResponseEntity.ts | 81 + .../src/models/NamespaceGrayDelReleaseDTO.ts | 53 +- typescript/src/models/NamespaceIdentifier.ts | 89 - typescript/src/models/NamespaceReleaseDTO.ts | 49 +- typescript/src/models/NamespaceSyncModel.ts | 88 - typescript/src/models/NamespaceTextModel.ts | 121 - typescript/src/models/OpenAppDTO.ts | 73 +- typescript/src/models/OpenAppNamespaceDTO.ts | 73 +- typescript/src/models/OpenClusterDTO.ts | 57 +- typescript/src/models/OpenCreateAppDTO.ts | 48 +- typescript/src/models/OpenEnvClusterDTO.ts | 47 +- typescript/src/models/OpenEnvClusterInfo.ts | 79 + .../src/models/OpenGrayReleaseRuleDTO.ts | 70 +- .../src/models/OpenGrayReleaseRuleItemDTO.ts | 45 +- .../src/models/OpenInstanceConfigDTO.ts | 54 +- typescript/src/models/OpenInstanceDTO.ts | 78 +- typescript/src/models/OpenItemChangeSets.ts | 135 + typescript/src/models/OpenItemDTO.ts | 65 +- typescript/src/models/OpenItemDiffs.ts | 93 + typescript/src/models/OpenNamespaceDTO.ts | 78 +- .../src/models/OpenNamespaceIdentifier.ts | 88 + typescript/src/models/OpenNamespaceLockDTO.ts | 45 +- .../src/models/OpenNamespaceSyncModel.ts | 85 + .../src/models/OpenNamespaceTextModel.ts | 120 + typescript/src/models/OpenOrganizationDto.ts | 47 +- .../src/models/OpenPageDTOOpenInstanceDTO.ts | 50 +- .../src/models/OpenPageDTOOpenItemDTO.ts | 50 +- typescript/src/models/OpenReleaseBO.ts | 85 + typescript/src/models/OpenReleaseDTO.ts | 91 +- .../src/models/OpenapiV1AppsGet401Response.ts | 65 - .../models/OpenapiV1AppsPost400Response.ts | 73 - .../src/models/OpenapiV1AppsPostRequest.ts | 92 - ...mespaceNameItemsValidatePost200Response.ts | 73 - ...mespaceNameItemsValidatePost400Response.ts | 81 - ...iV1EnvsEnvReleasesCompareGet200Response.ts | 73 - typescript/src/models/ReleaseDTO.ts | 177 - typescript/src/models/RichResponseEntity.ts | 82 + typescript/src/models/index.ts | 28 +- typescript/src/runtime.ts | 47 +- 1051 files changed, 97872 insertions(+), 63624 deletions(-) delete mode 100644 java-client/docs/Change.md delete mode 100644 java-client/docs/ClusterDTO.md delete mode 100644 java-client/docs/EntityPairKVEntity.md delete mode 100644 java-client/docs/EnvClusterInfo.md delete mode 100644 java-client/docs/ItemChangeSets.md delete mode 100644 java-client/docs/ItemDTO.md delete mode 100644 java-client/docs/ListItemDiffs.md delete mode 100644 java-client/docs/MapString.md create mode 100644 java-client/docs/MultiResponseEntity.md delete mode 100644 java-client/docs/NamespaceIdentifier.md delete mode 100644 java-client/docs/NamespaceSyncModel.md delete mode 100644 java-client/docs/NamespaceTextModel.md create mode 100644 java-client/docs/OpenEnvClusterInfo.md create mode 100644 java-client/docs/OpenItemChangeSets.md create mode 100644 java-client/docs/OpenItemDiffs.md create mode 100644 java-client/docs/OpenNamespaceIdentifier.md create mode 100644 java-client/docs/OpenNamespaceSyncModel.md create mode 100644 java-client/docs/OpenNamespaceTextModel.md rename java-client/docs/{ListReleaseBO.md => OpenReleaseBO.md} (67%) delete mode 100644 java-client/docs/OpenapiV1AppsGet401Response.md delete mode 100644 java-client/docs/OpenapiV1AppsPost400Response.md delete mode 100644 java-client/docs/OpenapiV1AppsPostRequest.md delete mode 100644 java-client/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md delete mode 100644 java-client/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md delete mode 100644 java-client/docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md delete mode 100644 java-client/docs/ReleaseDTO.md create mode 100644 java-client/docs/RichResponseEntity.md delete mode 100644 java-client/src/main/java/org/openapitools/client/model/Change.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/ClusterDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/EntityPairKVEntity.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/ItemDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/MapString.java create mode 100644 java-client/src/main/java/org/openapitools/client/model/MultiResponseEntity.java rename java-client/src/main/java/org/openapitools/client/model/{EnvClusterInfo.java => OpenEnvClusterInfo.java} (55%) rename java-client/src/main/java/org/openapitools/client/model/{ItemChangeSets.java => OpenItemChangeSets.java} (64%) rename java-client/src/main/java/org/openapitools/client/model/{ListItemDiffs.java => OpenItemDiffs.java} (53%) rename java-client/src/main/java/org/openapitools/client/model/{NamespaceIdentifier.java => OpenNamespaceIdentifier.java} (57%) rename java-client/src/main/java/org/openapitools/client/model/{NamespaceSyncModel.java => OpenNamespaceSyncModel.java} (55%) rename java-client/src/main/java/org/openapitools/client/model/{NamespaceTextModel.java => OpenNamespaceTextModel.java} (61%) rename java-client/src/main/java/org/openapitools/client/model/{ListReleaseBO.java => OpenReleaseBO.java} (55%) delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenapiV1AppsGet401Response.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenapiV1AppsPost400Response.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenapiV1AppsPostRequest.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenapiV1EnvsEnvReleasesCompareGet200Response.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/ReleaseDTO.java create mode 100644 java-client/src/main/java/org/openapitools/client/model/RichResponseEntity.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/ChangeTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/ClusterDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/EntityPairKVEntityTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/EnvClusterInfoTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/ItemDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/ListItemDiffsTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/ListReleaseBOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/MapStringTest.java create mode 100644 java-client/src/test/java/org/openapitools/client/model/MultiResponseEntityTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/NamespaceSyncModelTest.java create mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenEnvClusterInfoTest.java rename java-client/src/test/java/org/openapitools/client/model/{ItemChangeSetsTest.java => OpenItemChangeSetsTest.java} (68%) create mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenItemDiffsTest.java rename java-client/src/test/java/org/openapitools/client/model/{NamespaceIdentifierTest.java => OpenNamespaceIdentifierTest.java} (53%) create mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenNamespaceSyncModelTest.java rename java-client/src/test/java/org/openapitools/client/model/{NamespaceTextModelTest.java => OpenNamespaceTextModelTest.java} (62%) create mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenReleaseBOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenapiV1AppsGet401ResponseTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenapiV1AppsPost400ResponseTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenapiV1AppsPostRequestTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400ResponseTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenapiV1EnvsEnvReleasesCompareGet200ResponseTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/ReleaseDTOTest.java create mode 100644 java-client/src/test/java/org/openapitools/client/model/RichResponseEntityTest.java delete mode 100644 python/.github/workflows/python.yml delete mode 100644 python/apollo_openapi/api/__init__.py delete mode 100644 python/apollo_openapi/api/app_management_api.py delete mode 100644 python/apollo_openapi/api/cluster_management_api.py delete mode 100644 python/apollo_openapi/api/instance_management_api.py delete mode 100644 python/apollo_openapi/api/item_management_api.py delete mode 100644 python/apollo_openapi/api/namespace_branch_management_api.py delete mode 100644 python/apollo_openapi/api/namespace_management_api.py delete mode 100644 python/apollo_openapi/api/organization_management_api.py delete mode 100644 python/apollo_openapi/api/release_management_api.py delete mode 100644 python/apollo_openapi/api_response.py create mode 100644 python/apollo_openapi/apis/__init__.py create mode 100644 python/apollo_openapi/apis/path_to_api.py create mode 100644 python/apollo_openapi/apis/paths/__init__.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_appnamespaces.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_appnamespaces.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envclusters.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_miss_envs.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_namespaces_releases_status.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_navtree.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_authorized.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_by_self.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_envs_env.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_appnamespaces_public_namespace_name_instances.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_releases_release_id.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_releases_release_id_instances.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_releases_release_id_rollback.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_organizations.py create mode 100644 python/apollo_openapi/apis/tag_to_api.py create mode 100644 python/apollo_openapi/apis/tags/__init__.py create mode 100644 python/apollo_openapi/apis/tags/app_management_api.py create mode 100644 python/apollo_openapi/apis/tags/cluster_management_api.py create mode 100644 python/apollo_openapi/apis/tags/instance_management_api.py create mode 100644 python/apollo_openapi/apis/tags/item_management_api.py create mode 100644 python/apollo_openapi/apis/tags/namespace_branch_management_api.py create mode 100644 python/apollo_openapi/apis/tags/namespace_management_api.py create mode 100644 python/apollo_openapi/apis/tags/organization_management_api.py create mode 100644 python/apollo_openapi/apis/tags/release_management_api.py create mode 100644 python/apollo_openapi/model/__init__.py create mode 100644 python/apollo_openapi/model/exception_response.py create mode 100644 python/apollo_openapi/model/exception_response.pyi create mode 100644 python/apollo_openapi/model/kv_entity.py create mode 100644 python/apollo_openapi/model/kv_entity.pyi create mode 100644 python/apollo_openapi/model/map_string.py create mode 100644 python/apollo_openapi/model/map_string.pyi create mode 100644 python/apollo_openapi/model/multi_response_entity.py create mode 100644 python/apollo_openapi/model/multi_response_entity.pyi create mode 100644 python/apollo_openapi/model/namespace_gray_del_release_dto.py create mode 100644 python/apollo_openapi/model/namespace_gray_del_release_dto.pyi create mode 100644 python/apollo_openapi/model/namespace_release_dto.py create mode 100644 python/apollo_openapi/model/namespace_release_dto.pyi create mode 100644 python/apollo_openapi/model/open_app_dto.py create mode 100644 python/apollo_openapi/model/open_app_dto.pyi create mode 100644 python/apollo_openapi/model/open_app_namespace_dto.py create mode 100644 python/apollo_openapi/model/open_app_namespace_dto.pyi create mode 100644 python/apollo_openapi/model/open_cluster_dto.py create mode 100644 python/apollo_openapi/model/open_cluster_dto.pyi create mode 100644 python/apollo_openapi/model/open_create_app_dto.py create mode 100644 python/apollo_openapi/model/open_create_app_dto.pyi create mode 100644 python/apollo_openapi/model/open_env_cluster_dto.py create mode 100644 python/apollo_openapi/model/open_env_cluster_dto.pyi create mode 100644 python/apollo_openapi/model/open_env_cluster_info.py create mode 100644 python/apollo_openapi/model/open_env_cluster_info.pyi create mode 100644 python/apollo_openapi/model/open_gray_release_rule_dto.py create mode 100644 python/apollo_openapi/model/open_gray_release_rule_dto.pyi create mode 100644 python/apollo_openapi/model/open_gray_release_rule_item_dto.py create mode 100644 python/apollo_openapi/model/open_gray_release_rule_item_dto.pyi create mode 100644 python/apollo_openapi/model/open_instance_config_dto.py create mode 100644 python/apollo_openapi/model/open_instance_config_dto.pyi create mode 100644 python/apollo_openapi/model/open_instance_dto.py create mode 100644 python/apollo_openapi/model/open_instance_dto.pyi create mode 100644 python/apollo_openapi/model/open_item_change_sets.py create mode 100644 python/apollo_openapi/model/open_item_change_sets.pyi create mode 100644 python/apollo_openapi/model/open_item_diffs.py create mode 100644 python/apollo_openapi/model/open_item_diffs.pyi create mode 100644 python/apollo_openapi/model/open_item_dto.py create mode 100644 python/apollo_openapi/model/open_item_dto.pyi create mode 100644 python/apollo_openapi/model/open_namespace_dto.py create mode 100644 python/apollo_openapi/model/open_namespace_dto.pyi create mode 100644 python/apollo_openapi/model/open_namespace_identifier.py create mode 100644 python/apollo_openapi/model/open_namespace_identifier.pyi create mode 100644 python/apollo_openapi/model/open_namespace_lock_dto.py create mode 100644 python/apollo_openapi/model/open_namespace_lock_dto.pyi create mode 100644 python/apollo_openapi/model/open_namespace_sync_model.py create mode 100644 python/apollo_openapi/model/open_namespace_sync_model.pyi create mode 100644 python/apollo_openapi/model/open_namespace_text_model.py create mode 100644 python/apollo_openapi/model/open_namespace_text_model.pyi create mode 100644 python/apollo_openapi/model/open_organization_dto.py create mode 100644 python/apollo_openapi/model/open_organization_dto.pyi create mode 100644 python/apollo_openapi/model/open_page_dto_open_instance_dto.py create mode 100644 python/apollo_openapi/model/open_page_dto_open_instance_dto.pyi create mode 100644 python/apollo_openapi/model/open_page_dto_open_item_dto.py create mode 100644 python/apollo_openapi/model/open_page_dto_open_item_dto.pyi create mode 100644 python/apollo_openapi/model/open_release_bo.py create mode 100644 python/apollo_openapi/model/open_release_bo.pyi create mode 100644 python/apollo_openapi/model/open_release_dto.py create mode 100644 python/apollo_openapi/model/open_release_dto.pyi create mode 100644 python/apollo_openapi/model/rich_response_entity.py create mode 100644 python/apollo_openapi/model/rich_response_entity.pyi create mode 100644 python/apollo_openapi/model/string_to_string_bool_map.py create mode 100644 python/apollo_openapi/model/string_to_string_bool_map.pyi delete mode 100644 python/apollo_openapi/models/change.py delete mode 100644 python/apollo_openapi/models/cluster_dto.py delete mode 100644 python/apollo_openapi/models/entity_pair_kv_entity.py delete mode 100644 python/apollo_openapi/models/env_cluster_info.py delete mode 100644 python/apollo_openapi/models/item_change_sets.py delete mode 100644 python/apollo_openapi/models/item_dto.py delete mode 100644 python/apollo_openapi/models/kv_entity.py delete mode 100644 python/apollo_openapi/models/list_item_diffs.py delete mode 100644 python/apollo_openapi/models/list_release_bo.py delete mode 100644 python/apollo_openapi/models/map_string.py delete mode 100644 python/apollo_openapi/models/namespace_gray_del_release_dto.py delete mode 100644 python/apollo_openapi/models/namespace_identifier.py delete mode 100644 python/apollo_openapi/models/namespace_release_dto.py delete mode 100644 python/apollo_openapi/models/namespace_sync_model.py delete mode 100644 python/apollo_openapi/models/namespace_text_model.py delete mode 100644 python/apollo_openapi/models/open_app_dto.py delete mode 100644 python/apollo_openapi/models/open_app_namespace_dto.py delete mode 100644 python/apollo_openapi/models/open_cluster_dto.py delete mode 100644 python/apollo_openapi/models/open_create_app_dto.py delete mode 100644 python/apollo_openapi/models/open_env_cluster_dto.py delete mode 100644 python/apollo_openapi/models/open_gray_release_rule_dto.py delete mode 100644 python/apollo_openapi/models/open_gray_release_rule_item_dto.py delete mode 100644 python/apollo_openapi/models/open_instance_config_dto.py delete mode 100644 python/apollo_openapi/models/open_instance_dto.py delete mode 100644 python/apollo_openapi/models/open_item_dto.py delete mode 100644 python/apollo_openapi/models/open_namespace_dto.py delete mode 100644 python/apollo_openapi/models/open_namespace_lock_dto.py delete mode 100644 python/apollo_openapi/models/open_organization_dto.py delete mode 100644 python/apollo_openapi/models/open_page_dto_open_instance_dto.py delete mode 100644 python/apollo_openapi/models/open_page_dto_open_item_dto.py delete mode 100644 python/apollo_openapi/models/open_release_dto.py delete mode 100644 python/apollo_openapi/models/openapi_v1_apps_get401_response.py delete mode 100644 python/apollo_openapi/models/openapi_v1_apps_post400_response.py delete mode 100644 python/apollo_openapi/models/openapi_v1_apps_post_request.py delete mode 100644 python/apollo_openapi/models/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response.py delete mode 100644 python/apollo_openapi/models/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response.py delete mode 100644 python/apollo_openapi/models/openapi_v1_envs_env_releases_compare_get200_response.py delete mode 100644 python/apollo_openapi/models/release_dto.py create mode 100644 python/apollo_openapi/paths/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_appnamespaces/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_appnamespaces/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_appnamespaces/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_apps/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_apps/post.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps/post.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id/delete.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id/delete.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id/put.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id/put.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/post.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/post.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/delete.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/delete.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envclusters/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envclusters/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envclusters/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/delete.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/delete.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_releases_status/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_releases_status/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_releases_status/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_navtree/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_navtree/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_navtree/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_authorized/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_authorized/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_authorized/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_by_self/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_by_self/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_by_self/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_envs_env/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_envs_env/post.py create mode 100644 python/apollo_openapi/paths/openapi_v1_apps_envs_env/post.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters/post.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters/post.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/delete.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/delete.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/post.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/post.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/delete.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/delete.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/patch.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/patch.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases/post.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases/post.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge/post.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge/post.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases/post.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases/post.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/put.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/put.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/delete.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/delete.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/put.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/put.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/post.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/post.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/put.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/put.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/post.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/post.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/delete.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/delete.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/put.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/put.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/post.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/post.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/post.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/post.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/post.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/post.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/post.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/post.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_rollback/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_rollback/put.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_rollback/put.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_organizations/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_organizations/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_organizations/get.pyi delete mode 100644 python/apollo_openapi/py.typed create mode 100644 python/apollo_openapi/schemas.py delete mode 100644 python/docs/AppManagementApi.md delete mode 100644 python/docs/Change.md delete mode 100644 python/docs/ClusterDTO.md delete mode 100644 python/docs/ClusterManagementApi.md delete mode 100644 python/docs/EntityPairKVEntity.md delete mode 100644 python/docs/EnvClusterInfo.md delete mode 100644 python/docs/InstanceManagementApi.md delete mode 100644 python/docs/ItemChangeSets.md delete mode 100644 python/docs/ItemDTO.md delete mode 100644 python/docs/ItemManagementApi.md delete mode 100644 python/docs/KVEntity.md delete mode 100644 python/docs/ListItemDiffs.md delete mode 100644 python/docs/ListReleaseBO.md delete mode 100644 python/docs/MapString.md delete mode 100644 python/docs/NamespaceBranchManagementApi.md delete mode 100644 python/docs/NamespaceGrayDelReleaseDTO.md delete mode 100644 python/docs/NamespaceIdentifier.md delete mode 100644 python/docs/NamespaceManagementApi.md delete mode 100644 python/docs/NamespaceReleaseDTO.md delete mode 100644 python/docs/NamespaceSyncModel.md delete mode 100644 python/docs/NamespaceTextModel.md delete mode 100644 python/docs/OpenAppDTO.md delete mode 100644 python/docs/OpenAppNamespaceDTO.md delete mode 100644 python/docs/OpenClusterDTO.md delete mode 100644 python/docs/OpenCreateAppDTO.md delete mode 100644 python/docs/OpenEnvClusterDTO.md delete mode 100644 python/docs/OpenGrayReleaseRuleDTO.md delete mode 100644 python/docs/OpenGrayReleaseRuleItemDTO.md delete mode 100644 python/docs/OpenInstanceConfigDTO.md delete mode 100644 python/docs/OpenInstanceDTO.md delete mode 100644 python/docs/OpenItemDTO.md delete mode 100644 python/docs/OpenNamespaceDTO.md delete mode 100644 python/docs/OpenNamespaceLockDTO.md delete mode 100644 python/docs/OpenOrganizationDto.md delete mode 100644 python/docs/OpenPageDTOOpenInstanceDTO.md delete mode 100644 python/docs/OpenPageDTOOpenItemDTO.md delete mode 100644 python/docs/OpenReleaseDTO.md delete mode 100644 python/docs/OpenapiV1AppsGet401Response.md delete mode 100644 python/docs/OpenapiV1AppsPost400Response.md delete mode 100644 python/docs/OpenapiV1AppsPostRequest.md delete mode 100644 python/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md delete mode 100644 python/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md delete mode 100644 python/docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md delete mode 100644 python/docs/OrganizationManagementApi.md delete mode 100644 python/docs/ReleaseDTO.md delete mode 100644 python/docs/ReleaseManagementApi.md create mode 100644 python/docs/apis/tags/AppManagementApi.md create mode 100644 python/docs/apis/tags/ClusterManagementApi.md create mode 100644 python/docs/apis/tags/InstanceManagementApi.md create mode 100644 python/docs/apis/tags/ItemManagementApi.md create mode 100644 python/docs/apis/tags/NamespaceBranchManagementApi.md create mode 100644 python/docs/apis/tags/NamespaceManagementApi.md create mode 100644 python/docs/apis/tags/OrganizationManagementApi.md create mode 100644 python/docs/apis/tags/ReleaseManagementApi.md create mode 100644 python/docs/models/ExceptionResponse.md create mode 100644 python/docs/models/KVEntity.md create mode 100644 python/docs/models/MapString.md create mode 100644 python/docs/models/MultiResponseEntity.md create mode 100644 python/docs/models/NamespaceGrayDelReleaseDTO.md create mode 100644 python/docs/models/NamespaceReleaseDTO.md create mode 100644 python/docs/models/OpenAppDTO.md create mode 100644 python/docs/models/OpenAppNamespaceDTO.md create mode 100644 python/docs/models/OpenClusterDTO.md create mode 100644 python/docs/models/OpenCreateAppDTO.md create mode 100644 python/docs/models/OpenEnvClusterDTO.md create mode 100644 python/docs/models/OpenEnvClusterInfo.md create mode 100644 python/docs/models/OpenGrayReleaseRuleDTO.md create mode 100644 python/docs/models/OpenGrayReleaseRuleItemDTO.md create mode 100644 python/docs/models/OpenInstanceConfigDTO.md create mode 100644 python/docs/models/OpenInstanceDTO.md create mode 100644 python/docs/models/OpenItemChangeSets.md create mode 100644 python/docs/models/OpenItemDTO.md create mode 100644 python/docs/models/OpenItemDiffs.md create mode 100644 python/docs/models/OpenNamespaceDTO.md create mode 100644 python/docs/models/OpenNamespaceIdentifier.md create mode 100644 python/docs/models/OpenNamespaceLockDTO.md create mode 100644 python/docs/models/OpenNamespaceSyncModel.md create mode 100644 python/docs/models/OpenNamespaceTextModel.md create mode 100644 python/docs/models/OpenOrganizationDto.md create mode 100644 python/docs/models/OpenPageDTOOpenInstanceDTO.md create mode 100644 python/docs/models/OpenPageDTOOpenItemDTO.md create mode 100644 python/docs/models/OpenReleaseBO.md create mode 100644 python/docs/models/OpenReleaseDTO.md create mode 100644 python/docs/models/RichResponseEntity.md create mode 100644 python/docs/models/StringToStringBoolMap.md delete mode 100644 python/pyproject.toml delete mode 100644 python/test/test_app_management_api.py delete mode 100644 python/test/test_change.py delete mode 100644 python/test/test_cluster_dto.py delete mode 100644 python/test/test_cluster_management_api.py delete mode 100644 python/test/test_entity_pair_kv_entity.py delete mode 100644 python/test/test_env_cluster_info.py delete mode 100644 python/test/test_instance_management_api.py delete mode 100644 python/test/test_item_change_sets.py delete mode 100644 python/test/test_item_dto.py delete mode 100644 python/test/test_item_management_api.py delete mode 100644 python/test/test_kv_entity.py delete mode 100644 python/test/test_list_item_diffs.py delete mode 100644 python/test/test_list_release_bo.py delete mode 100644 python/test/test_map_string.py create mode 100644 python/test/test_models/__init__.py create mode 100644 python/test/test_models/test_exception_response.py create mode 100644 python/test/test_models/test_kv_entity.py create mode 100644 python/test/test_models/test_map_string.py create mode 100644 python/test/test_models/test_multi_response_entity.py create mode 100644 python/test/test_models/test_namespace_gray_del_release_dto.py create mode 100644 python/test/test_models/test_namespace_release_dto.py create mode 100644 python/test/test_models/test_open_app_dto.py create mode 100644 python/test/test_models/test_open_app_namespace_dto.py create mode 100644 python/test/test_models/test_open_cluster_dto.py create mode 100644 python/test/test_models/test_open_create_app_dto.py create mode 100644 python/test/test_models/test_open_env_cluster_dto.py create mode 100644 python/test/test_models/test_open_env_cluster_info.py create mode 100644 python/test/test_models/test_open_gray_release_rule_dto.py create mode 100644 python/test/test_models/test_open_gray_release_rule_item_dto.py create mode 100644 python/test/test_models/test_open_instance_config_dto.py create mode 100644 python/test/test_models/test_open_instance_dto.py create mode 100644 python/test/test_models/test_open_item_change_sets.py create mode 100644 python/test/test_models/test_open_item_diffs.py create mode 100644 python/test/test_models/test_open_item_dto.py create mode 100644 python/test/test_models/test_open_namespace_dto.py create mode 100644 python/test/test_models/test_open_namespace_identifier.py create mode 100644 python/test/test_models/test_open_namespace_lock_dto.py create mode 100644 python/test/test_models/test_open_namespace_sync_model.py create mode 100644 python/test/test_models/test_open_namespace_text_model.py create mode 100644 python/test/test_models/test_open_organization_dto.py create mode 100644 python/test/test_models/test_open_page_dto_open_instance_dto.py create mode 100644 python/test/test_models/test_open_page_dto_open_item_dto.py create mode 100644 python/test/test_models/test_open_release_bo.py create mode 100644 python/test/test_models/test_open_release_dto.py create mode 100644 python/test/test_models/test_rich_response_entity.py create mode 100644 python/test/test_models/test_string_to_string_bool_map.py delete mode 100644 python/test/test_namespace_branch_management_api.py delete mode 100644 python/test/test_namespace_gray_del_release_dto.py delete mode 100644 python/test/test_namespace_identifier.py delete mode 100644 python/test/test_namespace_management_api.py delete mode 100644 python/test/test_namespace_release_dto.py delete mode 100644 python/test/test_namespace_sync_model.py delete mode 100644 python/test/test_namespace_text_model.py delete mode 100644 python/test/test_open_app_dto.py delete mode 100644 python/test/test_open_app_namespace_dto.py delete mode 100644 python/test/test_open_cluster_dto.py delete mode 100644 python/test/test_open_create_app_dto.py delete mode 100644 python/test/test_open_env_cluster_dto.py delete mode 100644 python/test/test_open_gray_release_rule_dto.py delete mode 100644 python/test/test_open_gray_release_rule_item_dto.py delete mode 100644 python/test/test_open_instance_config_dto.py delete mode 100644 python/test/test_open_instance_dto.py delete mode 100644 python/test/test_open_item_dto.py delete mode 100644 python/test/test_open_namespace_dto.py delete mode 100644 python/test/test_open_namespace_lock_dto.py delete mode 100644 python/test/test_open_organization_dto.py delete mode 100644 python/test/test_open_page_dto_open_instance_dto.py delete mode 100644 python/test/test_open_page_dto_open_item_dto.py delete mode 100644 python/test/test_open_release_dto.py delete mode 100644 python/test/test_openapi_v1_apps_get401_response.py delete mode 100644 python/test/test_openapi_v1_apps_post400_response.py delete mode 100644 python/test/test_openapi_v1_apps_post_request.py delete mode 100644 python/test/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response.py delete mode 100644 python/test/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response.py delete mode 100644 python/test/test_openapi_v1_envs_env_releases_compare_get200_response.py delete mode 100644 python/test/test_organization_management_api.py create mode 100644 python/test/test_paths/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_appnamespaces/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_appnamespaces/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_apps/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_apps/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_apps/test_post.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id/test_delete.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id/test_put.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces/test_post.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name/test_delete.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envclusters/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envclusters/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/test_delete.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_miss_envs/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_miss_envs/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_releases_status/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_releases_status/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_navtree/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_navtree/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_authorized/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_authorized/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_by_self/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_by_self/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_envs_env/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_apps_envs_env/test_post.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters/test_post.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name/test_delete.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/test_post.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/test_delete.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/test_patch.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases/test_post.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge/test_post.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases/test_post.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/test_put.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/test_delete.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/test_put.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/test_post.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/test_put.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/test_post.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/test_delete.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/test_put.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/test_post.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/test_post.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/test_post.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/test_post.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_releases_release_id/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_releases_release_id/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_releases_release_id_instances/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_releases_release_id_instances/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_releases_release_id_rollback/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_releases_release_id_rollback/test_put.py create mode 100644 python/test/test_paths/test_openapi_v1_organizations/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_organizations/test_get.py delete mode 100644 python/test/test_release_dto.py delete mode 100644 python/test/test_release_management_api.py delete mode 100644 rust/docs/ClusterDto.md delete mode 100644 rust/docs/ItemChangeSets.md delete mode 100644 rust/docs/ItemDto.md delete mode 100644 rust/docs/ListItemDiffs.md delete mode 100644 rust/docs/MapString.md rename rust/docs/{ListReleaseBo.md => MultiResponseEntity.md} (59%) delete mode 100644 rust/docs/NamespaceIdentifier.md delete mode 100644 rust/docs/NamespaceSyncModel.md delete mode 100644 rust/docs/NamespaceTextModel.md rename rust/docs/{EntityPairKvEntity.md => OpenEnvClusterInfo.md} (58%) create mode 100644 rust/docs/OpenItemChangeSets.md create mode 100644 rust/docs/OpenItemDiffs.md create mode 100644 rust/docs/OpenNamespaceIdentifier.md create mode 100644 rust/docs/OpenNamespaceSyncModel.md create mode 100644 rust/docs/OpenNamespaceTextModel.md rename rust/docs/{EnvClusterInfo.md => OpenReleaseBo.md} (62%) delete mode 100644 rust/docs/OpenapiV1AppsGet401Response.md delete mode 100644 rust/docs/OpenapiV1AppsPost400Response.md delete mode 100644 rust/docs/OpenapiV1AppsPostRequest.md delete mode 100644 rust/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md delete mode 100644 rust/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md delete mode 100644 rust/docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md delete mode 100644 rust/docs/ReleaseDto.md rename rust/docs/{Change.md => RichResponseEntity.md} (52%) delete mode 100644 rust/src/models/_openapi_v1_apps_get_401_response.rs delete mode 100644 rust/src/models/_openapi_v1_apps_post_400_response.rs delete mode 100644 rust/src/models/_openapi_v1_apps_post_request.rs delete mode 100644 rust/src/models/_openapi_v1_envs__env__apps__app_id__clusters__cluster_name__namespaces__namespace_name__items_validate_post_200_response.rs delete mode 100644 rust/src/models/_openapi_v1_envs__env__apps__app_id__clusters__cluster_name__namespaces__namespace_name__items_validate_post_400_response.rs delete mode 100644 rust/src/models/_openapi_v1_envs__env__releases_compare_get_200_response.rs delete mode 100644 rust/src/models/change.rs delete mode 100644 rust/src/models/cluster_dto.rs delete mode 100644 rust/src/models/entity_pair_kv_entity.rs delete mode 100644 rust/src/models/env_cluster_info.rs delete mode 100644 rust/src/models/item_dto.rs delete mode 100644 rust/src/models/list_item_diffs.rs delete mode 100644 rust/src/models/list_release_bo.rs delete mode 100644 rust/src/models/map_string.rs create mode 100644 rust/src/models/multi_response_entity.rs delete mode 100644 rust/src/models/namespace_identifier.rs delete mode 100644 rust/src/models/namespace_sync_model.rs create mode 100644 rust/src/models/open_env_cluster_info.rs rename rust/src/models/{item_change_sets.rs => open_item_change_sets.rs} (53%) create mode 100644 rust/src/models/open_item_diffs.rs create mode 100644 rust/src/models/open_namespace_identifier.rs create mode 100644 rust/src/models/open_namespace_sync_model.rs rename rust/src/models/{namespace_text_model.rs => open_namespace_text_model.rs} (51%) create mode 100644 rust/src/models/open_release_bo.rs delete mode 100644 rust/src/models/release_dto.rs create mode 100644 rust/src/models/rich_response_entity.rs delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/Change.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/ClusterDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/EntityPairKVEntity.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/ItemChangeSets.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/ItemDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/MapString.java create mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/MultiResponseEntity.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceTextModel.java rename spring-boot2/src/main/java/com/apollo/openapi/server/model/{EnvClusterInfo.java => OpenEnvClusterInfo.java} (60%) create mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemChangeSets.java rename spring-boot2/src/main/java/com/apollo/openapi/server/model/{ListItemDiffs.java => OpenItemDiffs.java} (60%) rename spring-boot2/src/main/java/com/apollo/openapi/server/model/{NamespaceIdentifier.java => OpenNamespaceIdentifier.java} (54%) rename spring-boot2/src/main/java/com/apollo/openapi/server/model/{NamespaceSyncModel.java => OpenNamespaceSyncModel.java} (56%) create mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceTextModel.java rename spring-boot2/src/main/java/com/apollo/openapi/server/model/{ListReleaseBO.java => OpenReleaseBO.java} (67%) delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsGet401Response.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsPost400Response.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsPostRequest.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1EnvsEnvReleasesCompareGet200Response.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/ReleaseDTO.java create mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/RichResponseEntity.java delete mode 100644 typescript/src/models/Change.ts delete mode 100644 typescript/src/models/ClusterDTO.ts delete mode 100644 typescript/src/models/EntityPairKVEntity.ts delete mode 100644 typescript/src/models/EnvClusterInfo.ts delete mode 100644 typescript/src/models/ItemChangeSets.ts delete mode 100644 typescript/src/models/ItemDTO.ts delete mode 100644 typescript/src/models/ListItemDiffs.ts delete mode 100644 typescript/src/models/ListReleaseBO.ts delete mode 100644 typescript/src/models/MapString.ts create mode 100644 typescript/src/models/MultiResponseEntity.ts delete mode 100644 typescript/src/models/NamespaceIdentifier.ts delete mode 100644 typescript/src/models/NamespaceSyncModel.ts delete mode 100644 typescript/src/models/NamespaceTextModel.ts create mode 100644 typescript/src/models/OpenEnvClusterInfo.ts create mode 100644 typescript/src/models/OpenItemChangeSets.ts create mode 100644 typescript/src/models/OpenItemDiffs.ts create mode 100644 typescript/src/models/OpenNamespaceIdentifier.ts create mode 100644 typescript/src/models/OpenNamespaceSyncModel.ts create mode 100644 typescript/src/models/OpenNamespaceTextModel.ts create mode 100644 typescript/src/models/OpenReleaseBO.ts delete mode 100644 typescript/src/models/OpenapiV1AppsGet401Response.ts delete mode 100644 typescript/src/models/OpenapiV1AppsPost400Response.ts delete mode 100644 typescript/src/models/OpenapiV1AppsPostRequest.ts delete mode 100644 typescript/src/models/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.ts delete mode 100644 typescript/src/models/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.ts delete mode 100644 typescript/src/models/OpenapiV1EnvsEnvReleasesCompareGet200Response.ts delete mode 100644 typescript/src/models/ReleaseDTO.ts create mode 100644 typescript/src/models/RichResponseEntity.ts diff --git a/apollo-openapi.yaml b/apollo-openapi.yaml index c99fdff2..5054a9ab 100644 --- a/apollo-openapi.yaml +++ b/apollo-openapi.yaml @@ -59,18 +59,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OpenAppDTO' - example: - dataChangeCreatedBy: 'apollo' - dataChangeLastModifiedBy: 'apollo' - dataChangeCreatedTime: '2024-01-15T10:30:00.000Z' - dataChangeLastModifiedTime: '2024-01-15T10:30:00.000Z' - name: 'Sample Application' - appId: 'sample-app' - orgId: 'default' - orgName: 'Default Organization' - ownerName: 'Apollo Admin' - ownerEmail: 'admin@apollo.com' + $ref: '#/components/schemas/SuccessEmptyResponse' headers: {} '400': description: '请求参数错误' @@ -290,6 +279,12 @@ paths: required: true schema: type: string + - name: operator + in: query + description: '操作人用户名' + required: true + schema: + type: string requestBody: content: application/json: @@ -345,6 +340,12 @@ paths: required: true schema: type: string + - name: operator + in: query + description: '操作人用户名' + required: true + schema: + type: string responses: '200': description: '应用删除成功' @@ -454,9 +455,7 @@ paths: content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/OpenEnvClusterInfo' + $ref: '#/components/schemas/MultiResponseEntity' example: - env: 'DEV' clusters: @@ -487,6 +486,12 @@ paths: required: true schema: type: string + - name: operator + in: query + description: '操作人用户名' + required: true + schema: + type: string requestBody: content: application/json: @@ -540,9 +545,7 @@ paths: content: application/json: schema: - type: array - items: - type: string + $ref: '#/components/schemas/MultiResponseEntity' headers: {} '404': description: '应用不存在' @@ -743,7 +746,7 @@ paths: - name: operator in: query description: '操作人用户名' - required: false + required: true schema: type: string responses: @@ -882,6 +885,12 @@ paths: required: true schema: type: string + - name: operator + in: query + description: '操作人用户名' + required: true + schema: + type: string requestBody: content: application/json: @@ -1112,7 +1121,7 @@ paths: - name: operator in: query description: '' - required: false + required: true schema: type: string responses: @@ -1160,6 +1169,12 @@ paths: required: true schema: type: string + - name: operator + in: query + description: '操作人用户名' + required: true + schema: + type: string requestBody: content: application/json: @@ -1402,6 +1417,12 @@ paths: required: true schema: type: string + - name: operator + in: query + description: '操作人用户名' + required: true + schema: + type: string requestBody: content: application/json: @@ -1528,6 +1549,12 @@ paths: required: true schema: type: string + - name: operator + in: query + description: '操作人用户名' + required: true + schema: + type: string responses: '200': description: '配置项更改撤销成功' @@ -1630,6 +1657,12 @@ paths: required: true schema: type: string + - name: operator + in: query + description: '操作人用户名' + required: true + schema: + type: string responses: '200': description: '集群删除成功' @@ -2113,7 +2146,7 @@ paths: - name: operator in: query description: '操作人用户名' - required: false + required: true schema: type: string responses: @@ -2868,6 +2901,12 @@ paths: required: true schema: type: string + - name: operator + in: query + description: '操作人用户名' + required: true + schema: + type: string responses: '200': description: 'AppNamespace删除成功' @@ -3105,6 +3144,12 @@ paths: required: true schema: type: string + - name: operator + in: query + description: '操作人用户名' + required: true + schema: + type: string responses: '200': description: '解除关联成功' @@ -3261,7 +3306,7 @@ paths: - name: operator in: query description: '操作人用户名' - required: false + required: true schema: type: string responses: @@ -3334,7 +3379,7 @@ paths: - name: operator in: query description: 操作人用户名 - required: false + required: true schema: type: string responses: @@ -3397,6 +3442,12 @@ paths: example: 'true' schema: type: boolean + - name: operator + in: query + description: '操作人用户名' + required: true + schema: + type: string requestBody: content: application/json: @@ -3527,7 +3578,7 @@ paths: - name: operator in: query description: 操作人用户名 - required: false + required: true schema: type: string requestBody: @@ -4160,5 +4211,40 @@ components: projectB: darkMode: true + MultiResponseEntity: + type: object + description: A response container holding multiple RichResponseEntity objects + properties: + code: + type: integer + description: Overall HTTP status code + example: 200 + entities: + type: array + description: List of rich response entities + items: + $ref: '#/components/schemas/RichResponseEntity' + required: + - code + - entities + + RichResponseEntity: + type: object + description: A wrapper for a single response entity with code, message, and body + properties: + code: + type: integer + description: HTTP status code + example: 200 + message: + type: object + description: Response message (can be string or object) + example: "OK" + body: + type: object + description: Response payload (generic type T) + required: + - code + - message servers: [] diff --git a/generate.sh b/generate.sh index 7848d03f..45693f81 100755 --- a/generate.sh +++ b/generate.sh @@ -48,13 +48,6 @@ echo "📦 Adding Maven Wrapper to Spring Boot 2 project..." cd "$SPRING_BOOT2_DIR" mvn -N io.takari:maven:wrapper -Dmaven=3.8.6 -# this is for removing illegal symbols generated by a generator. -echo "Cleaning files (trailing spaces, CRLF, EOF newlines)..." -find . -type d \( -name .git -o -name .idea -o -name .mvn -o -name target -o -name build -o -name node_modules \) -prune -o \ - -type f \( -name "*.java" -o -name "*.xml" -o -name "*.properties" -o -name "*.md" -o -name "*.yml" -o -name "*.yaml" -o -name "*.sh" -o -name ".editorconfig" -o -name ".gitignore" -o -name "mvnw" \) -print0 \ -| xargs -0 perl -i -0777 -pe 's/[ \t]+(?=\r?$)//mg; s/\r//g; s/\s*\z/\n/s' -echo "Cleaning files (trailing spaces, CRLF, EOF newlines)... Done!" - cd .. echo "💡 Spring Boot 2 project ready! To start the server, run:" @@ -77,3 +70,10 @@ openapi-generator generate \ --additional-properties=packageName=apollo-openapi,packageVersion=0.0.1 echo "✅ SDK generation complete." + +# this is for removing illegal symbols generated by a generator. +echo "Cleaning files (trailing spaces, CRLF, EOF newlines, wrong spellings)..." +find . -type d \( -name .git -o -name .idea -o -name .mvn -o -name target -o -name build -o -name node_modules \) -prune -o \ + -type f \( -name "*.java" -o -name "*.xml" -o -name "*.properties" -o -name "*.md" -o -name "*.yml" -o -name "*.yaml" -o -name "*.gradle" -o -name "*.sh" -o -name "*.py" -o -name "*.pyi" -o -name "*.ts" -o -name "*.rs" -o -name ".editorconfig" -o -name ".gitignore" -o -name ".npmignore" -o -name "mvnw" -o -name "VERSION" \) -print0 \ +| xargs -0 perl -i -0777 -pe 's/[ \t]+(?=\r?$)//mg; s/\r//g; s/filesystme/filesystem/g; s/\s*\z/\n/s' +echo "Cleaning files (trailing spaces, CRLF, EOF newlines, wrong spellings)... Done!" diff --git a/java-client/.github/workflows/maven.yml b/java-client/.github/workflows/maven.yml index 1ddae886..7f4a68d6 100644 --- a/java-client/.github/workflows/maven.yml +++ b/java-client/.github/workflows/maven.yml @@ -17,11 +17,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [ 17, 21 ] + java: [ '8' ] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v2 - name: Set up JDK - uses: actions/setup-java@v4 + uses: actions/setup-java@v2 with: java-version: ${{ matrix.java }} distribution: 'temurin' diff --git a/java-client/.openapi-generator/FILES b/java-client/.openapi-generator/FILES index 5f140ce6..42d3869a 100644 --- a/java-client/.openapi-generator/FILES +++ b/java-client/.openapi-generator/FILES @@ -7,51 +7,41 @@ api/openapi.yaml build.gradle build.sbt docs/AppManagementApi.md -docs/Change.md -docs/ClusterDTO.md docs/ClusterManagementApi.md -docs/EntityPairKVEntity.md -docs/EnvClusterInfo.md docs/InstanceManagementApi.md -docs/ItemChangeSets.md -docs/ItemDTO.md docs/ItemManagementApi.md docs/KVEntity.md -docs/ListItemDiffs.md -docs/ListReleaseBO.md -docs/MapString.md +docs/MultiResponseEntity.md docs/NamespaceBranchManagementApi.md docs/NamespaceGrayDelReleaseDTO.md -docs/NamespaceIdentifier.md docs/NamespaceManagementApi.md docs/NamespaceReleaseDTO.md -docs/NamespaceSyncModel.md -docs/NamespaceTextModel.md docs/OpenAppDTO.md docs/OpenAppNamespaceDTO.md docs/OpenClusterDTO.md docs/OpenCreateAppDTO.md docs/OpenEnvClusterDTO.md +docs/OpenEnvClusterInfo.md docs/OpenGrayReleaseRuleDTO.md docs/OpenGrayReleaseRuleItemDTO.md docs/OpenInstanceConfigDTO.md docs/OpenInstanceDTO.md +docs/OpenItemChangeSets.md docs/OpenItemDTO.md +docs/OpenItemDiffs.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/OpenapiV1AppsGet401Response.md -docs/OpenapiV1AppsPost400Response.md -docs/OpenapiV1AppsPostRequest.md -docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md -docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md -docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md docs/OrganizationManagementApi.md -docs/ReleaseDTO.md docs/ReleaseManagementApi.md +docs/RichResponseEntity.md git_push.sh gradle.properties gradle/wrapper/gradle-wrapper.jar @@ -87,44 +77,34 @@ src/main/java/org/openapitools/client/auth/Authentication.java src/main/java/org/openapitools/client/auth/HttpBasicAuth.java src/main/java/org/openapitools/client/auth/HttpBearerAuth.java src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java -src/main/java/org/openapitools/client/model/Change.java -src/main/java/org/openapitools/client/model/ClusterDTO.java -src/main/java/org/openapitools/client/model/EntityPairKVEntity.java -src/main/java/org/openapitools/client/model/EnvClusterInfo.java -src/main/java/org/openapitools/client/model/ItemChangeSets.java -src/main/java/org/openapitools/client/model/ItemDTO.java src/main/java/org/openapitools/client/model/KVEntity.java -src/main/java/org/openapitools/client/model/ListItemDiffs.java -src/main/java/org/openapitools/client/model/ListReleaseBO.java -src/main/java/org/openapitools/client/model/MapString.java +src/main/java/org/openapitools/client/model/MultiResponseEntity.java src/main/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTO.java -src/main/java/org/openapitools/client/model/NamespaceIdentifier.java src/main/java/org/openapitools/client/model/NamespaceReleaseDTO.java -src/main/java/org/openapitools/client/model/NamespaceSyncModel.java -src/main/java/org/openapitools/client/model/NamespaceTextModel.java src/main/java/org/openapitools/client/model/OpenAppDTO.java src/main/java/org/openapitools/client/model/OpenAppNamespaceDTO.java src/main/java/org/openapitools/client/model/OpenClusterDTO.java src/main/java/org/openapitools/client/model/OpenCreateAppDTO.java src/main/java/org/openapitools/client/model/OpenEnvClusterDTO.java +src/main/java/org/openapitools/client/model/OpenEnvClusterInfo.java src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleDTO.java src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTO.java src/main/java/org/openapitools/client/model/OpenInstanceConfigDTO.java src/main/java/org/openapitools/client/model/OpenInstanceDTO.java +src/main/java/org/openapitools/client/model/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/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/OpenapiV1AppsGet401Response.java -src/main/java/org/openapitools/client/model/OpenapiV1AppsPost400Response.java -src/main/java/org/openapitools/client/model/OpenapiV1AppsPostRequest.java -src/main/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.java -src/main/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.java -src/main/java/org/openapitools/client/model/OpenapiV1EnvsEnvReleasesCompareGet200Response.java -src/main/java/org/openapitools/client/model/ReleaseDTO.java +src/main/java/org/openapitools/client/model/RichResponseEntity.java src/test/java/org/openapitools/client/api/AppManagementApiTest.java src/test/java/org/openapitools/client/api/ClusterManagementApiTest.java src/test/java/org/openapitools/client/api/InstanceManagementApiTest.java @@ -133,41 +113,31 @@ src/test/java/org/openapitools/client/api/NamespaceBranchManagementApiTest.java src/test/java/org/openapitools/client/api/NamespaceManagementApiTest.java src/test/java/org/openapitools/client/api/OrganizationManagementApiTest.java src/test/java/org/openapitools/client/api/ReleaseManagementApiTest.java -src/test/java/org/openapitools/client/model/ChangeTest.java -src/test/java/org/openapitools/client/model/ClusterDTOTest.java -src/test/java/org/openapitools/client/model/EntityPairKVEntityTest.java -src/test/java/org/openapitools/client/model/EnvClusterInfoTest.java -src/test/java/org/openapitools/client/model/ItemChangeSetsTest.java -src/test/java/org/openapitools/client/model/ItemDTOTest.java src/test/java/org/openapitools/client/model/KVEntityTest.java -src/test/java/org/openapitools/client/model/ListItemDiffsTest.java -src/test/java/org/openapitools/client/model/ListReleaseBOTest.java -src/test/java/org/openapitools/client/model/MapStringTest.java +src/test/java/org/openapitools/client/model/MultiResponseEntityTest.java src/test/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTOTest.java -src/test/java/org/openapitools/client/model/NamespaceIdentifierTest.java src/test/java/org/openapitools/client/model/NamespaceReleaseDTOTest.java -src/test/java/org/openapitools/client/model/NamespaceSyncModelTest.java -src/test/java/org/openapitools/client/model/NamespaceTextModelTest.java src/test/java/org/openapitools/client/model/OpenAppDTOTest.java src/test/java/org/openapitools/client/model/OpenAppNamespaceDTOTest.java src/test/java/org/openapitools/client/model/OpenClusterDTOTest.java src/test/java/org/openapitools/client/model/OpenCreateAppDTOTest.java src/test/java/org/openapitools/client/model/OpenEnvClusterDTOTest.java +src/test/java/org/openapitools/client/model/OpenEnvClusterInfoTest.java src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleDTOTest.java src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTOTest.java src/test/java/org/openapitools/client/model/OpenInstanceConfigDTOTest.java src/test/java/org/openapitools/client/model/OpenInstanceDTOTest.java +src/test/java/org/openapitools/client/model/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/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/OpenapiV1AppsGet401ResponseTest.java -src/test/java/org/openapitools/client/model/OpenapiV1AppsPost400ResponseTest.java -src/test/java/org/openapitools/client/model/OpenapiV1AppsPostRequestTest.java -src/test/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseTest.java -src/test/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400ResponseTest.java -src/test/java/org/openapitools/client/model/OpenapiV1EnvsEnvReleasesCompareGet200ResponseTest.java -src/test/java/org/openapitools/client/model/ReleaseDTOTest.java +src/test/java/org/openapitools/client/model/RichResponseEntityTest.java diff --git a/java-client/.openapi-generator/VERSION b/java-client/.openapi-generator/VERSION index 368fd8fd..826f5ce0 100644 --- a/java-client/.openapi-generator/VERSION +++ b/java-client/.openapi-generator/VERSION @@ -1 +1 @@ -7.15.0 +6.6.0 diff --git a/java-client/README.md b/java-client/README.md index 406ea57d..c7c1bed3 100644 --- a/java-client/README.md +++ b/java-client/README.md @@ -2,37 +2,23 @@ Apollo OpenAPI - API version: 1.0.0 - - Build date: 2025-09-14T17:08:15.997407+08:00[Asia/Shanghai] - - Generator version: 7.15.0 + - Build date: 2025-10-07T09:56:26.447+08:00[Asia/Shanghai] -Apollo配置中心OpenAPI接口文档 +

Apollo配置中心OpenAPI接口文档

-## 认证方式 +

认证方式

+

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

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

获取 Token 的方式:

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

使用示例

+
curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\
+-H \"Authorization: your_token_here\"
@@ -113,14 +99,14 @@ import org.openapitools.client.ApiClient; import org.openapitools.client.ApiException; import org.openapitools.client.Configuration; import org.openapitools.client.auth.*; -import org.openapitools.client.model.*; +import org.openapitools.client.models.*; import org.openapitools.client.api.AppManagementApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost"); - + // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); ApiKeyAuth.setApiKey("YOUR API KEY"); @@ -128,13 +114,12 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String appId = "appId_example"; // String | - String namespaceName = "namespaceName_example"; // String | + OpenCreateAppDTO openCreateAppDTO = new OpenCreateAppDTO(); // OpenCreateAppDTO | try { - Object result = apiInstance.openapiV1AppsAppIdAppnamespacesNamespaceNameDelete(appId, namespaceName); + Object result = apiInstance.createApp(openCreateAppDTO); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#openapiV1AppsAppIdAppnamespacesNamespaceNameDelete"); + System.err.println("Exception when calling AppManagementApi#createApp"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -151,108 +136,98 @@ All URIs are relative to *http://localhost* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AppManagementApi* | [**openapiV1AppsAppIdAppnamespacesNamespaceNameDelete**](docs/AppManagementApi.md#openapiV1AppsAppIdAppnamespacesNamespaceNameDelete) | **DELETE** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 删除AppNamespace -*AppManagementApi* | [**openapiV1AppsAppIdDelete**](docs/AppManagementApi.md#openapiV1AppsAppIdDelete) | **DELETE** /openapi/v1/apps/{appId} | 删除应用 -*AppManagementApi* | [**openapiV1AppsAppIdEnvClustersGet**](docs/AppManagementApi.md#openapiV1AppsAppIdEnvClustersGet) | **GET** /openapi/v1/apps/{appId}/env-clusters | 获取应用的环境集群信息 -*AppManagementApi* | [**openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete**](docs/AppManagementApi.md#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete) | **DELETE** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links | 删除关联的Namespace -*AppManagementApi* | [**openapiV1AppsAppIdGet**](docs/AppManagementApi.md#openapiV1AppsAppIdGet) | **GET** /openapi/v1/apps/{appId} | 获取单个应用信息 -*AppManagementApi* | [**openapiV1AppsAppIdMissEnvsGet**](docs/AppManagementApi.md#openapiV1AppsAppIdMissEnvsGet) | **GET** /openapi/v1/apps/{appId}/miss_envs | 查找缺失的环境 -*AppManagementApi* | [**openapiV1AppsAppIdNamespacesReleasesStatusGet**](docs/AppManagementApi.md#openapiV1AppsAppIdNamespacesReleasesStatusGet) | **GET** /openapi/v1/apps/{appId}/namespaces/releases/status | 获取应用下所有Namespace的发布状态 -*AppManagementApi* | [**openapiV1AppsAppIdNavtreeGet**](docs/AppManagementApi.md#openapiV1AppsAppIdNavtreeGet) | **GET** /openapi/v1/apps/{appId}/navtree | 获取应用导航树 -*AppManagementApi* | [**openapiV1AppsAppIdPut**](docs/AppManagementApi.md#openapiV1AppsAppIdPut) | **PUT** /openapi/v1/apps/{appId} | 更新应用 -*AppManagementApi* | [**openapiV1AppsBySelfGet**](docs/AppManagementApi.md#openapiV1AppsBySelfGet) | **GET** /openapi/v1/apps/by-self | 获取当前Consumer的应用列表(分页) -*AppManagementApi* | [**openapiV1AppsEnvsEnvPost**](docs/AppManagementApi.md#openapiV1AppsEnvsEnvPost) | **POST** /openapi/v1/apps/envs/{env} | 在指定环境创建应用 -*AppManagementApi* | [**openapiV1AppsGet**](docs/AppManagementApi.md#openapiV1AppsGet) | **GET** /openapi/v1/apps | 获取当前Consumer授权的应用列表 -*AppManagementApi* | [**openapiV1AppsPost**](docs/AppManagementApi.md#openapiV1AppsPost) | **POST** /openapi/v1/apps | 创建应用 -*ClusterManagementApi* | [**openapiV1AppsAppIdClustersClusterNameGet**](docs/ClusterManagementApi.md#openapiV1AppsAppIdClustersClusterNameGet) | **GET** /openapi/v1/apps/{appId}/clusters/{clusterName} | 获取指定集群信息 -*ClusterManagementApi* | [**openapiV1AppsAppIdClustersPost**](docs/ClusterManagementApi.md#openapiV1AppsAppIdClustersPost) | **POST** /openapi/v1/apps/{appId}/clusters | 创建集群 -*ClusterManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete**](docs/ClusterManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 删除集群 -*ClusterManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet**](docs/ClusterManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches | 获取命名空间分支信息 -*ClusterManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet**](docs/ClusterManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} | 获取指定的Namespace -*InstanceManagementApi* | [**openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet**](docs/InstanceManagementApi.md#openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet) | **GET** /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 获取命名空间下的实例数量 -*InstanceManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet**](docs/InstanceManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 查询不在指定发布版本中的实例 -*InstanceManagementApi* | [**openapiV1EnvsEnvReleasesReleaseIdInstancesGet**](docs/InstanceManagementApi.md#openapiV1EnvsEnvReleasesReleaseIdInstancesGet) | **GET** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) -*ItemManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete**](docs/ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key删除配置项 -*ItemManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet**](docs/ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过查询参数获取配置项(支持编码的key) -*ItemManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut**](docs/ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key更新配置项 -*ItemManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut**](docs/ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate | 通过文本批量修改配置项 -*ItemManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost**](docs/ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare | 对比命名空间配置差异 -*ItemManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet**](docs/ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 获取命名空间下的配置项列表 -*ItemManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete**](docs/ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 删除配置项 -*ItemManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet**](docs/ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 获取单个配置项 -*ItemManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut**](docs/ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 更新配置项 -*ItemManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost**](docs/ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 创建新的配置项 -*ItemManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost**](docs/ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert | 撤销配置项更改 -*ItemManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost**](docs/ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync | 同步配置项到多个命名空间 -*ItemManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost**](docs/ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate | 验证配置文本语法 -*NamespaceBranchManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost**](docs/NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch | 创建命名空间分支 -*NamespaceBranchManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete**](docs/NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 删除命名空间分支 -*NamespaceBranchManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost**](docs/NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases | 创建灰度删除发布 -*NamespaceBranchManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet**](docs/NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules | 获取分支灰度发布规则 -*NamespaceBranchManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut**](docs/NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules | 更新分支灰度发布规则 -*NamespaceBranchManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet**](docs/NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items | 获取分支下的配置项 -*NamespaceBranchManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost**](docs/NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge | 合并分支 -*NamespaceBranchManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch**](docs/NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch) | **PATCH** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 合并分支到主分支 -*NamespaceBranchManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost**](docs/NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases | 创建灰度发布 -*NamespaceManagementApi* | [**openapiV1AppnamespacesGet**](docs/NamespaceManagementApi.md#openapiV1AppnamespacesGet) | **GET** /openapi/v1/appnamespaces | 获取所有公共AppNamespace -*NamespaceManagementApi* | [**openapiV1AppsAppIdAppnamespacesGet**](docs/NamespaceManagementApi.md#openapiV1AppsAppIdAppnamespacesGet) | **GET** /openapi/v1/apps/{appId}/appnamespaces | 获取指定应用的AppNamespace -*NamespaceManagementApi* | [**openapiV1AppsAppIdAppnamespacesNamespaceNameGet**](docs/NamespaceManagementApi.md#openapiV1AppsAppIdAppnamespacesNamespaceNameGet) | **GET** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 获取指定的AppNamespace -*NamespaceManagementApi* | [**openapiV1AppsAppIdAppnamespacesPost**](docs/NamespaceManagementApi.md#openapiV1AppsAppIdAppnamespacesPost) | **POST** /openapi/v1/apps/{appId}/appnamespaces | 创建AppNamespace -*NamespaceManagementApi* | [**openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet**](docs/NamespaceManagementApi.md#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check | 检查缺失的Namespace -*NamespaceManagementApi* | [**openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet**](docs/NamespaceManagementApi.md#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association | 获取关联的公共Namespace -*NamespaceManagementApi* | [**openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet**](docs/NamespaceManagementApi.md#openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet) | **GET** /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances | 获取公共AppNamespace的所有实例 -*NamespaceManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet**](docs/NamespaceManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces | 获取指定集群下的所有Namespace -*NamespaceManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet**](docs/NamespaceManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock | 获取Namespace的锁状态 -*OrganizationManagementApi* | [**openapiV1OrganizationsGet**](docs/OrganizationManagementApi.md#openapiV1OrganizationsGet) | **GET** /openapi/v1/organizations | 获取所有组织信息 -*ReleaseManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet**](docs/ReleaseManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active | 获取活跃发布(分页) -*ReleaseManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet**](docs/ReleaseManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all | 获取所有发布(分页) -*ReleaseManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet**](docs/ReleaseManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest | 获取最新活跃发布 -*ReleaseManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost**](docs/ReleaseManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases | 创建发布 -*ReleaseManagementApi* | [**openapiV1EnvsEnvReleasesCompareGet**](docs/ReleaseManagementApi.md#openapiV1EnvsEnvReleasesCompareGet) | **GET** /openapi/v1/envs/{env}/releases/compare | 对比发布 -*ReleaseManagementApi* | [**openapiV1EnvsEnvReleasesReleaseIdGet**](docs/ReleaseManagementApi.md#openapiV1EnvsEnvReleasesReleaseIdGet) | **GET** /openapi/v1/envs/{env}/releases/{releaseId} | 获取发布详情 -*ReleaseManagementApi* | [**openapiV1EnvsEnvReleasesReleaseIdRollbackPut**](docs/ReleaseManagementApi.md#openapiV1EnvsEnvReleasesReleaseIdRollbackPut) | **PUT** /openapi/v1/envs/{env}/releases/{releaseId}/rollback | 回滚发布 +*AppManagementApi* | [**createApp**](docs/AppManagementApi.md#createApp) | **POST** /openapi/v1/apps | 创建应用 (original openapi) +*AppManagementApi* | [**createAppInEnv**](docs/AppManagementApi.md#createAppInEnv) | **POST** /openapi/v1/apps/envs/{env} | 在指定环境创建应用(new added) +*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* | [**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* | [**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) +*InstanceManagementApi* | [**getInstanceCountByNamespace**](docs/InstanceManagementApi.md#getInstanceCountByNamespace) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 获取命名空间下的实例数量 (original openapi) +*InstanceManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet**](docs/InstanceManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int | 查询不在指定发布版本中的实例 (new added) +*InstanceManagementApi* | [**openapiV1EnvsEnvReleasesReleaseIdInstancesGet**](docs/InstanceManagementApi.md#openapiV1EnvsEnvReleasesReleaseIdInstancesGet) | **GET** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) (new added) +*ItemManagementApi* | [**batchUpdateItemsByText**](docs/ItemManagementApi.md#batchUpdateItemsByText) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate | 通过文本批量修改配置项 (new added) +*ItemManagementApi* | [**compareItems**](docs/ItemManagementApi.md#compareItems) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare | 对比命名空间配置差异 (new added) +*ItemManagementApi* | [**createItem**](docs/ItemManagementApi.md#createItem) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 创建新的配置项 (original openapi) +*ItemManagementApi* | [**deleteItem**](docs/ItemManagementApi.md#deleteItem) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 删除配置项 (original openapi) +*ItemManagementApi* | [**deleteItemByEncodedKey**](docs/ItemManagementApi.md#deleteItemByEncodedKey) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key删除配置项 (original openapi) +*ItemManagementApi* | [**findItemsByNamespace**](docs/ItemManagementApi.md#findItemsByNamespace) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 获取命名空间下的配置项列表 (original openapi) +*ItemManagementApi* | [**getBranchItems**](docs/ItemManagementApi.md#getBranchItems) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items | 获取分支下的配置项 (new added) +*ItemManagementApi* | [**getItem**](docs/ItemManagementApi.md#getItem) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 获取单个配置项 (original openapi) +*ItemManagementApi* | [**getItemByEncodedKey**](docs/ItemManagementApi.md#getItemByEncodedKey) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过查询参数获取配置项(支持编码的key) (original openapi) +*ItemManagementApi* | [**revertItems**](docs/ItemManagementApi.md#revertItems) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert | 撤销配置项更改 (new added) +*ItemManagementApi* | [**syncItems**](docs/ItemManagementApi.md#syncItems) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync | 同步配置项到多个命名空间 (new added) +*ItemManagementApi* | [**updateItem**](docs/ItemManagementApi.md#updateItem) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 更新配置项 (original openapi) +*ItemManagementApi* | [**updateItemByEncodedKey**](docs/ItemManagementApi.md#updateItemByEncodedKey) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key更新配置项 (original openapi) +*ItemManagementApi* | [**validateItems**](docs/ItemManagementApi.md#validateItems) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate | 验证配置文本语法 (new added) +*NamespaceBranchManagementApi* | [**createBranch**](docs/NamespaceBranchManagementApi.md#createBranch) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches | 创建命名空间分支 (original openapi) +*NamespaceBranchManagementApi* | [**deleteBranch**](docs/NamespaceBranchManagementApi.md#deleteBranch) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 删除命名空间分支 (original openapi) +*NamespaceBranchManagementApi* | [**findBranch**](docs/NamespaceBranchManagementApi.md#findBranch) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches | 获取命名空间分支信息 (original openapi) +*NamespaceBranchManagementApi* | [**getBranchGrayRules**](docs/NamespaceBranchManagementApi.md#getBranchGrayRules) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules | 获取分支灰度发布规则 (original openapi) +*NamespaceBranchManagementApi* | [**mergeBranch**](docs/NamespaceBranchManagementApi.md#mergeBranch) | **PATCH** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 合并分支到主分支 (new added) +*NamespaceBranchManagementApi* | [**updateBranchRules**](docs/NamespaceBranchManagementApi.md#updateBranchRules) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules | 更新分支灰度发布规则 (original openapi) +*NamespaceManagementApi* | [**checkNamespaceIntegrity**](docs/NamespaceManagementApi.md#checkNamespaceIntegrity) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check | 检查缺失的Namespace (new added) +*NamespaceManagementApi* | [**createNamespace**](docs/NamespaceManagementApi.md#createNamespace) | **POST** /openapi/v1/apps/{appId}/appnamespaces | 创建AppNamespace (original openapi) +*NamespaceManagementApi* | [**deleteAppNamespace**](docs/NamespaceManagementApi.md#deleteAppNamespace) | **DELETE** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 删除AppNamespace (new added) +*NamespaceManagementApi* | [**deleteNamespaceLinks**](docs/NamespaceManagementApi.md#deleteNamespaceLinks) | **DELETE** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links | 删除关联的Namespace (new added) +*NamespaceManagementApi* | [**findNamespaces**](docs/NamespaceManagementApi.md#findNamespaces) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces | 获取指定集群下的所有Namespace (original openapi) +*NamespaceManagementApi* | [**getAppNamespace**](docs/NamespaceManagementApi.md#getAppNamespace) | **GET** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 获取指定的AppNamespace (new added) +*NamespaceManagementApi* | [**getAppNamespaces**](docs/NamespaceManagementApi.md#getAppNamespaces) | **GET** /openapi/v1/appnamespaces | 获取所有公共AppNamespace (new added) +*NamespaceManagementApi* | [**getAppNamespacesByApp**](docs/NamespaceManagementApi.md#getAppNamespacesByApp) | **GET** /openapi/v1/apps/{appId}/appnamespaces | 获取指定应用的AppNamespace (new added) +*NamespaceManagementApi* | [**getNamespaceLock**](docs/NamespaceManagementApi.md#getNamespaceLock) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock | 获取Namespace的锁状态 (original openapi) +*NamespaceManagementApi* | [**getNamespacesReleaseStatus**](docs/NamespaceManagementApi.md#getNamespacesReleaseStatus) | **GET** /openapi/v1/apps/{appId}/namespaces/releases/status | 获取应用下所有Namespace的发布状态 (new added) +*NamespaceManagementApi* | [**getPublicAppNamespaceInstances**](docs/NamespaceManagementApi.md#getPublicAppNamespaceInstances) | **GET** /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances | 获取公共AppNamespace的所有实例 (new added) +*NamespaceManagementApi* | [**getPublicNamespaceAssociation**](docs/NamespaceManagementApi.md#getPublicNamespaceAssociation) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association | 获取关联的公共Namespace (new added) +*NamespaceManagementApi* | [**loadNamespace**](docs/NamespaceManagementApi.md#loadNamespace) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} | 获取指定的Namespace (original openapi) +*OrganizationManagementApi* | [**getOrganization**](docs/OrganizationManagementApi.md#getOrganization) | **GET** /openapi/v1/organizations | 获取所有组织信息 (original openapi) +*ReleaseManagementApi* | [**createGrayDelRelease**](docs/ReleaseManagementApi.md#createGrayDelRelease) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases | 创建灰度删除发布 (original openapi) +*ReleaseManagementApi* | [**createGrayRelease**](docs/ReleaseManagementApi.md#createGrayRelease) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases | 创建灰度发布 (original openapi) +*ReleaseManagementApi* | [**createRelease**](docs/ReleaseManagementApi.md#createRelease) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases | 创建发布 (original openapi) +*ReleaseManagementApi* | [**findActiveReleases**](docs/ReleaseManagementApi.md#findActiveReleases) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active | 获取活跃发布(分页) (new added) +*ReleaseManagementApi* | [**findAllReleases**](docs/ReleaseManagementApi.md#findAllReleases) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all | 获取所有发布(分页) (new added) +*ReleaseManagementApi* | [**getReleaseById**](docs/ReleaseManagementApi.md#getReleaseById) | **GET** /openapi/v1/envs/{env}/releases/{releaseId} | 获取发布详情 (new added) +*ReleaseManagementApi* | [**loadLatestActiveRelease**](docs/ReleaseManagementApi.md#loadLatestActiveRelease) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest | 获取最新活跃发布 (original openapi) +*ReleaseManagementApi* | [**merge**](docs/ReleaseManagementApi.md#merge) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge | 合并分支 (original openapi) +*ReleaseManagementApi* | [**rollback**](docs/ReleaseManagementApi.md#rollback) | **PUT** /openapi/v1/envs/{env}/releases/{releaseId}/rollback | 回滚发布 (original openapi) ## Documentation for Models - - [Change](docs/Change.md) - - [ClusterDTO](docs/ClusterDTO.md) - - [EntityPairKVEntity](docs/EntityPairKVEntity.md) - - [EnvClusterInfo](docs/EnvClusterInfo.md) - - [ItemChangeSets](docs/ItemChangeSets.md) - - [ItemDTO](docs/ItemDTO.md) - [KVEntity](docs/KVEntity.md) - - [ListItemDiffs](docs/ListItemDiffs.md) - - [ListReleaseBO](docs/ListReleaseBO.md) - - [MapString](docs/MapString.md) + - [MultiResponseEntity](docs/MultiResponseEntity.md) - [NamespaceGrayDelReleaseDTO](docs/NamespaceGrayDelReleaseDTO.md) - - [NamespaceIdentifier](docs/NamespaceIdentifier.md) - [NamespaceReleaseDTO](docs/NamespaceReleaseDTO.md) - - [NamespaceSyncModel](docs/NamespaceSyncModel.md) - - [NamespaceTextModel](docs/NamespaceTextModel.md) - [OpenAppDTO](docs/OpenAppDTO.md) - [OpenAppNamespaceDTO](docs/OpenAppNamespaceDTO.md) - [OpenClusterDTO](docs/OpenClusterDTO.md) - [OpenCreateAppDTO](docs/OpenCreateAppDTO.md) - [OpenEnvClusterDTO](docs/OpenEnvClusterDTO.md) + - [OpenEnvClusterInfo](docs/OpenEnvClusterInfo.md) - [OpenGrayReleaseRuleDTO](docs/OpenGrayReleaseRuleDTO.md) - [OpenGrayReleaseRuleItemDTO](docs/OpenGrayReleaseRuleItemDTO.md) - [OpenInstanceConfigDTO](docs/OpenInstanceConfigDTO.md) - [OpenInstanceDTO](docs/OpenInstanceDTO.md) + - [OpenItemChangeSets](docs/OpenItemChangeSets.md) - [OpenItemDTO](docs/OpenItemDTO.md) + - [OpenItemDiffs](docs/OpenItemDiffs.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) - - [OpenapiV1AppsGet401Response](docs/OpenapiV1AppsGet401Response.md) - - [OpenapiV1AppsPost400Response](docs/OpenapiV1AppsPost400Response.md) - - [OpenapiV1AppsPostRequest](docs/OpenapiV1AppsPostRequest.md) - - [OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response](docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md) - - [OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response](docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md) - - [OpenapiV1EnvsEnvReleasesCompareGet200Response](docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md) - - [ReleaseDTO](docs/ReleaseDTO.md) + - [RichResponseEntity](docs/RichResponseEntity.md) @@ -273,6 +248,3 @@ Authentication schemes defined for the API: It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. ## Author - - - diff --git a/java-client/api/openapi.yaml b/java-client/api/openapi.yaml index 28267cc2..83430ba8 100644 --- a/java-client/api/openapi.yaml +++ b/java-client/api/openapi.yaml @@ -1,34 +1,21 @@ openapi: 3.0.1 info: description: | - Apollo配置中心OpenAPI接口文档 +

Apollo配置中心OpenAPI接口文档

- ## 认证方式 +

认证方式

+

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

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

获取 Token 的方式:

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

使用示例

+
curl -X GET "http://localhost:8070/openapi/v1/apps" \
+    -H "Authorization: your_token_here"
title: Apollo OpenAPI version: 1.0.0 servers: @@ -56,13 +43,14 @@ paths: /openapi/v1/apps: get: deprecated: false - description: GET /openapi/v1/apps?authorized=true + description: POST /openapi/v1/apps + operationId: findApps parameters: - - description: 是否只返回授权的应用 - example: "true" + - description: 查找应用 + example: "123" explode: true in: query - name: authorized + name: appIds required: false schema: type: string @@ -94,37 +82,70 @@ paths: ownerEmail: dev@company.com schema: items: - $ref: "#/components/schemas/OpenAppDTO" + $ref: '#/components/schemas/OpenAppDTO' type: array - description: 成功获取授权应用列表 + description: 成功获取应用列表 "401": content: application/json: - example: - message: Unauthorized schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 未授权访问 - summary: 获取当前Consumer授权的应用列表 + summary: 查找应用 (original openapi) tags: - App Management - x-accepts: - - application/json + x-accepts: application/json post: deprecated: false description: POST /openapi/v1/apps + operationId: createApp requestBody: content: application/json: schema: - $ref: "#/components/schemas/_openapi_v1_apps_post_request" + $ref: '#/components/schemas/OpenCreateAppDTO' required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessEmptyResponse' + description: 应用创建成功 + "400": + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object + description: 请求参数错误 + "403": + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object + description: 权限不足 + summary: 创建应用 (original openapi) + tags: + - App Management + x-content-type: application/json + x-accepts: application/json + /openapi/v1/apps/authorized: + get: + deprecated: false + description: GET /openapi/v1/apps/authorized + operationId: findAppsAuthorized responses: "200": content: application/json: example: - dataChangeCreatedBy: apollo + - dataChangeCreatedBy: apollo dataChangeLastModifiedBy: apollo dataChangeCreatedTime: 2024-01-15T10:30:00.000Z dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z @@ -134,38 +155,40 @@ paths: orgName: Default Organization ownerName: Apollo Admin ownerEmail: admin@apollo.com + - dataChangeCreatedBy: apollo + dataChangeLastModifiedBy: apollo + dataChangeCreatedTime: 2024-01-10T14:20:00.000Z + dataChangeLastModifiedTime: 2024-01-12T16:45:00.000Z + name: User Service + appId: user-service + orgId: microservices + orgName: Microservices Team + ownerName: Dev Team + ownerEmail: dev@company.com schema: - $ref: "#/components/schemas/OpenAppDTO" - description: 应用创建成功 - "400": - content: - application/json: - example: - message: App is null - exception: BadRequestException - schema: - $ref: "#/components/schemas/_openapi_v1_apps_post_400_response" - description: 请求参数错误 - "403": + items: + $ref: '#/components/schemas/OpenAppDTO' + type: array + description: 成功获取授权应用列表 + "401": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 权限不足 - summary: 创建应用 + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object + description: 未授权访问 + summary: 获取当前Consumer授权的应用列表 (original openapi) tags: - App Management - x-content-type: application/json - x-accepts: - - application/json - /openapi/v1/apps/{appId}/env-clusters: + x-accepts: application/json + /openapi/v1/apps/{appId}/envclusters: get: deprecated: false - description: "GET /openapi/v1/apps/{appId}/env-clusters" + description: "GET /openapi/v1/apps/{appId}/envclusters" + operationId: getEnvClusterInfo parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -191,28 +214,28 @@ paths: - backup schema: items: - $ref: "#/components/schemas/OpenEnvClusterDTO" + $ref: '#/components/schemas/OpenEnvClusterDTO' type: array description: 成功获取应用环境集群信息 "404": content: application/json: - example: - message: "App not found: invalid-app-id" schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 应用不存在 - summary: 获取应用的环境集群信息 + summary: 获取应用的环境集群信息 (original openapi) tags: - App Management - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/apps/{appId}: delete: deprecated: false description: "DELETE /openapi/v1/apps/{appId}" + operationId: deleteApp parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -220,39 +243,47 @@ paths: schema: type: string style: simple + - description: 操作人用户名 + explode: true + in: query + name: operator + required: true + schema: + type: string + style: form responses: "200": content: application/json: - example: - message: App deleted successfully schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' + type: object description: 应用删除成功 "403": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 权限不足,需要超级管理员权限 "404": content: application/json: - example: - message: "App not found: invalid-app-id" schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 应用不存在 - summary: 删除应用 + summary: 删除应用(new added) tags: - App Management - x-accepts: - - application/json + x-accepts: application/json get: deprecated: false description: "GET /openapi/v1/apps/{appId}" + operationId: getApp parameters: - description: "" explode: false @@ -278,26 +309,26 @@ paths: ownerName: Apollo Admin ownerEmail: admin@apollo.com schema: - $ref: "#/components/schemas/OpenAppDTO" + $ref: '#/components/schemas/OpenAppDTO' description: 成功获取应用信息 "404": content: application/json: - example: - message: "App not found: invalid-app-id" schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 应用不存在 - summary: 获取单个应用信息 + summary: 获取单个应用信息(new added) tags: - App Management - x-accepts: - - application/json + x-accepts: application/json put: deprecated: false description: "PUT /openapi/v1/apps/{appId}" + operationId: updateApp parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -305,20 +336,19 @@ paths: schema: type: string style: simple + - description: 操作人用户名 + explode: true + in: query + name: operator + required: true + schema: + type: string + style: form requestBody: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/OpenAppDTO" - description: "" - required: - - appId - - name - - orgId - - orgName - - ownerName - type: object + $ref: '#/components/schemas/OpenAppDTO' required: true responses: "200": @@ -336,34 +366,53 @@ paths: ownerName: Apollo Admin ownerEmail: admin@apollo.com schema: - $ref: "#/components/schemas/OpenAppDTO" - description: "" + $ref: '#/components/schemas/OpenAppDTO' + description: 应用更新成功 "400": content: application/json: - example: - message: Invalid app data schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 请求参数错误 "403": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 权限不足 - summary: 更新应用 + summary: 更新应用(new added) tags: - App Management x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/apps/by-self: get: deprecated: false description: GET /openapi/v1/apps/by-self + operationId: getAppsBySelf + parameters: + - description: 页数 + explode: true + in: query + name: page + required: true + schema: + minimum: 0 + type: integer + style: form + - description: 页大小 + explode: true + in: query + name: size + required: true + schema: + minimum: 0 + type: integer + style: form responses: "200": content: @@ -391,28 +440,28 @@ paths: ownerEmail: business@company.com schema: items: - $ref: "#/components/schemas/OpenAppDTO" + $ref: '#/components/schemas/OpenAppDTO' type: array description: 成功获取Consumer的应用列表 "401": content: application/json: - example: - message: Unauthorized schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 未授权访问 - summary: 获取当前Consumer的应用列表(分页) + summary: 获取当前Consumer的应用列表(分页)(new added) tags: - App Management - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/apps/{appId}/navtree: get: deprecated: false description: "GET /openapi/v1/apps/{appId}/navtree" + operationId: getAppNavTree parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -439,21 +488,19 @@ paths: parentClusterId: 0 comment: Default cluster schema: - items: - $ref: "#/components/schemas/EnvClusterInfo" - type: array + $ref: '#/components/schemas/MultiResponseEntity' description: 成功获取应用导航树 - summary: 获取应用导航树 + summary: 获取应用导航树(new added) tags: - App Management - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/apps/envs/{env}: post: deprecated: false description: "POST /openapi/v1/apps/envs/{env}" + operationId: createAppInEnv parameters: - - description: "" + - description: 环境标识,例如 DEV、FAT、UAT、PROD explode: false in: path name: env @@ -461,58 +508,57 @@ paths: schema: type: string style: simple + - description: 操作人用户名 + explode: true + in: query + name: operator + required: true + schema: + type: string + style: form requestBody: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/OpenAppDTO" - description: "" - required: - - appId - - name - - orgId - - orgName - - ownerName - type: object + $ref: '#/components/schemas/OpenAppDTO' required: true responses: "200": content: application/json: - example: - message: App created in environment successfully schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' + type: object description: 应用在指定环境创建成功 "400": content: application/json: - example: - message: appId should not be null or empty schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 请求参数错误 "403": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 权限不足 - summary: 在指定环境创建应用 + summary: 在指定环境创建应用(new added) tags: - App Management x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/apps/{appId}/miss_envs: get: deprecated: false description: "GET /openapi/v1/apps/{appId}/miss_envs" + operationId: findMissEnvs parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -524,33 +570,28 @@ paths: "200": content: application/json: - example: - - UAT - - PRO schema: - items: - type: string - type: array + $ref: '#/components/schemas/MultiResponseEntity' description: 成功获取应用缺失的环境列表 "404": content: application/json: - example: - message: App not found schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 应用不存在 - summary: 查找缺失的环境 + summary: 查找缺失的环境(new added) tags: - App Management - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}: delete: deprecated: false - description: "DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" + description: "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" + operationId: deleteItem parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -558,7 +599,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -566,7 +607,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -574,7 +615,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -582,7 +623,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 配置项键名 explode: false in: path name: key @@ -590,7 +631,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 操作人用户名 explode: true in: query name: operator @@ -603,19 +644,20 @@ paths: content: application/json: schema: - properties: {} + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' type: object - description: "" - summary: 删除配置项 + description: 配置项删除成功 + summary: 删除配置项 (original openapi) tags: - Item Management - x-accepts: - - application/json + x-accepts: application/json get: deprecated: false - description: "GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" + description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" + operationId: getItem parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -623,7 +665,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -631,7 +673,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -639,7 +681,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -647,7 +689,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 配置项键名 explode: false in: path name: key @@ -669,24 +711,24 @@ paths: value: "8080" comment: 服务器端口配置 schema: - $ref: "#/components/schemas/OpenItemDTO" + $ref: '#/components/schemas/OpenItemDTO' description: 成功获取配置项 "404": content: application/json: - example: - message: Configuration item not found schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 配置项不存在 - summary: 获取单个配置项 + summary: 获取单个配置项 (original openapi) tags: - Item Management - x-accepts: - - application/json + x-accepts: application/json put: deprecated: false - description: "PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" + description: "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" + operationId: updateItem parameters: - description: "" explode: false @@ -696,7 +738,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -704,7 +746,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -712,7 +754,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -735,67 +777,60 @@ paths: name: createIfNotExists required: true schema: + default: false type: boolean style: form requestBody: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/OpenItemDTO" - description: "" - required: - - dataChangeLastModifiedBy - - key - - value - type: object + $ref: '#/components/schemas/OpenItemDTO' required: true responses: "200": content: application/json: - example: - message: Configuration item updated successfully schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' + type: object description: 配置项更新成功 "400": content: application/json: - example: - message: "key, value and dataChangeLastModifiedBy should not be null\ - \ or empty" schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 请求参数错误 "403": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 权限不足 "404": content: application/json: - example: - message: Configuration item not found schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 配置项不存在 - summary: 更新配置项 + summary: 更新配置项 (original openapi) tags: - Item Management x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: get: deprecated: false - description: "" + description: 获取指定命名空间的配置项列表,支持分页 + operationId: findItemsByNamespace parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -803,7 +838,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -811,7 +846,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -819,7 +854,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -827,22 +862,24 @@ paths: schema: type: string style: simple - - description: "" + - description: 页码,从0开始 example: 0 explode: true in: query name: page required: true schema: + minimum: 0 type: integer style: form - - description: "" + - description: 每页数量 example: 50 explode: true in: query name: size required: true schema: + minimum: 0 type: integer style: form responses: @@ -879,26 +916,26 @@ paths: value: INFO comment: 日志级别配置 schema: - $ref: "#/components/schemas/OpenPageDTOOpenItemDTO" + $ref: '#/components/schemas/OpenPageDTOOpenItemDTO' description: 成功获取配置项列表 "404": content: application/json: - example: - message: Namespace not found schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 命名空间不存在 - summary: 获取命名空间下的配置项列表 + summary: 获取命名空间下的配置项列表 (original openapi) tags: - Item Management - x-accepts: - - application/json + x-accepts: application/json post: deprecated: false - description: "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items" + description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items" + operationId: createItem parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -906,7 +943,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -914,7 +951,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -922,7 +959,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -930,18 +967,19 @@ paths: schema: type: string style: simple + - description: 操作人用户名 + explode: true + in: query + name: operator + required: true + schema: + type: string + style: form requestBody: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/OpenItemDTO" - description: "" - required: - - dataChangeCreatedBy - - key - - value - type: object + $ref: '#/components/schemas/OpenItemDTO' required: true responses: "200": @@ -957,34 +995,34 @@ paths: value: "8080" comment: 服务器端口配置 schema: - $ref: "#/components/schemas/OpenItemDTO" + $ref: '#/components/schemas/OpenItemDTO' description: 配置项创建成功 "400": content: application/json: - example: - message: key and dataChangeCreatedBy should not be null or empty schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 请求参数错误 "403": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 权限不足 - summary: 创建新的配置项 + summary: 创建新的配置项 (original openapi) tags: - Item Management x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}: delete: deprecated: false - description: "DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" + description: "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" + operationId: deleteItemByEncodedKey parameters: - description: "" explode: false @@ -1039,17 +1077,18 @@ paths: content: application/json: schema: - properties: {} + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' type: object description: "" - summary: 通过编码的key删除配置项 + summary: 通过编码的key删除配置项 (original openapi) tags: - Item Management - x-accepts: - - application/json + x-accepts: application/json get: deprecated: false - description: "GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false}" + description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" + operationId: getItemByEncodedKey parameters: - description: "" explode: false @@ -1059,7 +1098,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -1067,7 +1106,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -1075,7 +1114,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -1083,7 +1122,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 配置项键名(需要URL编码) explode: false in: path name: key @@ -1105,26 +1144,26 @@ paths: value: jdbc:mysql://localhost:3306/apollo?useUnicode=true&characterEncoding=utf8 comment: 数据库连接地址,包含特殊字符 schema: - $ref: "#/components/schemas/OpenItemDTO" + $ref: '#/components/schemas/OpenItemDTO' description: 成功获取配置项(支持编码key) "404": content: application/json: - example: - message: Configuration item not found schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 配置项不存在 - summary: 通过查询参数获取配置项(支持编码的key) + summary: 通过查询参数获取配置项(支持编码的key) (original openapi) tags: - Item Management - x-accepts: - - application/json + x-accepts: application/json put: deprecated: false - description: "PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" + description: "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" + operationId: updateItemByEncodedKey parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -1132,7 +1171,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -1140,7 +1179,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -1148,7 +1187,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -1156,7 +1195,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 配置项键名(需要URL编码) explode: false in: path name: key @@ -1164,72 +1203,65 @@ paths: schema: type: string style: simple - - description: "" + - description: 若不存在则创建(true/false) example: "false" explode: true in: query name: createIfNotExists required: true schema: + default: false type: boolean style: form requestBody: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/OpenItemDTO" - description: "" - required: - - dataChangeLastModifiedBy - - key - - value - type: object + $ref: '#/components/schemas/OpenItemDTO' required: true responses: "200": content: application/json: - example: - message: Configuration item updated successfully schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' + type: object description: 配置项更新成功(编码key) "400": content: application/json: - example: - message: "key, value and dataChangeLastModifiedBy should not be null\ - \ or empty" schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 请求参数错误 "403": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 权限不足 "404": content: application/json: - example: - message: Configuration item not found schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 配置项不存在 - summary: 通过编码的key更新配置项 + summary: 通过编码的key更新配置项 (original openapi) tags: - Item Management x-content-type: application/json - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate: + x-accepts: application/json + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate: put: deprecated: false - description: "PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate" + description: "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate:" + operationId: batchUpdateItemsByText parameters: - description: "" explode: false @@ -1263,56 +1295,49 @@ paths: schema: type: string style: simple + - description: 操作人用户名 + explode: true + in: query + name: operator + required: true + schema: + type: string + style: form requestBody: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/NamespaceTextModel" - description: "" - required: - - configText - - format - - operator - type: object + $ref: '#/components/schemas/OpenNamespaceTextModel' required: true responses: "200": content: application/json: - example: - message: Batch update configuration items successfully schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' + type: object description: 批量更新配置项成功 - "400": - content: - application/json: - example: - message: operator should not be null or empty - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 请求参数错误 "403": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 权限不足 - summary: 通过文本批量修改配置项 + summary: 通过文本批量修改配置项 (new added) tags: - Item Management x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: get: deprecated: false - description: "GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items" + description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items:" + operationId: getBranchItems parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -1320,7 +1345,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -1328,7 +1353,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -1336,7 +1361,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -1344,7 +1369,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 分支名称 explode: false in: path name: branchName @@ -1375,28 +1400,28 @@ paths: comment: 测试调试级别 schema: items: - $ref: "#/components/schemas/OpenItemDTO" + $ref: '#/components/schemas/OpenItemDTO' type: array description: 成功获取分支下的配置项列表 "404": content: application/json: - example: - message: Branch not found schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 分支不存在 - summary: 获取分支下的配置项 + summary: 获取分支下的配置项 (new added) tags: - - Namespace Branch Management - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare: + - Item Management + x-accepts: application/json + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare: post: deprecated: false - description: "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare" + description: "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare" + operationId: compareItems parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -1404,7 +1429,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -1412,7 +1437,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -1420,7 +1445,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -1432,13 +1457,7 @@ paths: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/NamespaceSyncModel" - description: "" - required: - - syncItems - - syncToNamespaces - type: object + $ref: '#/components/schemas/OpenNamespaceSyncModel' required: true responses: "200": @@ -1502,21 +1521,21 @@ paths: extInfo: "" schema: items: - $ref: "#/components/schemas/ListItemDiffs" + $ref: '#/components/schemas/OpenItemDiffs' type: array description: 成功对比命名空间配置差异 - summary: 对比命名空间配置差异 + summary: 对比命名空间配置差异 (new added) tags: - Item Management x-content-type: application/json - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync: + x-accepts: application/json + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync: post: deprecated: false - description: "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync" + description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync:" + operationId: syncItems parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -1524,7 +1543,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -1548,53 +1567,55 @@ paths: schema: type: string style: simple + - description: 操作人用户名 + explode: true + in: query + name: operator + required: true + schema: + type: string + style: form requestBody: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/NamespaceSyncModel" - description: "" - required: - - syncItems - - syncToNamespaces - type: object + $ref: '#/components/schemas/OpenNamespaceSyncModel' required: true responses: "200": content: application/json: - example: - message: Configuration items synced successfully to target namespaces schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' + type: object description: 配置项同步成功 "400": content: application/json: - example: - message: syncToNamespaces should not be null or empty schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 请求参数错误 "403": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 权限不足 - summary: 同步配置项到多个命名空间 + summary: 同步配置项到多个命名空间 (new added) tags: - Item Management x-content-type: application/json - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate: + x-accepts: application/json + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate: post: deprecated: false - description: "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate" + description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate" + operationId: validateItems parameters: - description: "" explode: false @@ -1632,46 +1653,35 @@ paths: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/NamespaceTextModel" - description: "" - required: - - configText - - format - type: object + $ref: '#/components/schemas/OpenNamespaceTextModel' required: true responses: "200": content: application/json: - example: - valid: true - message: Configuration syntax is valid schema: - $ref: "#/components/schemas/_openapi_v1_envs__env__apps__appId__clusters__clusterName__namespaces__namespaceName__items_validate_post_200_response" + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' + type: object description: 配置文本语法验证通过 "400": content: application/json: - example: - valid: false - message: Configuration syntax validation failed - errors: - - "Line 3: Invalid property format" - - "Line 7: Missing value for key \"database.port\"" schema: - $ref: "#/components/schemas/_openapi_v1_envs__env__apps__appId__clusters__clusterName__namespaces__namespaceName__items_validate_post_400_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 配置文本语法错误 - summary: 验证配置文本语法 + summary: 验证配置文本语法 (new added) tags: - Item Management x-content-type: application/json - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert: + x-accepts: application/json + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert: post: deprecated: false - description: "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert" + description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert" + operationId: revertItems parameters: - description: "" explode: false @@ -1705,41 +1715,57 @@ paths: schema: type: string style: simple - responses: - "200": - content: - application/json: - example: - message: Configuration changes reverted successfully + - description: 操作人用户名 + explode: true + in: query + name: operator + required: true + schema: + type: string + style: form + responses: + "200": + content: + application/json: schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' + type: object description: 配置项更改撤销成功 "400": content: application/json: - example: - message: Invalid revert request schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 请求参数错误 "403": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 权限不足 - summary: 撤销配置项更改 + summary: 撤销配置项更改 (new added) tags: - Item Management - x-accepts: - - application/json - /openapi/v1/apps/{appId}/clusters/{clusterName}: - get: + x-accepts: application/json + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}: + delete: deprecated: false - description: "GET /openapi/v1/apps/{appId}/clusters/{clusterName}" + description: "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}" + operationId: deleteCluster parameters: + - description: "" + explode: false + in: path + name: env + required: true + schema: + type: string + style: simple - description: "" explode: false in: path @@ -1756,37 +1782,55 @@ paths: schema: type: string style: simple + - description: 操作人用户名 + explode: true + in: query + name: operator + required: true + schema: + type: string + style: form responses: "200": content: application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: ops-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-18T09:15:00.000Z - name: production - appId: sample-app schema: - $ref: "#/components/schemas/OpenClusterDTO" - description: 成功获取集群信息 + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' + type: object + description: 集群删除成功 + "400": + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object + description: 删除失败,集群可能包含配置 + "403": + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object + description: 权限不足 "404": content: application/json: - example: - message: Cluster not found schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 集群不存在 - summary: 获取指定集群信息 + summary: 删除集群 (new added) tags: - Cluster Management - x-accepts: - - application/json - /openapi/v1/apps/{appId}/clusters: - post: + x-accepts: application/json + get: deprecated: false - description: "POST /openapi/v1/apps/{appId}/clusters" + description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}" + operationId: getCluster parameters: - description: "" explode: false @@ -1796,69 +1840,55 @@ paths: schema: type: string style: simple - requestBody: - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/OpenClusterDTO" - description: "" - required: - - appId - - dataChangeCreatedBy - - name - type: object + - description: "" + explode: false + in: path + name: clusterName + required: true + schema: + type: string + style: simple + - description: "" + explode: false + in: path + name: env required: true + schema: + type: string + style: simple responses: "200": content: application/json: example: dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo + dataChangeLastModifiedBy: ops-user dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - name: test-cluster + dataChangeLastModifiedTime: 2024-01-18T09:15:00.000Z + name: production appId: sample-app schema: - $ref: "#/components/schemas/OpenClusterDTO" - description: 集群创建成功 - "400": - content: - application/json: - example: - message: name and dataChangeCreatedBy should not be null or empty - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 请求参数错误 - "403": + $ref: '#/components/schemas/OpenClusterDTO' + description: 成功获取集群信息 + "404": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 权限不足 - summary: 创建集群 + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object + description: 集群不存在 + summary: 获取指定集群信息 (original openapi) tags: - Cluster Management - x-content-type: application/json - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}: - delete: + x-accepts: application/json + /openapi/v1/envs/{env}/apps/{appId}/clusters: + post: deprecated: false - description: "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}" + description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters" + operationId: createCluster parameters: - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -1866,58 +1896,61 @@ paths: schema: type: string style: simple - - description: "" - explode: false + - explode: false in: path - name: clusterName + name: env required: true schema: type: string style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenClusterDTO' + required: true responses: "200": content: application/json: example: - message: Cluster deleted successfully + dataChangeCreatedBy: apollo + dataChangeLastModifiedBy: apollo + dataChangeCreatedTime: 2024-01-15T10:30:00.000Z + dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z + name: test-cluster + appId: sample-app schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 集群删除成功 + $ref: '#/components/schemas/OpenClusterDTO' + description: 集群创建成功 "400": content: application/json: - example: - message: Cannot delete cluster with existing configurations schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 删除失败,集群可能包含配置 + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object + description: 请求参数错误 "403": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 权限不足 - "404": - content: - application/json: - example: - message: Cluster not found - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 集群不存在 - summary: 删除集群 + summary: 创建集群 (original openapi) tags: - Cluster Management - x-accepts: - - application/json + x-content-type: application/json + x-accepts: application/json /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases: post: deprecated: false - description: "" + description: 创建发布 + operationId: createRelease parameters: - - description: "" + - description: app标识 explode: false in: path name: appId @@ -1925,7 +1958,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -1941,7 +1974,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -1953,13 +1986,7 @@ paths: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/NamespaceReleaseDTO" - description: "" - required: - - releaseTitle - - releasedBy - type: object + $ref: '#/components/schemas/NamespaceReleaseDTO' required: true responses: "200": @@ -1981,36 +2008,36 @@ paths: logging.level.root: INFO comment: 首次发布,包含基础配置 schema: - $ref: "#/components/schemas/OpenReleaseDTO" + $ref: '#/components/schemas/OpenReleaseDTO' description: 发布创建成功 "400": content: application/json: - example: - message: Params(releaseTitle and releasedBy) can not be empty schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 发布参数错误 "403": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 权限不足 - summary: 创建发布 + summary: 创建发布 (original openapi) tags: - Release Management x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest: get: deprecated: false - description: "" + description: 查询命名空间最新活跃发布 + operationId: loadLatestActiveRelease parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -2018,7 +2045,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -2026,7 +2053,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -2034,7 +2061,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -2063,27 +2090,27 @@ paths: app.version: 1.2.0 comment: 最新生产发布版本,包含性能优化 schema: - $ref: "#/components/schemas/OpenReleaseDTO" + $ref: '#/components/schemas/OpenReleaseDTO' description: 成功获取最新活跃发布 "404": content: application/json: - example: - message: No active release found for this namespace schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 未找到活跃发布 - summary: 获取最新活跃发布 + summary: 获取最新活跃发布 (original openapi) tags: - Release Management - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge: post: deprecated: false - description: "" + description: 合并灰度分支并可选择删除分支 + operationId: merge parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -2091,7 +2118,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -2099,7 +2126,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -2107,7 +2134,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -2115,7 +2142,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 分支名称 explode: false in: path name: branchName @@ -2123,7 +2150,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 合并后是否删除分支(true/false) example: "true" explode: true in: query @@ -2136,13 +2163,7 @@ paths: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/NamespaceReleaseDTO" - description: "" - required: - - releaseTitle - - releasedBy - type: object + $ref: '#/components/schemas/NamespaceReleaseDTO' required: true responses: "200": @@ -2165,36 +2186,36 @@ paths: feature.new-feature: enabled comment: 合并功能分支到主分支,包含新功能配置 schema: - $ref: "#/components/schemas/OpenReleaseDTO" + $ref: '#/components/schemas/OpenReleaseDTO' description: 分支合并成功 "400": content: application/json: - example: - message: releaseTitle and releasedBy should not be null or empty schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 合并参数错误 "403": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 权限不足 - summary: 合并分支 + summary: 合并分支 (original openapi) tags: - - Namespace Branch Management + - Release Management x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases: post: deprecated: false - description: "" + description: 创建灰度发布 + operationId: createGrayRelease parameters: - - description: "" + - description: app标识 explode: false in: path name: appId @@ -2202,7 +2223,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -2210,7 +2231,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -2218,7 +2239,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -2226,7 +2247,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 分支名称 explode: false in: path name: branchName @@ -2238,13 +2259,7 @@ paths: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/NamespaceReleaseDTO" - description: "" - required: - - releaseTitle - - releasedBy - type: object + $ref: '#/components/schemas/NamespaceReleaseDTO' required: true responses: "200": @@ -2265,18 +2280,18 @@ paths: : "" comment: "" schema: - $ref: "#/components/schemas/OpenReleaseDTO" - description: "" - summary: 创建灰度发布 + $ref: '#/components/schemas/OpenReleaseDTO' + description: 灰度发布创建成功 + summary: 创建灰度发布 (original openapi) tags: - - Namespace Branch Management + - Release Management x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases: post: deprecated: false description: "" + operationId: createGrayDelRelease parameters: - description: "" explode: false @@ -2322,14 +2337,7 @@ paths: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/NamespaceGrayDelReleaseDTO" - description: "" - required: - - grayDelKeys - - releaseTitle - - releasedBy - type: object + $ref: '#/components/schemas/NamespaceGrayDelReleaseDTO' required: true responses: "200": @@ -2350,20 +2358,20 @@ paths: : "" comment: "" schema: - $ref: "#/components/schemas/OpenReleaseDTO" + $ref: '#/components/schemas/OpenReleaseDTO' description: "" - summary: 创建灰度删除发布 + summary: 创建灰度删除发布 (original openapi) tags: - - Namespace Branch Management + - Release Management x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/envs/{env}/releases/{releaseId}/rollback: put: deprecated: false - description: "" + description: 回滚到指定的发布版本 + operationId: rollback parameters: - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -2371,15 +2379,16 @@ paths: schema: type: string style: simple - - description: "" + - description: 发布ID explode: false in: path name: releaseId required: true schema: + format: int64 type: integer style: simple - - description: "" + - description: 操作人用户名 explode: true in: query name: operator @@ -2392,20 +2401,21 @@ paths: content: application/json: schema: - properties: {} + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' type: object - description: "" - summary: 回滚发布 + description: 发布回滚成功 + summary: 回滚发布 (original openapi) tags: - Release Management - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/envs/{env}/releases/{releaseId}: get: deprecated: false description: "GET /openapi/v1/envs/{env}/releases/{releaseId}" + operationId: getReleaseById parameters: - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -2413,7 +2423,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 发布ID explode: false in: path name: releaseId @@ -2440,19 +2450,19 @@ paths: : "" comment: "" schema: - $ref: "#/components/schemas/OpenReleaseDTO" - description: "" - summary: 获取发布详情 + $ref: '#/components/schemas/OpenReleaseDTO' + description: 成功获取发布详情 + summary: 获取发布详情 (new added) tags: - Release Management - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all: get: deprecated: false description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all" + operationId: findAllReleases parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -2460,7 +2470,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -2468,7 +2478,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -2476,7 +2486,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -2484,7 +2494,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 页码,从0开始 example: 0 explode: true in: query @@ -2493,7 +2503,7 @@ paths: schema: type: integer style: form - - description: "" + - description: 每页数量 example: 5 explode: true in: query @@ -2528,20 +2538,20 @@ paths: value: "" schema: items: - $ref: "#/components/schemas/ListReleaseBO" + $ref: '#/components/schemas/OpenReleaseBO' type: array - description: "" - summary: 获取所有发布(分页) + description: 成功获取发布列表 + summary: 获取所有发布(分页) (new added) tags: - Release Management - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active: get: deprecated: false description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active" + operationId: findActiveReleases parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -2549,7 +2559,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -2557,7 +2567,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -2565,7 +2575,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -2573,7 +2583,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 页码,从0开始 example: 0 explode: true in: query @@ -2582,7 +2592,7 @@ paths: schema: type: integer style: form - - description: "" + - description: 每页数量 example: 5 explode: true in: query @@ -2611,71 +2621,27 @@ paths: comment: "" schema: items: - $ref: "#/components/schemas/OpenReleaseDTO" + $ref: '#/components/schemas/OpenReleaseDTO' type: array - description: "" - summary: 获取活跃发布(分页) + description: 成功获取活跃发布列表 + summary: 获取活跃发布(分页) (new added) tags: - Release Management - x-accepts: - - application/json - /openapi/v1/envs/{env}/releases/compare: + x-accepts: application/json + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances: get: deprecated: false - description: "GET /openapi/v1/envs/{env}/releases/compare" + description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances" + operationId: getInstanceCountByNamespace parameters: - - description: "" - explode: false + - explode: false in: path name: env required: true schema: type: string style: simple - - description: "" - explode: true - in: query - name: baseReleaseId - required: true - schema: - type: integer - style: form - - description: "" - explode: true - in: query - name: toCompareReleaseId - required: true - schema: - type: integer - style: form - responses: - "200": - content: - application/json: - example: - changes: - - type: "" - entity: - firstEntity: - key: "" - value: "" - secondEntity: - key: "" - value: "" - schema: - $ref: "#/components/schemas/_openapi_v1_envs__env__releases_compare_get_200_response" - description: "" - summary: 对比发布 - tags: - - Release Management - x-accepts: - - application/json - /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances" - parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -2683,7 +2649,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -2691,7 +2657,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -2705,12 +2671,11 @@ paths: application/json: schema: type: integer - description: "" - summary: 获取命名空间下的实例数量 + description: 成功返回实例数量 + summary: 获取命名空间下的实例数量 (original openapi) tags: - Instance Management - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/envs/{env}/releases/{releaseId}/instances: get: deprecated: false @@ -2783,19 +2748,18 @@ paths: dataChangeLastModifiedTime: "" dataChangeCreatedTime: "" schema: - $ref: "#/components/schemas/OpenPageDTOOpenInstanceDTO" + $ref: '#/components/schemas/OpenPageDTOOpenInstanceDTO' description: "" - summary: 根据发布版本查询实例(支持分页) + summary: 根据发布版本查询实例(支持分页) (new added) tags: - Instance Management - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances: + x-accepts: application/json + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int: get: deprecated: false description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3" parameters: - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -2803,7 +2767,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -2811,7 +2775,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -2819,7 +2783,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -2865,18 +2829,18 @@ paths: dataChangeCreatedTime: "" schema: items: - $ref: "#/components/schemas/OpenInstanceDTO" + $ref: '#/components/schemas/OpenInstanceDTO' type: array description: "" - summary: 查询不在指定发布版本中的实例 + summary: 查询不在指定发布版本中的实例 (new added) tags: - Instance Management - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/apps/{appId}/appnamespaces: get: deprecated: false description: "GET /openapi/v1/apps/{appId}/appnamespaces" + operationId: getAppNamespacesByApp parameters: - description: "" explode: false @@ -2903,17 +2867,17 @@ paths: comment: "" schema: items: - $ref: "#/components/schemas/OpenAppNamespaceDTO" + $ref: '#/components/schemas/OpenAppNamespaceDTO' type: array description: "" - summary: 获取指定应用的AppNamespace + summary: 获取指定应用的AppNamespace (new added) tags: - Namespace Management - x-accepts: - - application/json + x-accepts: application/json post: deprecated: false description: "POST /openapi/v1/apps/{appId}/appnamespaces" + operationId: createNamespace parameters: - description: "" explode: false @@ -2927,15 +2891,7 @@ paths: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/OpenAppNamespaceDTO" - description: "" - required: - - appId - - dataChangeCreatedBy - - format - - name - type: object + $ref: '#/components/schemas/OpenAppNamespaceDTO' required: true responses: "200": @@ -2953,35 +2909,34 @@ paths: appendNamespacePrefix: true comment: 数据库相关配置命名空间 schema: - $ref: "#/components/schemas/OpenAppNamespaceDTO" + $ref: '#/components/schemas/OpenAppNamespaceDTO' description: AppNamespace创建成功 "400": content: application/json: - example: - message: "appId, name, format and dataChangeCreatedBy should not be\ - \ null or empty" schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 请求参数错误 "403": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 权限不足 - summary: 创建AppNamespace + summary: 创建AppNamespace (original openapi) tags: - Namespace Management x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces: get: deprecated: false description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces" + operationId: findNamespaces parameters: - description: "" explode: false @@ -3014,6 +2969,7 @@ paths: name: fillItemDetail required: true schema: + default: true type: boolean style: form responses: @@ -3042,18 +2998,18 @@ paths: comment: "" schema: items: - $ref: "#/components/schemas/OpenNamespaceDTO" + $ref: '#/components/schemas/OpenNamespaceDTO' type: array description: "" - summary: 获取指定集群下的所有Namespace + summary: 获取指定集群下的所有Namespace (original openapi) tags: - Namespace Management - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}: get: deprecated: false description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}" + operationId: loadNamespace parameters: - description: "" explode: false @@ -3094,6 +3050,7 @@ paths: name: fillItemDetail required: true schema: + default: true type: boolean style: form responses: @@ -3121,17 +3078,17 @@ paths: value: "" comment: "" schema: - $ref: "#/components/schemas/OpenNamespaceDTO" + $ref: '#/components/schemas/OpenNamespaceDTO' description: "" - summary: 获取指定的Namespace + summary: 获取指定的Namespace (original openapi) tags: - - Cluster Management - x-accepts: - - application/json + - Namespace Management + x-accepts: application/json /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock: get: deprecated: false description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock" + operationId: getNamespaceLock parameters: - description: "" explode: false @@ -3174,17 +3131,17 @@ paths: isLocked: false lockedBy: "" schema: - $ref: "#/components/schemas/OpenNamespaceLockDTO" + $ref: '#/components/schemas/OpenNamespaceLockDTO' description: "" - summary: 获取Namespace的锁状态 + summary: 获取Namespace的锁状态 (original openapi) tags: - Namespace Management - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/appnamespaces: get: deprecated: false description: GET /openapi/v1/appnamespaces?public=true + operationId: getAppNamespaces parameters: - description: "" example: "false" @@ -3212,20 +3169,20 @@ paths: comment: "" schema: items: - $ref: "#/components/schemas/OpenAppNamespaceDTO" + $ref: '#/components/schemas/OpenAppNamespaceDTO' type: array description: "" - summary: 获取所有公共AppNamespace + summary: 获取所有公共AppNamespace (new added) tags: - Namespace Management - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}: delete: deprecated: false description: "DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}" + operationId: deleteAppNamespace parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -3233,7 +3190,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -3241,24 +3198,33 @@ paths: schema: type: string style: simple - responses: + - description: 操作人用户名 + explode: true + in: query + name: operator + required: true + schema: + type: string + style: form + responses: "200": content: application/json: schema: - properties: {} + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' type: object - description: "" - summary: 删除AppNamespace + description: AppNamespace删除成功 + summary: 删除AppNamespace (new added) tags: - - App Management - x-accepts: - - application/json + - Namespace Management + x-accepts: application/json get: deprecated: false description: "GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}" + operationId: getAppNamespace parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -3266,7 +3232,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -3290,19 +3256,19 @@ paths: appendNamespacePrefix: false comment: "" schema: - $ref: "#/components/schemas/OpenAppNamespaceDTO" - description: "" - summary: 获取指定的AppNamespace + $ref: '#/components/schemas/OpenAppNamespaceDTO' + description: 成功获取AppNamespace + summary: 获取指定的AppNamespace (new added) tags: - Namespace Management - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/apps/{appId}/namespaces/releases/status: get: deprecated: false description: "GET /openapi/v1/apps/{appId}/namespaces/releases/status" + operationId: getNamespacesReleaseStatus parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -3314,28 +3280,20 @@ paths: "200": content: application/json: - example: - ? "" - : ? "" - : false schema: - additionalProperties: - additionalProperties: - type: boolean - type: object - type: object - description: "" - summary: 获取应用下所有Namespace的发布状态 + $ref: '#/components/schemas/StringToStringBoolMap' + description: 成功获取发布状态映射 + summary: 获取应用下所有Namespace的发布状态 (new added) tags: - - App Management - x-accepts: - - application/json + - Namespace Management + x-accepts: application/json /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances: get: deprecated: false description: "GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances" + operationId: getPublicAppNamespaceInstances parameters: - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -3343,7 +3301,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 公共命名空间名称 explode: false in: path name: publicNamespaceName @@ -3351,7 +3309,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 页码,从0开始 example: 0 explode: true in: query @@ -3360,7 +3318,7 @@ paths: schema: type: integer style: form - - description: "" + - description: 每页数量 example: 10 explode: true in: query @@ -3395,20 +3353,20 @@ paths: comment: "" schema: items: - $ref: "#/components/schemas/OpenNamespaceDTO" + $ref: '#/components/schemas/OpenNamespaceDTO' type: array - description: "" - summary: 获取公共AppNamespace的所有实例 + description: 成功获取实例列表 + summary: 获取公共AppNamespace的所有实例 (new added) tags: - Namespace Management - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association: get: deprecated: false description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association" + operationId: getPublicNamespaceAssociation parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -3416,7 +3374,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -3424,7 +3382,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -3432,7 +3390,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -3465,19 +3423,19 @@ paths: value: "" comment: "" schema: - $ref: "#/components/schemas/OpenNamespaceDTO" - description: "" - summary: 获取关联的公共Namespace + $ref: '#/components/schemas/OpenNamespaceDTO' + description: 成功获取关联的公共Namespace + summary: 获取关联的公共Namespace (new added) tags: - Namespace Management - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check: get: deprecated: false description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check" + operationId: checkNamespaceIntegrity parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -3485,7 +3443,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -3493,7 +3451,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -3511,18 +3469,18 @@ paths: items: type: string type: array - description: "" - summary: 检查缺失的Namespace + description: 缺失的命名空间名称列表 + summary: 检查缺失的Namespace (new added) tags: - Namespace Management - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links: delete: deprecated: false description: "DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links" + operationId: deleteNamespaceLinks parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -3530,7 +3488,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -3538,7 +3496,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -3546,7 +3504,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -3554,23 +3512,32 @@ paths: schema: type: string style: simple + - description: 操作人用户名 + explode: true + in: query + name: operator + required: true + schema: + type: string + style: form responses: "200": content: application/json: schema: - properties: {} + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' type: object - description: "" - summary: 删除关联的Namespace + description: 解除关联成功 + summary: 删除关联的Namespace (new added) tags: - - App Management - x-accepts: - - application/json + - Namespace Management + x-accepts: application/json /openapi/v1/organizations: get: deprecated: false description: GET /openapi/v1/organizations + operationId: getOrganization responses: "200": content: @@ -3585,28 +3552,28 @@ paths: schema: description: 组织列表 items: - $ref: "#/components/schemas/OpenOrganizationDto" + $ref: '#/components/schemas/OpenOrganizationDto' type: array description: 成功获取组织列表 "401": content: application/json: - example: - message: Unauthorized schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 未授权访问 - summary: 获取所有组织信息 + summary: 获取所有组织信息 (original openapi) tags: - Organization Management - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches: get: deprecated: false description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches" + operationId: findBranch parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -3614,7 +3581,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -3622,7 +3589,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -3630,7 +3597,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -3671,27 +3638,26 @@ paths: value: debug comment: 测试模式配置 schema: - $ref: "#/components/schemas/OpenNamespaceDTO" - description: "" + $ref: '#/components/schemas/OpenNamespaceDTO' + description: 成功获取分支信息 "404": content: application/json: - example: - message: Branch not found for this namespace schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 分支不存在 - summary: 获取命名空间分支信息 + summary: 获取命名空间分支信息 (original openapi) tags: - - Cluster Management - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch: + - Namespace Branch Management + x-accepts: application/json post: deprecated: false - description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch" + description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches" + operationId: createBranch parameters: - - description: "" + - description: app标识 explode: false in: path name: appId @@ -3699,7 +3665,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -3707,7 +3673,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -3715,7 +3681,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -3723,7 +3689,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 操作人用户名 explode: true in: query name: operator @@ -3756,19 +3722,19 @@ paths: value: "" comment: "" schema: - $ref: "#/components/schemas/OpenNamespaceDTO" - description: "" - summary: 创建命名空间分支 + $ref: '#/components/schemas/OpenNamespaceDTO' + description: 命名空间分支创建成功 + summary: 创建命名空间分支 (original openapi) tags: - Namespace Branch Management - x-accepts: - - application/json + x-accepts: application/json /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}: delete: deprecated: false description: "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}" + operationId: deleteBranch parameters: - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -3776,7 +3742,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -3784,7 +3750,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -3792,7 +3758,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -3800,7 +3766,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 分支名称 explode: false in: path name: branchName @@ -3808,7 +3774,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 操作人用户名 explode: true in: query name: operator @@ -3821,22 +3787,23 @@ paths: content: application/json: schema: - properties: {} + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' type: object - description: "" - summary: 删除命名空间分支 + description: 分支删除成功 + summary: 删除命名空间分支 (original openapi) tags: - Namespace Branch Management - x-accepts: - - application/json + x-accepts: application/json patch: deprecated: false description: |- PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从"独立"更新为"合并") + operationId: mergeBranch parameters: - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -3844,7 +3811,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -3852,7 +3819,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -3860,7 +3827,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -3868,7 +3835,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 分支名称 explode: false in: path name: branchName @@ -3876,7 +3843,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 合并后是否删除分支(true/false) example: "true" explode: true in: query @@ -3885,25 +3852,19 @@ paths: schema: type: boolean style: form - - description: "" - explode: false - in: header - name: X-Apollo-Operator + - description: 操作人用户名 + explode: true + in: query + name: operator required: true schema: type: string - style: simple + style: form requestBody: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/NamespaceReleaseDTO" - description: "" - required: - - releaseTitle - - releasedBy - type: object + $ref: '#/components/schemas/NamespaceReleaseDTO' required: true responses: "200": @@ -3924,20 +3885,20 @@ paths: : "" comment: "" schema: - $ref: "#/components/schemas/OpenReleaseDTO" - description: "" - summary: 合并分支到主分支 + $ref: '#/components/schemas/OpenReleaseDTO' + description: 分支合并成功 + summary: 合并分支到主分支 (new added) tags: - Namespace Branch Management x-content-type: application/json - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules: + x-accepts: application/json + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules: get: deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules" + description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules" + operationId: getBranchGrayRules parameters: - - description: "" + - description: app标识 explode: false in: path name: appId @@ -3945,7 +3906,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -3953,7 +3914,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -3961,7 +3922,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -3969,7 +3930,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 分支名称 explode: false in: path name: branchName @@ -3997,18 +3958,18 @@ paths: clientLabelList: - "" schema: - $ref: "#/components/schemas/OpenGrayReleaseRuleDTO" - description: "" - summary: 获取分支灰度发布规则 + $ref: '#/components/schemas/OpenGrayReleaseRuleDTO' + description: 成功获取灰度发布规则 + summary: 获取分支灰度发布规则 (original openapi) tags: - Namespace Branch Management - x-accepts: - - application/json + x-accepts: application/json put: deprecated: false - description: "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules" + description: "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules" + operationId: updateBranchRules parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -4016,7 +3977,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -4024,7 +3985,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -4032,7 +3993,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -4040,7 +4001,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 分支名称 explode: false in: path name: branchName @@ -4048,52 +4009,47 @@ paths: schema: type: string style: simple - - description: "" - explode: false - in: header + - description: 操作人用户名 + explode: true + in: query name: operator required: true schema: type: string - style: simple + style: form requestBody: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/OpenGrayReleaseRuleDTO" - description: "" - required: - - ruleItems - type: object + $ref: '#/components/schemas/OpenGrayReleaseRuleDTO' required: true responses: "200": content: application/json: schema: - properties: {} + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' type: object - description: "" - summary: 更新分支灰度发布规则 + description: 灰度规则更新成功 + summary: 更新分支灰度发布规则 (original openapi) tags: - Namespace Branch Management x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json components: schemas: OpenAppDTO: description: Apollo应用信息数据传输对象,包含应用的基本信息和元数据 example: - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z orgName: orgName dataChangeLastModifiedBy: dataChangeLastModifiedBy ownerName: ownerName appId: appId dataChangeCreatedBy: dataChangeCreatedBy name: name - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z orgId: orgId ownerEmail: ownerEmail properties: @@ -4105,9 +4061,11 @@ components: type: string dataChangeCreatedTime: description: 数据创建时间,ISO 8601格式的时间戳 + example: 2025-09-29T12:34:56Z type: string dataChangeLastModifiedTime: description: 数据最后修改时间,ISO 8601格式的时间戳 + example: 2025-09-29T12:34:56Z type: string name: description: 应用名称,用于显示的友好名称 @@ -4130,6 +4088,22 @@ components: type: object OpenCreateAppDTO: description: 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 + example: + app: + 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 + assignAppRoleToSelf: true + admins: + - admins + - admins properties: assignAppRoleToSelf: description: 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 @@ -4140,18 +4114,18 @@ components: type: string type: array app: - $ref: "#/components/schemas/OpenAppDTO" + $ref: '#/components/schemas/OpenAppDTO' type: object OpenItemDTO: description: Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 example: - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 value: value - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key properties: dataChangeCreatedBy: @@ -4162,9 +4136,11 @@ components: type: string dataChangeCreatedTime: description: 配置项创建时间,ISO 8601格式的时间戳 + example: 2025-09-29T12:34:56Z type: string dataChangeLastModifiedTime: description: 配置项最后修改时间,ISO 8601格式的时间戳 + example: 2025-09-29T12:34:56Z type: string key: description: 配置项的键名,在同一命名空间内唯一标识一个配置项 @@ -4186,21 +4162,21 @@ components: size: 6 page: 0 content: - - dataChangeCreatedTime: dataChangeCreatedTime + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 value: value - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key - - dataChangeCreatedTime: dataChangeCreatedTime + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 value: value - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key properties: page: @@ -4216,18 +4192,18 @@ components: content: description: 当前页的配置项列表,包含具体的配置项数据 items: - $ref: "#/components/schemas/OpenItemDTO" + $ref: '#/components/schemas/OpenItemDTO' type: array type: object OpenClusterDTO: description: Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 example: - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy appId: appId dataChangeCreatedBy: dataChangeCreatedBy name: name - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z properties: dataChangeCreatedBy: description: 集群创建者用户名,记录是谁创建了这个集群 @@ -4237,9 +4213,11 @@ components: type: string dataChangeCreatedTime: description: 集群创建时间,ISO 8601格式的时间戳 + example: 2025-09-29T12:34:56Z type: string dataChangeLastModifiedTime: description: 集群最后修改时间,ISO 8601格式的时间戳 + example: 2025-09-29T12:34:56Z type: string name: description: 集群名称,在同一应用和环境下唯一标识一个集群 @@ -4249,27 +4227,23 @@ components: type: string type: object MapString: - description: 字符串映射对象,用于表示键值对的配置数据结构 - example: - key: key - properties: - key: - type: string + additionalProperties: + type: string type: object OpenReleaseDTO: description: Apollo发布信息数据传输对象,表示一次配置发布的完整信息 example: - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy configurations: - key: key + key: configurations appId: appId clusterName: clusterName dataChangeCreatedBy: dataChangeCreatedBy name: name comment: comment id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z namespaceName: namespaceName properties: dataChangeCreatedBy: @@ -4280,9 +4254,11 @@ components: type: string dataChangeCreatedTime: description: 发布创建时间,ISO 8601格式的时间戳 + example: 2025-09-29T12:34:56Z type: string dataChangeLastModifiedTime: description: 发布最后修改时间,ISO 8601格式的时间戳 + example: 2025-09-29T12:34:56Z type: string id: description: 发布记录的唯一标识符,系统自动生成 @@ -4301,7 +4277,9 @@ components: description: 发布名称,用于标识这次发布的版本或描述 type: string configurations: - $ref: "#/components/schemas/MapString" + additionalProperties: + type: string + type: object comment: description: 发布备注,描述本次发布的变更内容和目的 type: string @@ -4359,7 +4337,7 @@ components: OpenAppNamespaceDTO: description: Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 example: - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy appendNamespacePrefix: true appId: appId @@ -4368,7 +4346,7 @@ components: format: format isPublic: true comment: comment - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z properties: dataChangeCreatedBy: description: 命名空间创建者用户名,记录是谁创建了这个应用命名空间 @@ -4378,9 +4356,11 @@ components: type: string dataChangeCreatedTime: description: 命名空间创建时间,ISO 8601格式的时间戳 + example: 2025-09-29T12:34:56Z type: string dataChangeLastModifiedTime: description: 命名空间最后修改时间,ISO 8601格式的时间戳 + example: 2025-09-29T12:34:56Z type: string name: description: 命名空间名称,在同一应用内唯一标识一个命名空间 @@ -4430,7 +4410,7 @@ components: OpenGrayReleaseRuleDTO: description: Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 example: - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy appId: appId clusterName: clusterName @@ -4451,7 +4431,7 @@ components: - clientLabelList - clientLabelList clientAppId: clientAppId - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z namespaceName: namespaceName properties: dataChangeCreatedBy: @@ -4462,9 +4442,11 @@ components: type: string dataChangeCreatedTime: description: 灰度规则创建时间,ISO 8601格式的时间戳 + example: 2025-09-29T12:34:56Z type: string dataChangeLastModifiedTime: description: 灰度规则最后修改时间,ISO 8601格式的时间戳 + example: 2025-09-29T12:34:56Z type: string appId: description: 所属应用的唯一标识符 @@ -4481,13 +4463,13 @@ components: ruleItems: description: 灰度发布规则项列表,包含具体的灰度规则条件 items: - $ref: "#/components/schemas/OpenGrayReleaseRuleItemDTO" + $ref: '#/components/schemas/OpenGrayReleaseRuleItemDTO' type: array type: object OpenNamespaceDTO: description: Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 example: - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy appId: appId clusterName: clusterName @@ -4496,23 +4478,23 @@ components: isPublic: true comment: comment items: - - dataChangeCreatedTime: dataChangeCreatedTime + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 value: value - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key - - dataChangeCreatedTime: dataChangeCreatedTime + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 value: value - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z namespaceName: namespaceName properties: dataChangeCreatedBy: @@ -4523,9 +4505,11 @@ components: type: string dataChangeCreatedTime: description: 命名空间创建时间,ISO 8601格式的时间戳 + example: 2025-09-29T12:34:56Z type: string dataChangeLastModifiedTime: description: 命名空间最后修改时间,ISO 8601格式的时间戳 + example: 2025-09-29T12:34:56Z type: string appId: description: 所属应用的唯一标识符 @@ -4548,7 +4532,7 @@ components: items: description: 命名空间包含的配置项列表 items: - $ref: "#/components/schemas/OpenItemDTO" + $ref: '#/components/schemas/OpenItemDTO' type: array type: object OpenNamespaceLockDTO: @@ -4576,74 +4560,74 @@ components: page: 0 content: - configs: - - releaseDeliveryTime: releaseDeliveryTime + - releaseDeliveryTime: 2025-09-29T12:34:56Z release: - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy configurations: - key: key + key: configurations appId: appId clusterName: clusterName dataChangeCreatedBy: dataChangeCreatedBy name: name comment: comment id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z namespaceName: namespaceName - dataChangeLastModifiedTime: dataChangeLastModifiedTime - - releaseDeliveryTime: releaseDeliveryTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z + - releaseDeliveryTime: 2025-09-29T12:34:56Z release: - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy configurations: - key: key + key: configurations appId: appId clusterName: clusterName dataChangeCreatedBy: dataChangeCreatedBy name: name comment: comment id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z namespaceName: namespaceName - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataCenter: dataCenter appId: appId clusterName: clusterName ip: ip id: 5 - configs: - - releaseDeliveryTime: releaseDeliveryTime + - releaseDeliveryTime: 2025-09-29T12:34:56Z release: - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy configurations: - key: key + key: configurations appId: appId clusterName: clusterName dataChangeCreatedBy: dataChangeCreatedBy name: name comment: comment id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z namespaceName: namespaceName - dataChangeLastModifiedTime: dataChangeLastModifiedTime - - releaseDeliveryTime: releaseDeliveryTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z + - releaseDeliveryTime: 2025-09-29T12:34:56Z release: - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy configurations: - key: key + key: configurations appId: appId clusterName: clusterName dataChangeCreatedBy: dataChangeCreatedBy name: name comment: comment id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z namespaceName: namespaceName - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataCenter: dataCenter appId: appId clusterName: clusterName @@ -4663,7 +4647,7 @@ components: content: description: 当前页的实例列表,包含具体的实例数据 items: - $ref: "#/components/schemas/OpenInstanceDTO" + $ref: '#/components/schemas/OpenInstanceDTO' type: array type: object OpenEnvClusterDTO: @@ -4674,105 +4658,26 @@ components: - clusters properties: env: - description: "" + description: 环境标识,例如 DEV、FAT、UAT、PROD type: string clusters: - description: "" + description: 该环境下的集群名称列表 items: type: string type: array type: object - ClusterDTO: - example: - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - dataChangeCreatedBy: dataChangeCreatedBy - name: name - parentClusterId: 6 - comment: comment - id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - properties: - dataChangeCreatedBy: - description: "" - type: string - dataChangeLastModifiedBy: - description: "" - type: string - dataChangeCreatedByDisplayName: - description: "" - type: string - dataChangeLastModifiedByDisplayName: - description: "" - type: string - dataChangeCreatedTime: - description: "" - type: string - dataChangeLastModifiedTime: - description: "" - type: string - id: - description: "" - format: int64 - type: integer - name: - description: "" - pattern: "[0-9a-zA-Z_-]+[0-9a-zA-Z_.-]*" - type: string - appId: - description: "" - type: string - parentClusterId: - description: "" - format: int64 - type: integer - comment: - description: "" - type: string - required: - - appId - - name - type: object - EnvClusterInfo: - example: - env: env - clusters: - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - dataChangeCreatedBy: dataChangeCreatedBy - name: name - parentClusterId: 6 - comment: comment - id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - dataChangeCreatedBy: dataChangeCreatedBy - name: name - parentClusterId: 6 - comment: comment - id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime + OpenEnvClusterInfo: properties: env: - description: "" + description: 环境标识 type: string clusters: - description: "" + description: 集群信息列表 items: - $ref: "#/components/schemas/ClusterDTO" + $ref: '#/components/schemas/OpenClusterDTO' type: array type: object - NamespaceTextModel: + OpenNamespaceTextModel: example: configText: configText namespaceId: 0 @@ -4784,32 +4689,32 @@ components: operator: operator properties: appId: - description: "" + description: 应用唯一标识 type: string env: - description: "" + description: 环境标识 type: string clusterName: - description: "" + description: 集群名称 type: string namespaceName: - description: "" + description: 命名空间名称 type: string namespaceId: - description: "" + description: 命名空间ID format: int64 type: integer format: - description: "" + description: 命名空间格式类型(properties/xml/json/yml等) type: string configText: - description: "" + description: 配置内容的原始文本 type: string operator: - description: "" + description: 操作者用户名 type: string type: object - NamespaceIdentifier: + OpenNamespaceIdentifier: example: appId: appId clusterName: clusterName @@ -4817,204 +4722,118 @@ components: namespaceName: namespaceName properties: appId: - description: "" + description: 应用唯一标识 type: string env: - description: "" + description: 环境标识 type: string clusterName: - description: "" + description: 集群名称 type: string namespaceName: - description: "" - type: string - type: object - ItemDTO: - example: - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 - comment: comment - id: 0 - value: value - key: key - properties: - dataChangeCreatedBy: - description: "" - type: string - dataChangeLastModifiedBy: - description: "" - type: string - dataChangeCreatedByDisplayName: - description: "" - type: string - dataChangeLastModifiedByDisplayName: - description: "" - type: string - dataChangeCreatedTime: - description: "" - type: string - dataChangeLastModifiedTime: - description: "" - type: string - id: - description: "" - format: int64 - type: integer - namespaceId: - description: "" - format: int64 - type: integer - key: - description: "" - type: string - type: - description: "" - type: integer - value: - description: "" - type: string - comment: - description: "" + description: 命名空间名称 type: string - lineNum: - description: "" - type: integer type: object - ItemChangeSets: + OpenItemChangeSets: example: dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy deleteItems: - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key createItems: - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key updateItems: - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z properties: dataChangeCreatedBy: - description: "" + description: 变更集合创建者用户名 type: string dataChangeLastModifiedBy: - description: "" + description: 变更集合最后修改者用户名 type: string dataChangeCreatedByDisplayName: - description: "" + description: 创建者显示名 type: string dataChangeLastModifiedByDisplayName: - description: "" + description: 最后修改者显示名 type: string dataChangeCreatedTime: - description: "" + description: 变更集合创建时间(ISO 8601) + example: 2025-09-29T12:34:56Z type: string dataChangeLastModifiedTime: - description: "" + description: 变更集合最后修改时间(ISO 8601) + example: 2025-09-29T12:34:56Z type: string createItems: default: [] - description: "" + description: 待创建的配置项列表 items: - $ref: "#/components/schemas/ItemDTO" + $ref: '#/components/schemas/OpenItemDTO' type: array updateItems: default: [] - description: "" + description: 待更新的配置项列表 items: - $ref: "#/components/schemas/ItemDTO" + $ref: '#/components/schemas/OpenItemDTO' type: array deleteItems: default: [] - description: "" + description: 待删除的配置项列表 items: - $ref: "#/components/schemas/ItemDTO" + $ref: '#/components/schemas/OpenItemDTO' type: array type: object - ListItemDiffs: + OpenItemDiffs: example: namespace: appId: appId @@ -5024,129 +4843,89 @@ components: diffs: dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy deleteItems: - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key createItems: - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key updateItems: - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z extInfo: extInfo properties: namespace: - $ref: "#/components/schemas/NamespaceIdentifier" + $ref: '#/components/schemas/OpenNamespaceIdentifier' diffs: - $ref: "#/components/schemas/ItemChangeSets" + $ref: '#/components/schemas/OpenItemChangeSets' extInfo: - description: "" + description: 扩展信息 type: string type: object - NamespaceSyncModel: + OpenNamespaceSyncModel: example: syncItems: - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key syncToNamespaces: - appId: appId @@ -5159,110 +4938,42 @@ components: namespaceName: namespaceName properties: syncToNamespaces: - description: "" + description: 目标命名空间标识列表 items: - $ref: "#/components/schemas/NamespaceIdentifier" + $ref: '#/components/schemas/OpenNamespaceIdentifier' type: array syncItems: - description: "" + description: 需要同步的配置项列表 items: - $ref: "#/components/schemas/ItemDTO" + $ref: '#/components/schemas/OpenItemDTO' type: array type: object - ReleaseDTO: - example: - dataChangeCreatedTime: dataChangeCreatedTime - configurations: configurations - dataChangeCreatedBy: dataChangeCreatedBy - releaseKey: releaseKey - dataChangeLastModifiedTime: dataChangeLastModifiedTime - isAbandoned: true - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - clusterName: clusterName - name: name - comment: comment - id: 0 - namespaceName: namespaceName - properties: - dataChangeCreatedBy: - description: "" - type: string - dataChangeLastModifiedBy: - description: "" - type: string - dataChangeCreatedByDisplayName: - description: "" - type: string - dataChangeLastModifiedByDisplayName: - description: "" - type: string - dataChangeCreatedTime: - description: "" - type: string - dataChangeLastModifiedTime: - description: "" - type: string - id: - description: "" - format: int64 - type: integer - releaseKey: - description: "" - type: string - name: - description: "" - type: string - appId: - description: "" - type: string - clusterName: - description: "" - type: string - namespaceName: - description: "" - type: string - configurations: - description: "" - type: string - comment: - description: "" - type: string - isAbandoned: - description: "" - type: boolean - type: object KVEntity: example: value: value key: key properties: key: - description: "" + description: 键 type: string value: - description: "" + description: 值 type: string type: object - ListReleaseBO: + OpenReleaseBO: example: baseInfo: - dataChangeCreatedTime: dataChangeCreatedTime - configurations: configurations - dataChangeCreatedBy: dataChangeCreatedBy - releaseKey: releaseKey - dataChangeLastModifiedTime: dataChangeLastModifiedTime - isAbandoned: true - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + 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 items: - value: value @@ -5271,109 +4982,75 @@ components: key: key properties: baseInfo: - $ref: "#/components/schemas/ReleaseDTO" + $ref: '#/components/schemas/OpenReleaseDTO' items: - description: "" items: - $ref: "#/components/schemas/KVEntity" + $ref: '#/components/schemas/KVEntity' type: array type: object - EntityPairKVEntity: - example: - firstEntity: - value: value - key: key - secondEntity: - value: value - key: key - properties: - firstEntity: - $ref: "#/components/schemas/KVEntity" - secondEntity: - $ref: "#/components/schemas/KVEntity" - type: object - Change: - example: - type: ADDED - entity: - firstEntity: - value: value - key: key - secondEntity: - value: value - key: key - properties: - type: - description: "" - enum: - - ADDED - - MODIFIED - - DELETED - type: string - entity: - $ref: "#/components/schemas/EntityPairKVEntity" - type: object OpenInstanceConfigDTO: example: - releaseDeliveryTime: releaseDeliveryTime + releaseDeliveryTime: 2025-09-29T12:34:56Z release: - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy configurations: - key: key + key: configurations appId: appId clusterName: clusterName dataChangeCreatedBy: dataChangeCreatedBy name: name comment: comment id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z namespaceName: namespaceName - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z properties: release: - $ref: "#/components/schemas/OpenReleaseDTO" + $ref: '#/components/schemas/OpenReleaseDTO' releaseDeliveryTime: - description: "" + description: 配置下发时间(ISO 8601) + example: 2025-09-29T12:34:56Z type: string dataChangeLastModifiedTime: - description: "" + description: 最后修改时间(ISO 8601) + example: 2025-09-29T12:34:56Z type: string type: object OpenInstanceDTO: example: configs: - - releaseDeliveryTime: releaseDeliveryTime + - releaseDeliveryTime: 2025-09-29T12:34:56Z release: - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy configurations: - key: key + key: configurations appId: appId clusterName: clusterName dataChangeCreatedBy: dataChangeCreatedBy name: name comment: comment id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z namespaceName: namespaceName - dataChangeLastModifiedTime: dataChangeLastModifiedTime - - releaseDeliveryTime: releaseDeliveryTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z + - releaseDeliveryTime: 2025-09-29T12:34:56Z release: - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy configurations: - key: key + key: configurations appId: appId clusterName: clusterName dataChangeCreatedBy: dataChangeCreatedBy name: name comment: comment id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z namespaceName: namespaceName - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataCenter: dataCenter appId: appId clusterName: clusterName @@ -5381,28 +5058,29 @@ components: id: 5 properties: id: - description: "" + description: 实例ID format: int64 type: integer appId: - description: "" + description: 实例所属应用ID type: string clusterName: - description: "" + description: 实例所属集群名称 type: string dataCenter: - description: "" + description: 数据中心/机房标识 type: string ip: - description: "" + description: 实例IP地址 type: string configs: - description: "" + description: 实例当前生效的配置列表 items: - $ref: "#/components/schemas/OpenInstanceConfigDTO" + $ref: '#/components/schemas/OpenInstanceConfigDTO' type: array dataChangeCreatedTime: - description: "" + description: 数据创建时间(ISO 8601) + example: 2025-09-29T12:34:56Z type: string type: object OpenOrganizationDto: @@ -5411,99 +5089,84 @@ components: orgId: orgId properties: orgId: - description: "" + description: 组织ID type: string orgName: - description: "" + description: 组织名称 type: string type: object - _openapi_v1_apps_get_401_response: + ExceptionResponse: + additionalProperties: true + description: | + 错误响应对象,表示为 Map。 字段包括: - status: HTTP 状态码 (integer) - message: 错误信息 (string) - timestamp: 出错时间戳 (string) - exception: 异常类名或标识 (string) example: - message: message - properties: - message: - type: string + status: 404 + message: Resource not found + timestamp: 2025-09-29T12:34:56Z + exception: NotFoundException type: object - _openapi_v1_apps_post_request: - allOf: - - $ref: "#/components/schemas/OpenCreateAppDTO" - description: "" - properties: - app: - allOf: - - $ref: "#/components/schemas/OpenAppDTO" - required: - - appId - - name - - orgId - - orgName - - ownerName - required: - - admins - - app - - assignAppRoleToSelf - type: object - _openapi_v1_apps_post_400_response: - example: - exception: exception - message: message - properties: - message: - type: string - exception: - type: string + SuccessEmptyResponse: + properties: {} type: object - _openapi_v1_envs__env__apps__appId__clusters__clusterName__namespaces__namespaceName__items_validate_post_200_response: - example: - valid: true - message: message - properties: - valid: + StringToStringBoolMap: + additionalProperties: + additionalProperties: type: boolean - message: - type: string + type: object + example: + projectA: + featureX: true + featureY: false + projectB: + darkMode: true type: object - _openapi_v1_envs__env__apps__appId__clusters__clusterName__namespaces__namespaceName__items_validate_post_400_response: + MultiResponseEntity: + description: A response container holding multiple RichResponseEntity objects example: - valid: true - message: message - errors: - - errors - - errors + code: 200 + entities: + - code: 200 + message: OK + body: "{}" + - code: 200 + message: OK + body: "{}" properties: - valid: - type: boolean - message: - type: string - errors: + code: + description: Overall HTTP status code + example: 200 + type: integer + entities: + description: List of rich response entities items: - type: string + $ref: '#/components/schemas/RichResponseEntity' type: array + required: + - code + - entities type: object - _openapi_v1_envs__env__releases_compare_get_200_response: + RichResponseEntity: + description: "A wrapper for a single response entity with code, message, and\ + \ body" example: - changes: - - type: ADDED - entity: - firstEntity: - value: value - key: key - secondEntity: - value: value - key: key - - type: ADDED - entity: - firstEntity: - value: value - key: key - secondEntity: - value: value - key: key + code: 200 + message: OK + body: "{}" properties: - changes: - items: - $ref: "#/components/schemas/Change" - type: array + code: + description: HTTP status code + example: 200 + type: integer + message: + description: Response message (can be string or object) + example: OK + type: object + body: + description: Response payload (generic type T) + type: object + required: + - code + - message type: object securitySchemes: ApiKeyAuth: @@ -5524,4 +5187,3 @@ components: in: header name: Authorization type: apiKey - diff --git a/java-client/build.gradle b/java-client/build.gradle index bccfa032..a51228bf 100644 --- a/java-client/build.gradle +++ b/java-client/build.gradle @@ -62,9 +62,9 @@ if(hasProperty('target') && target == 'android') { def task = project.tasks.create "jar${variant.name.capitalize()}", Jar task.description = "Create jar artifact for ${variant.name}" task.dependsOn variant.javaCompile - task.from variant.javaCompile.destinationDirectory - task.destinationDirectory = project.file("${project.buildDir}/outputs/jar") - task.archiveFileName = "${project.name}-${variant.baseName}-${version}.jar" + task.from variant.javaCompile.destinationDir + task.destinationDir = project.file("${project.buildDir}/outputs/jar") + task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" artifacts.add('archives', task) } } @@ -106,18 +106,20 @@ ext { } dependencies { + implementation 'io.swagger:swagger-annotations:1.6.8' implementation "com.google.code.findbugs:jsr305:3.0.2" - implementation 'com.squareup.okhttp3:okhttp:4.12.0' - implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0' + implementation 'com.squareup.okhttp3:okhttp:4.10.0' + implementation 'com.squareup.okhttp3:logging-interceptor:4.10.0' implementation 'com.google.code.gson:gson:2.9.1' - implementation 'io.gsonfire:gson-fire:1.9.0' - implementation 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6' + implementation 'io.gsonfire:gson-fire:1.8.5' + implementation 'javax.ws.rs:jsr311-api:1.1.1' + implementation 'javax.ws.rs:javax.ws.rs-api:2.1.1' implementation 'org.openapitools:jackson-databind-nullable:0.2.6' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.18.0' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3' + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.1' testImplementation 'org.mockito:mockito-core:3.12.4' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.3' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.1' } javadoc { diff --git a/java-client/build.sbt b/java-client/build.sbt index f55e8cc1..397237d0 100644 --- a/java-client/build.sbt +++ b/java-client/build.sbt @@ -3,24 +3,25 @@ lazy val root = (project in file(".")). organization := "com.apollo", name := "apollo-openapi-client", version := "0.0.1", - scalaVersion := "2.11.12", + scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), - compile / javacOptions ++= Seq("-Xlint:deprecation"), - Compile / packageDoc / publishArtifact := false, + javacOptions in compile ++= Seq("-Xlint:deprecation"), + publishArtifact in (Compile, packageDoc) := false, resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( "io.swagger" % "swagger-annotations" % "1.6.5", - "com.squareup.okhttp3" % "okhttp" % "4.12.0", - "com.squareup.okhttp3" % "logging-interceptor" % "4.12.0", + "com.squareup.okhttp3" % "okhttp" % "4.10.0", + "com.squareup.okhttp3" % "logging-interceptor" % "4.10.0", "com.google.code.gson" % "gson" % "2.9.1", - "org.apache.commons" % "commons-lang3" % "3.18.0", - "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", + "org.apache.commons" % "commons-lang3" % "3.12.0", + "javax.ws.rs" % "jsr311-api" % "1.1.1", + "javax.ws.rs" % "javax.ws.rs-api" % "2.1.1", "org.openapitools" % "jackson-databind-nullable" % "0.2.6", - "io.gsonfire" % "gson-fire" % "1.9.0" % "compile", + "io.gsonfire" % "gson-fire" % "1.8.5" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", - "org.junit.jupiter" % "junit-jupiter-api" % "5.10.3" % "test", + "org.junit.jupiter" % "junit-jupiter-api" % "5.9.1" % "test", "com.novocode" % "junit-interface" % "0.10" % "test", "org.mockito" % "mockito-core" % "3.12.4" % "test" ) diff --git a/java-client/docs/AppManagementApi.md b/java-client/docs/AppManagementApi.md index 413bf520..8ac8adb5 100644 --- a/java-client/docs/AppManagementApi.md +++ b/java-client/docs/AppManagementApi.md @@ -4,28 +4,26 @@ All URIs are relative to *http://localhost* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**openapiV1AppsAppIdAppnamespacesNamespaceNameDelete**](AppManagementApi.md#openapiV1AppsAppIdAppnamespacesNamespaceNameDelete) | **DELETE** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 删除AppNamespace | -| [**openapiV1AppsAppIdDelete**](AppManagementApi.md#openapiV1AppsAppIdDelete) | **DELETE** /openapi/v1/apps/{appId} | 删除应用 | -| [**openapiV1AppsAppIdEnvClustersGet**](AppManagementApi.md#openapiV1AppsAppIdEnvClustersGet) | **GET** /openapi/v1/apps/{appId}/env-clusters | 获取应用的环境集群信息 | -| [**openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete**](AppManagementApi.md#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete) | **DELETE** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links | 删除关联的Namespace | -| [**openapiV1AppsAppIdGet**](AppManagementApi.md#openapiV1AppsAppIdGet) | **GET** /openapi/v1/apps/{appId} | 获取单个应用信息 | -| [**openapiV1AppsAppIdMissEnvsGet**](AppManagementApi.md#openapiV1AppsAppIdMissEnvsGet) | **GET** /openapi/v1/apps/{appId}/miss_envs | 查找缺失的环境 | -| [**openapiV1AppsAppIdNamespacesReleasesStatusGet**](AppManagementApi.md#openapiV1AppsAppIdNamespacesReleasesStatusGet) | **GET** /openapi/v1/apps/{appId}/namespaces/releases/status | 获取应用下所有Namespace的发布状态 | -| [**openapiV1AppsAppIdNavtreeGet**](AppManagementApi.md#openapiV1AppsAppIdNavtreeGet) | **GET** /openapi/v1/apps/{appId}/navtree | 获取应用导航树 | -| [**openapiV1AppsAppIdPut**](AppManagementApi.md#openapiV1AppsAppIdPut) | **PUT** /openapi/v1/apps/{appId} | 更新应用 | -| [**openapiV1AppsBySelfGet**](AppManagementApi.md#openapiV1AppsBySelfGet) | **GET** /openapi/v1/apps/by-self | 获取当前Consumer的应用列表(分页) | -| [**openapiV1AppsEnvsEnvPost**](AppManagementApi.md#openapiV1AppsEnvsEnvPost) | **POST** /openapi/v1/apps/envs/{env} | 在指定环境创建应用 | -| [**openapiV1AppsGet**](AppManagementApi.md#openapiV1AppsGet) | **GET** /openapi/v1/apps | 获取当前Consumer授权的应用列表 | -| [**openapiV1AppsPost**](AppManagementApi.md#openapiV1AppsPost) | **POST** /openapi/v1/apps | 创建应用 | +| [**createApp**](AppManagementApi.md#createApp) | **POST** /openapi/v1/apps | 创建应用 (original openapi) | +| [**createAppInEnv**](AppManagementApi.md#createAppInEnv) | **POST** /openapi/v1/apps/envs/{env} | 在指定环境创建应用(new added) | +| [**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) | +| [**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) | +| [**updateApp**](AppManagementApi.md#updateApp) | **PUT** /openapi/v1/apps/{appId} | 更新应用(new added) | - -# **openapiV1AppsAppIdAppnamespacesNamespaceNameDelete** -> Object openapiV1AppsAppIdAppnamespacesNamespaceNameDelete(appId, namespaceName) + +# **createApp** +> Object createApp(openCreateAppDTO) -删除AppNamespace +创建应用 (original openapi) -DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} +POST /openapi/v1/apps ### Example ```java @@ -41,7 +39,7 @@ 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"); @@ -49,13 +47,12 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String appId = "appId_example"; // String | - String namespaceName = "namespaceName_example"; // String | + OpenCreateAppDTO openCreateAppDTO = new OpenCreateAppDTO(); // OpenCreateAppDTO | try { - Object result = apiInstance.openapiV1AppsAppIdAppnamespacesNamespaceNameDelete(appId, namespaceName); + Object result = apiInstance.createApp(openCreateAppDTO); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#openapiV1AppsAppIdAppnamespacesNamespaceNameDelete"); + System.err.println("Exception when calling AppManagementApi#createApp"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -69,8 +66,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **namespaceName** | **String**| | | +| **openCreateAppDTO** | [**OpenCreateAppDTO**](OpenCreateAppDTO.md)| | | ### Return type @@ -82,21 +78,23 @@ public class Example { ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | | - | +| **200** | 应用创建成功 | - | +| **400** | 请求参数错误 | - | +| **403** | 权限不足 | - | - -# **openapiV1AppsAppIdDelete** -> OpenapiV1AppsGet401Response openapiV1AppsAppIdDelete(appId) + +# **createAppInEnv** +> Object createAppInEnv(env, operator, openAppDTO) -删除应用 +在指定环境创建应用(new added) -DELETE /openapi/v1/apps/{appId} +POST /openapi/v1/apps/envs/{env} ### Example ```java @@ -112,7 +110,7 @@ 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"); @@ -120,12 +118,14 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String appId = "appId_example"; // String | + String env = "env_example"; // String | 环境标识,例如 DEV、FAT、UAT、PROD + String operator = "operator_example"; // String | 操作人用户名 + OpenAppDTO openAppDTO = new OpenAppDTO(); // OpenAppDTO | try { - OpenapiV1AppsGet401Response result = apiInstance.openapiV1AppsAppIdDelete(appId); + Object result = apiInstance.createAppInEnv(env, operator, openAppDTO); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#openapiV1AppsAppIdDelete"); + System.err.println("Exception when calling AppManagementApi#createAppInEnv"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -139,11 +139,13 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | +| **env** | **String**| 环境标识,例如 DEV、FAT、UAT、PROD | | +| **operator** | **String**| 操作人用户名 | | +| **openAppDTO** | [**OpenAppDTO**](OpenAppDTO.md)| | | ### Return type -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) +**Object** ### Authorization @@ -151,23 +153,23 @@ public class Example { ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | 应用删除成功 | - | -| **403** | 权限不足,需要超级管理员权限 | - | -| **404** | 应用不存在 | - | +| **200** | 应用在指定环境创建成功 | - | +| **400** | 请求参数错误 | - | +| **403** | 权限不足 | - | - -# **openapiV1AppsAppIdEnvClustersGet** -> List<OpenEnvClusterDTO> openapiV1AppsAppIdEnvClustersGet(appId) + +# **deleteApp** +> Object deleteApp(appId, operator) -获取应用的环境集群信息 +删除应用(new added) -GET /openapi/v1/apps/{appId}/env-clusters +DELETE /openapi/v1/apps/{appId} ### Example ```java @@ -183,7 +185,7 @@ 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"); @@ -191,12 +193,13 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String appId = "appId_example"; // String | + String appId = "appId_example"; // String | 应用ID + String operator = "operator_example"; // String | 操作人用户名 try { - List result = apiInstance.openapiV1AppsAppIdEnvClustersGet(appId); + Object result = apiInstance.deleteApp(appId, operator); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#openapiV1AppsAppIdEnvClustersGet"); + System.err.println("Exception when calling AppManagementApi#deleteApp"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -210,11 +213,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | +| **appId** | **String**| 应用ID | | +| **operator** | **String**| 操作人用户名 | | ### Return type -[**List<OpenEnvClusterDTO>**](OpenEnvClusterDTO.md) +**Object** ### Authorization @@ -228,16 +232,17 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | 成功获取应用环境集群信息 | - | +| **200** | 应用删除成功 | - | +| **403** | 权限不足,需要超级管理员权限 | - | | **404** | 应用不存在 | - | - -# **openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete** -> Object openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete(appId, env, clusterName, namespaceName) + +# **findApps** +> List<OpenAppDTO> findApps(appIds) -删除关联的Namespace +查找应用 (original openapi) -DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links +POST /openapi/v1/apps ### Example ```java @@ -253,7 +258,7 @@ 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"); @@ -261,15 +266,12 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | + String appIds = "123"; // String | 查找应用 try { - Object result = apiInstance.openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete(appId, env, clusterName, namespaceName); + List result = apiInstance.findApps(appIds); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete"); + System.err.println("Exception when calling AppManagementApi#findApps"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -283,14 +285,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | +| **appIds** | **String**| 查找应用 | [optional] | ### Return type -**Object** +[**List<OpenAppDTO>**](OpenAppDTO.md) ### Authorization @@ -304,15 +303,16 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | | - | +| **200** | 成功获取应用列表 | - | +| **401** | 未授权访问 | - | - -# **openapiV1AppsAppIdGet** -> OpenAppDTO openapiV1AppsAppIdGet(appId) + +# **findAppsAuthorized** +> List<OpenAppDTO> findAppsAuthorized() -获取单个应用信息 +获取当前Consumer授权的应用列表 (original openapi) -GET /openapi/v1/apps/{appId} +GET /openapi/v1/apps/authorized ### Example ```java @@ -328,7 +328,7 @@ 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"); @@ -336,12 +336,11 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String appId = "appId_example"; // String | try { - OpenAppDTO result = apiInstance.openapiV1AppsAppIdGet(appId); + List result = apiInstance.findAppsAuthorized(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#openapiV1AppsAppIdGet"); + System.err.println("Exception when calling AppManagementApi#findAppsAuthorized"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -352,14 +351,11 @@ public class Example { ``` ### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | +This endpoint does not need any parameter. ### Return type -[**OpenAppDTO**](OpenAppDTO.md) +[**List<OpenAppDTO>**](OpenAppDTO.md) ### Authorization @@ -373,14 +369,14 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | 成功获取应用信息 | - | -| **404** | 应用不存在 | - | +| **200** | 成功获取授权应用列表 | - | +| **401** | 未授权访问 | - | - -# **openapiV1AppsAppIdMissEnvsGet** -> List<String> openapiV1AppsAppIdMissEnvsGet(appId) + +# **findMissEnvs** +> MultiResponseEntity findMissEnvs(appId) -查找缺失的环境 +查找缺失的环境(new added) GET /openapi/v1/apps/{appId}/miss_envs @@ -398,7 +394,7 @@ 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"); @@ -406,12 +402,12 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String appId = "appId_example"; // String | + String appId = "appId_example"; // String | 应用ID try { - List result = apiInstance.openapiV1AppsAppIdMissEnvsGet(appId); + MultiResponseEntity result = apiInstance.findMissEnvs(appId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#openapiV1AppsAppIdMissEnvsGet"); + System.err.println("Exception when calling AppManagementApi#findMissEnvs"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -425,11 +421,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | +| **appId** | **String**| 应用ID | | ### Return type -**List<String>** +[**MultiResponseEntity**](MultiResponseEntity.md) ### Authorization @@ -446,13 +442,13 @@ public class Example { | **200** | 成功获取应用缺失的环境列表 | - | | **404** | 应用不存在 | - | - -# **openapiV1AppsAppIdNamespacesReleasesStatusGet** -> Map<String, Map<String, Boolean>> openapiV1AppsAppIdNamespacesReleasesStatusGet(appId) + +# **getApp** +> OpenAppDTO getApp(appId) -获取应用下所有Namespace的发布状态 +获取单个应用信息(new added) -GET /openapi/v1/apps/{appId}/namespaces/releases/status +GET /openapi/v1/apps/{appId} ### Example ```java @@ -468,7 +464,7 @@ 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"); @@ -476,12 +472,12 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String appId = "appId_example"; // String | + String appId = "appId_example"; // String | try { - Map> result = apiInstance.openapiV1AppsAppIdNamespacesReleasesStatusGet(appId); + OpenAppDTO result = apiInstance.getApp(appId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#openapiV1AppsAppIdNamespacesReleasesStatusGet"); + System.err.println("Exception when calling AppManagementApi#getApp"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -499,7 +495,7 @@ public class Example { ### Return type -[**Map<String, Map<String, Boolean>>**](Map.md) +[**OpenAppDTO**](OpenAppDTO.md) ### Authorization @@ -513,13 +509,14 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | | - | +| **200** | 成功获取应用信息 | - | +| **404** | 应用不存在 | - | - -# **openapiV1AppsAppIdNavtreeGet** -> List<EnvClusterInfo> openapiV1AppsAppIdNavtreeGet(appId) + +# **getAppNavTree** +> MultiResponseEntity getAppNavTree(appId) -获取应用导航树 +获取应用导航树(new added) GET /openapi/v1/apps/{appId}/navtree @@ -537,7 +534,7 @@ 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"); @@ -545,12 +542,12 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String appId = "appId_example"; // String | + String appId = "appId_example"; // String | 应用ID try { - List result = apiInstance.openapiV1AppsAppIdNavtreeGet(appId); + MultiResponseEntity result = apiInstance.getAppNavTree(appId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#openapiV1AppsAppIdNavtreeGet"); + System.err.println("Exception when calling AppManagementApi#getAppNavTree"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -564,11 +561,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | +| **appId** | **String**| 应用ID | | ### Return type -[**List<EnvClusterInfo>**](EnvClusterInfo.md) +[**MultiResponseEntity**](MultiResponseEntity.md) ### Authorization @@ -584,13 +581,13 @@ public class Example { |-------------|-------------|------------------| | **200** | 成功获取应用导航树 | - | - -# **openapiV1AppsAppIdPut** -> OpenAppDTO openapiV1AppsAppIdPut(appId, openAppDTO) + +# **getAppsBySelf** +> List<OpenAppDTO> getAppsBySelf(page, size) -更新应用 +获取当前Consumer的应用列表(分页)(new added) -PUT /openapi/v1/apps/{appId} +GET /openapi/v1/apps/by-self ### Example ```java @@ -606,7 +603,7 @@ 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"); @@ -614,13 +611,13 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String appId = "appId_example"; // String | - OpenAppDTO openAppDTO = new OpenAppDTO(); // OpenAppDTO | + Integer page = 56; // Integer | 页数 + Integer size = 56; // Integer | 页大小 try { - OpenAppDTO result = apiInstance.openapiV1AppsAppIdPut(appId, openAppDTO); + List result = apiInstance.getAppsBySelf(page, size); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#openapiV1AppsAppIdPut"); + 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()); @@ -634,75 +631,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **openAppDTO** | [**OpenAppDTO**](OpenAppDTO.md)| | | - -### Return type - -[**OpenAppDTO**](OpenAppDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | -| **400** | 请求参数错误 | - | -| **403** | 权限不足 | - | - - -# **openapiV1AppsBySelfGet** -> List<OpenAppDTO> openapiV1AppsBySelfGet() - -获取当前Consumer的应用列表(分页) - -GET /openapi/v1/apps/by-self - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppManagementApi apiInstance = new AppManagementApi(defaultClient); - try { - List result = apiInstance.openapiV1AppsBySelfGet(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#openapiV1AppsBySelfGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. +| **page** | **Integer**| 页数 | | +| **size** | **Integer**| 页大小 | | ### Return type @@ -723,13 +653,13 @@ This endpoint does not need any parameter. | **200** | 成功获取Consumer的应用列表 | - | | **401** | 未授权访问 | - | - -# **openapiV1AppsEnvsEnvPost** -> OpenapiV1AppsGet401Response openapiV1AppsEnvsEnvPost(env, openAppDTO) + +# **getEnvClusterInfo** +> List<OpenEnvClusterDTO> getEnvClusterInfo(appId) -在指定环境创建应用 +获取应用的环境集群信息 (original openapi) -POST /openapi/v1/apps/envs/{env} +GET /openapi/v1/apps/{appId}/envclusters ### Example ```java @@ -745,80 +675,7 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String env = "env_example"; // String | - OpenAppDTO openAppDTO = new OpenAppDTO(); // OpenAppDTO | - try { - OpenapiV1AppsGet401Response result = apiInstance.openapiV1AppsEnvsEnvPost(env, openAppDTO); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#openapiV1AppsEnvsEnvPost"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **env** | **String**| | | -| **openAppDTO** | [**OpenAppDTO**](OpenAppDTO.md)| | | -### Return type - -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 应用在指定环境创建成功 | - | -| **400** | 请求参数错误 | - | -| **403** | 权限不足 | - | - - -# **openapiV1AppsGet** -> List<OpenAppDTO> openapiV1AppsGet(authorized) - -获取当前Consumer授权的应用列表 - -GET /openapi/v1/apps?authorized=true - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); ApiKeyAuth.setApiKey("YOUR API KEY"); @@ -826,12 +683,12 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String authorized = "true"; // String | 是否只返回授权的应用 + String appId = "appId_example"; // String | 应用ID try { - List result = apiInstance.openapiV1AppsGet(authorized); + List result = apiInstance.getEnvClusterInfo(appId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#openapiV1AppsGet"); + 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()); @@ -845,11 +702,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **authorized** | **String**| 是否只返回授权的应用 | [optional] | +| **appId** | **String**| 应用ID | | ### Return type -[**List<OpenAppDTO>**](OpenAppDTO.md) +[**List<OpenEnvClusterDTO>**](OpenEnvClusterDTO.md) ### Authorization @@ -863,16 +720,16 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | 成功获取授权应用列表 | - | -| **401** | 未授权访问 | - | +| **200** | 成功获取应用环境集群信息 | - | +| **404** | 应用不存在 | - | - -# **openapiV1AppsPost** -> OpenAppDTO openapiV1AppsPost(openapiV1AppsPostRequest) + +# **updateApp** +> OpenAppDTO updateApp(appId, operator, openAppDTO) -创建应用 +更新应用(new added) -POST /openapi/v1/apps +PUT /openapi/v1/apps/{appId} ### Example ```java @@ -888,7 +745,7 @@ 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"); @@ -896,12 +753,14 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); AppManagementApi apiInstance = new AppManagementApi(defaultClient); - OpenapiV1AppsPostRequest openapiV1AppsPostRequest = new OpenapiV1AppsPostRequest(); // OpenapiV1AppsPostRequest | + String appId = "appId_example"; // String | 应用ID + String operator = "operator_example"; // String | 操作人用户名 + OpenAppDTO openAppDTO = new OpenAppDTO(); // OpenAppDTO | try { - OpenAppDTO result = apiInstance.openapiV1AppsPost(openapiV1AppsPostRequest); + OpenAppDTO result = apiInstance.updateApp(appId, operator, openAppDTO); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#openapiV1AppsPost"); + System.err.println("Exception when calling AppManagementApi#updateApp"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -915,7 +774,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **openapiV1AppsPostRequest** | [**OpenapiV1AppsPostRequest**](OpenapiV1AppsPostRequest.md)| | | +| **appId** | **String**| 应用ID | | +| **operator** | **String**| 操作人用户名 | | +| **openAppDTO** | [**OpenAppDTO**](OpenAppDTO.md)| | | ### Return type @@ -933,7 +794,6 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | 应用创建成功 | - | +| **200** | 应用更新成功 | - | | **400** | 请求参数错误 | - | | **403** | 权限不足 | - | - diff --git a/java-client/docs/Change.md b/java-client/docs/Change.md deleted file mode 100644 index fcab3b71..00000000 --- a/java-client/docs/Change.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# Change - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | -|**entity** | [**EntityPairKVEntity**](EntityPairKVEntity.md) | | [optional] | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| ADDED | "ADDED" | -| MODIFIED | "MODIFIED" | -| DELETED | "DELETED" | - - - diff --git a/java-client/docs/ClusterDTO.md b/java-client/docs/ClusterDTO.md deleted file mode 100644 index c936fb44..00000000 --- a/java-client/docs/ClusterDTO.md +++ /dev/null @@ -1,23 +0,0 @@ - - -# ClusterDTO - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dataChangeCreatedBy** | **String** | | [optional] | -|**dataChangeLastModifiedBy** | **String** | | [optional] | -|**dataChangeCreatedByDisplayName** | **String** | | [optional] | -|**dataChangeLastModifiedByDisplayName** | **String** | | [optional] | -|**dataChangeCreatedTime** | **String** | | [optional] | -|**dataChangeLastModifiedTime** | **String** | | [optional] | -|**id** | **Long** | | [optional] | -|**name** | **String** | | | -|**appId** | **String** | | | -|**parentClusterId** | **Long** | | [optional] | -|**comment** | **String** | | [optional] | - - - diff --git a/java-client/docs/ClusterManagementApi.md b/java-client/docs/ClusterManagementApi.md index 7b098683..96f8b509 100644 --- a/java-client/docs/ClusterManagementApi.md +++ b/java-client/docs/ClusterManagementApi.md @@ -4,20 +4,18 @@ All URIs are relative to *http://localhost* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**openapiV1AppsAppIdClustersClusterNameGet**](ClusterManagementApi.md#openapiV1AppsAppIdClustersClusterNameGet) | **GET** /openapi/v1/apps/{appId}/clusters/{clusterName} | 获取指定集群信息 | -| [**openapiV1AppsAppIdClustersPost**](ClusterManagementApi.md#openapiV1AppsAppIdClustersPost) | **POST** /openapi/v1/apps/{appId}/clusters | 创建集群 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete**](ClusterManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 删除集群 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet**](ClusterManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches | 获取命名空间分支信息 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet**](ClusterManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} | 获取指定的Namespace | +| [**createCluster**](ClusterManagementApi.md#createCluster) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters | 创建集群 (original openapi) | +| [**deleteCluster**](ClusterManagementApi.md#deleteCluster) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 删除集群 (new added) | +| [**getCluster**](ClusterManagementApi.md#getCluster) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 获取指定集群信息 (original openapi) | - -# **openapiV1AppsAppIdClustersClusterNameGet** -> OpenClusterDTO openapiV1AppsAppIdClustersClusterNameGet(appId, clusterName) + +# **createCluster** +> OpenClusterDTO createCluster(appId, env, openClusterDTO) -获取指定集群信息 +创建集群 (original openapi) -GET /openapi/v1/apps/{appId}/clusters/{clusterName} +POST /openapi/v1/envs/{env}/apps/{appId}/clusters ### Example ```java @@ -33,79 +31,7 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ClusterManagementApi apiInstance = new ClusterManagementApi(defaultClient); - String appId = "appId_example"; // String | - String clusterName = "clusterName_example"; // String | - try { - OpenClusterDTO result = apiInstance.openapiV1AppsAppIdClustersClusterNameGet(appId, clusterName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ClusterManagementApi#openapiV1AppsAppIdClustersClusterNameGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **clusterName** | **String**| | | - -### Return type - -[**OpenClusterDTO**](OpenClusterDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功获取集群信息 | - | -| **404** | 集群不存在 | - | - - -# **openapiV1AppsAppIdClustersPost** -> OpenClusterDTO openapiV1AppsAppIdClustersPost(appId, openClusterDTO) - -创建集群 - -POST /openapi/v1/apps/{appId}/clusters - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ClusterManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); ApiKeyAuth.setApiKey("YOUR API KEY"); @@ -113,13 +39,14 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); ClusterManagementApi apiInstance = new ClusterManagementApi(defaultClient); - String appId = "appId_example"; // String | - OpenClusterDTO openClusterDTO = new OpenClusterDTO(); // OpenClusterDTO | + String appId = "appId_example"; // String | 应用ID + String env = "env_example"; // String | + OpenClusterDTO openClusterDTO = new OpenClusterDTO(); // OpenClusterDTO | try { - OpenClusterDTO result = apiInstance.openapiV1AppsAppIdClustersPost(appId, openClusterDTO); + OpenClusterDTO result = apiInstance.createCluster(appId, env, openClusterDTO); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling ClusterManagementApi#openapiV1AppsAppIdClustersPost"); + System.err.println("Exception when calling ClusterManagementApi#createCluster"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -133,7 +60,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | +| **appId** | **String**| 应用ID | | +| **env** | **String**| | | | **openClusterDTO** | [**OpenClusterDTO**](OpenClusterDTO.md)| | | ### Return type @@ -156,11 +84,11 @@ public class Example { | **400** | 请求参数错误 | - | | **403** | 权限不足 | - | - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete** -> OpenapiV1AppsGet401Response openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete(env, appId, clusterName) + +# **deleteCluster** +> Object deleteCluster(env, appId, clusterName, operator) -删除集群 +删除集群 (new added) DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} @@ -178,7 +106,7 @@ 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"); @@ -186,14 +114,15 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); ClusterManagementApi apiInstance = new ClusterManagementApi(defaultClient); - String env = "env_example"; // String | - String appId = "appId_example"; // String | - String clusterName = "clusterName_example"; // String | + String env = "env_example"; // String | + String appId = "appId_example"; // String | + String clusterName = "clusterName_example"; // String | + String operator = "operator_example"; // String | 操作人用户名 try { - OpenapiV1AppsGet401Response result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete(env, appId, clusterName); + Object result = apiInstance.deleteCluster(env, appId, clusterName, operator); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling ClusterManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete"); + System.err.println("Exception when calling ClusterManagementApi#deleteCluster"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -210,10 +139,11 @@ public class Example { | **env** | **String**| | | | **appId** | **String**| | | | **clusterName** | **String**| | | +| **operator** | **String**| 操作人用户名 | | ### Return type -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) +**Object** ### Authorization @@ -232,13 +162,13 @@ public class Example { | **403** | 权限不足 | - | | **404** | 集群不存在 | - | - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet** -> OpenNamespaceDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet(appId, env, clusterName, namespaceName) + +# **getCluster** +> OpenClusterDTO getCluster(appId, clusterName, env) -获取命名空间分支信息 +获取指定集群信息 (original openapi) -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} ### Example ```java @@ -254,83 +184,7 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ClusterManagementApi apiInstance = new ClusterManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - try { - OpenNamespaceDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet(appId, env, clusterName, namespaceName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ClusterManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | - -### Return type - -[**OpenNamespaceDTO**](OpenNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | -| **404** | 分支不存在 | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet** -> OpenNamespaceDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet(appId, env, clusterName, namespaceName, fillItemDetail) - -获取指定的Namespace - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ClusterManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); ApiKeyAuth.setApiKey("YOUR API KEY"); @@ -338,16 +192,14 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); ClusterManagementApi apiInstance = new ClusterManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - Boolean fillItemDetail = true; // Boolean | + String appId = "appId_example"; // String | + String clusterName = "clusterName_example"; // String | + String env = "env_example"; // String | try { - OpenNamespaceDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet(appId, env, clusterName, namespaceName, fillItemDetail); + OpenClusterDTO result = apiInstance.getCluster(appId, clusterName, env); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling ClusterManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet"); + System.err.println("Exception when calling ClusterManagementApi#getCluster"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -362,14 +214,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **appId** | **String**| | | -| **env** | **String**| | | | **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **fillItemDetail** | **Boolean**| | | +| **env** | **String**| | | ### Return type -[**OpenNamespaceDTO**](OpenNamespaceDTO.md) +[**OpenClusterDTO**](OpenClusterDTO.md) ### Authorization @@ -383,5 +233,5 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | | - | - +| **200** | 成功获取集群信息 | - | +| **404** | 集群不存在 | - | diff --git a/java-client/docs/EntityPairKVEntity.md b/java-client/docs/EntityPairKVEntity.md deleted file mode 100644 index c8b1d4ce..00000000 --- a/java-client/docs/EntityPairKVEntity.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# EntityPairKVEntity - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**firstEntity** | [**KVEntity**](KVEntity.md) | | [optional] | -|**secondEntity** | [**KVEntity**](KVEntity.md) | | [optional] | - - - diff --git a/java-client/docs/EnvClusterInfo.md b/java-client/docs/EnvClusterInfo.md deleted file mode 100644 index 2ba034c0..00000000 --- a/java-client/docs/EnvClusterInfo.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# EnvClusterInfo - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**env** | **String** | | [optional] | -|**clusters** | [**List<ClusterDTO>**](ClusterDTO.md) | | [optional] | - - - diff --git a/java-client/docs/InstanceManagementApi.md b/java-client/docs/InstanceManagementApi.md index bff9b41c..4976b4ad 100644 --- a/java-client/docs/InstanceManagementApi.md +++ b/java-client/docs/InstanceManagementApi.md @@ -4,18 +4,18 @@ All URIs are relative to *http://localhost* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet**](InstanceManagementApi.md#openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet) | **GET** /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 获取命名空间下的实例数量 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet**](InstanceManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 查询不在指定发布版本中的实例 | -| [**openapiV1EnvsEnvReleasesReleaseIdInstancesGet**](InstanceManagementApi.md#openapiV1EnvsEnvReleasesReleaseIdInstancesGet) | **GET** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) | +| [**getInstanceCountByNamespace**](InstanceManagementApi.md#getInstanceCountByNamespace) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 获取命名空间下的实例数量 (original openapi) | +| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet**](InstanceManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int | 查询不在指定发布版本中的实例 (new added) | +| [**openapiV1EnvsEnvReleasesReleaseIdInstancesGet**](InstanceManagementApi.md#openapiV1EnvsEnvReleasesReleaseIdInstancesGet) | **GET** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) (new added) | - -# **openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet** -> Integer openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(appId, clusterName, namespaceName) + +# **getInstanceCountByNamespace** +> Integer getInstanceCountByNamespace(env, appId, clusterName, namespaceName) -获取命名空间下的实例数量 +获取命名空间下的实例数量 (original openapi) -GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances ### Example ```java @@ -31,7 +31,7 @@ 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"); @@ -39,14 +39,15 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); InstanceManagementApi apiInstance = new InstanceManagementApi(defaultClient); - String appId = "appId_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | + String env = "env_example"; // String | + String appId = "appId_example"; // String | 应用ID + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 命名空间名称 try { - Integer result = apiInstance.openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(appId, clusterName, namespaceName); + Integer result = apiInstance.getInstanceCountByNamespace(env, appId, clusterName, namespaceName); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling InstanceManagementApi#openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet"); + System.err.println("Exception when calling InstanceManagementApi#getInstanceCountByNamespace"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -60,9 +61,10 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | +| **env** | **String**| | | +| **appId** | **String**| 应用ID | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 命名空间名称 | | ### Return type @@ -80,13 +82,13 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | | - | +| **200** | 成功返回实例数量 | - | - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet** -> List<OpenInstanceDTO> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(env, appId, clusterName, namespaceName, excludeReleases) + +# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet** +> List<OpenInstanceDTO> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(env, appId, clusterName, namespaceName, excludeReleases) -查询不在指定发布版本中的实例 +查询不在指定发布版本中的实例 (new added) GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 @@ -104,7 +106,7 @@ 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"); @@ -112,16 +114,16 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); InstanceManagementApi apiInstance = new InstanceManagementApi(defaultClient); - String env = "env_example"; // String | - String appId = "appId_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | + String env = "env_example"; // String | 环境标识 + String appId = "appId_example"; // String | 应用ID + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 命名空间名称 String excludeReleases = "excludeReleases_example"; // String | 排除的发布ID列表,用逗号分隔 try { - List result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(env, appId, clusterName, namespaceName, excludeReleases); + List result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(env, appId, clusterName, namespaceName, excludeReleases); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling InstanceManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet"); + System.err.println("Exception when calling InstanceManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -135,10 +137,10 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **env** | **String**| | | -| **appId** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | +| **env** | **String**| 环境标识 | | +| **appId** | **String**| 应用ID | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 命名空间名称 | | | **excludeReleases** | **String**| 排除的发布ID列表,用逗号分隔 | [optional] | ### Return type @@ -163,7 +165,7 @@ public class Example { # **openapiV1EnvsEnvReleasesReleaseIdInstancesGet** > OpenPageDTOOpenInstanceDTO openapiV1EnvsEnvReleasesReleaseIdInstancesGet(env, releaseId, page, size) -根据发布版本查询实例(支持分页) +根据发布版本查询实例(支持分页) (new added) GET /openapi/v1/envs/{env}/releases/{releaseId}/instances @@ -181,7 +183,7 @@ 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"); @@ -189,10 +191,10 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); InstanceManagementApi apiInstance = new InstanceManagementApi(defaultClient); - String env = "env_example"; // String | - Integer releaseId = 56; // Integer | - Integer page = 0; // Integer | - Integer size = 20; // Integer | + String env = "env_example"; // String | + Integer releaseId = 56; // Integer | + Integer page = 0; // Integer | + Integer size = 20; // Integer | try { OpenPageDTOOpenInstanceDTO result = apiInstance.openapiV1EnvsEnvReleasesReleaseIdInstancesGet(env, releaseId, page, size); System.out.println(result); @@ -233,4 +235,3 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | | - | - diff --git a/java-client/docs/ItemChangeSets.md b/java-client/docs/ItemChangeSets.md deleted file mode 100644 index 235cf94d..00000000 --- a/java-client/docs/ItemChangeSets.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# ItemChangeSets - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dataChangeCreatedBy** | **String** | | [optional] | -|**dataChangeLastModifiedBy** | **String** | | [optional] | -|**dataChangeCreatedByDisplayName** | **String** | | [optional] | -|**dataChangeLastModifiedByDisplayName** | **String** | | [optional] | -|**dataChangeCreatedTime** | **String** | | [optional] | -|**dataChangeLastModifiedTime** | **String** | | [optional] | -|**createItems** | [**List<ItemDTO>**](ItemDTO.md) | | [optional] | -|**updateItems** | [**List<ItemDTO>**](ItemDTO.md) | | [optional] | -|**deleteItems** | [**List<ItemDTO>**](ItemDTO.md) | | [optional] | - - - diff --git a/java-client/docs/ItemDTO.md b/java-client/docs/ItemDTO.md deleted file mode 100644 index 06148a25..00000000 --- a/java-client/docs/ItemDTO.md +++ /dev/null @@ -1,25 +0,0 @@ - - -# ItemDTO - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dataChangeCreatedBy** | **String** | | [optional] | -|**dataChangeLastModifiedBy** | **String** | | [optional] | -|**dataChangeCreatedByDisplayName** | **String** | | [optional] | -|**dataChangeLastModifiedByDisplayName** | **String** | | [optional] | -|**dataChangeCreatedTime** | **String** | | [optional] | -|**dataChangeLastModifiedTime** | **String** | | [optional] | -|**id** | **Long** | | [optional] | -|**namespaceId** | **Long** | | [optional] | -|**key** | **String** | | [optional] | -|**type** | **Integer** | | [optional] | -|**value** | **String** | | [optional] | -|**comment** | **String** | | [optional] | -|**lineNum** | **Integer** | | [optional] | - - - diff --git a/java-client/docs/ItemManagementApi.md b/java-client/docs/ItemManagementApi.md index a920a179..a0a7f8f9 100644 --- a/java-client/docs/ItemManagementApi.md +++ b/java-client/docs/ItemManagementApi.md @@ -4,28 +4,29 @@ All URIs are relative to *http://localhost* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete**](ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key删除配置项 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet**](ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过查询参数获取配置项(支持编码的key) | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut**](ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key更新配置项 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut**](ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate | 通过文本批量修改配置项 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost**](ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare | 对比命名空间配置差异 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet**](ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 获取命名空间下的配置项列表 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete**](ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 删除配置项 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet**](ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 获取单个配置项 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut**](ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 更新配置项 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost**](ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 创建新的配置项 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost**](ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert | 撤销配置项更改 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost**](ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync | 同步配置项到多个命名空间 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost**](ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate | 验证配置文本语法 | - - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete** -> Object openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete(appId, env, clusterName, namespaceName, key, operator) - -通过编码的key删除配置项 - -DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} +| [**batchUpdateItemsByText**](ItemManagementApi.md#batchUpdateItemsByText) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate | 通过文本批量修改配置项 (new added) | +| [**compareItems**](ItemManagementApi.md#compareItems) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare | 对比命名空间配置差异 (new added) | +| [**createItem**](ItemManagementApi.md#createItem) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 创建新的配置项 (original openapi) | +| [**deleteItem**](ItemManagementApi.md#deleteItem) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 删除配置项 (original openapi) | +| [**deleteItemByEncodedKey**](ItemManagementApi.md#deleteItemByEncodedKey) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key删除配置项 (original openapi) | +| [**findItemsByNamespace**](ItemManagementApi.md#findItemsByNamespace) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 获取命名空间下的配置项列表 (original openapi) | +| [**getBranchItems**](ItemManagementApi.md#getBranchItems) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items | 获取分支下的配置项 (new added) | +| [**getItem**](ItemManagementApi.md#getItem) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 获取单个配置项 (original openapi) | +| [**getItemByEncodedKey**](ItemManagementApi.md#getItemByEncodedKey) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过查询参数获取配置项(支持编码的key) (original openapi) | +| [**revertItems**](ItemManagementApi.md#revertItems) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert | 撤销配置项更改 (new added) | +| [**syncItems**](ItemManagementApi.md#syncItems) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync | 同步配置项到多个命名空间 (new added) | +| [**updateItem**](ItemManagementApi.md#updateItem) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 更新配置项 (original openapi) | +| [**updateItemByEncodedKey**](ItemManagementApi.md#updateItemByEncodedKey) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key更新配置项 (original openapi) | +| [**validateItems**](ItemManagementApi.md#validateItems) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate | 验证配置文本语法 (new added) | + + + +# **batchUpdateItemsByText** +> Object batchUpdateItemsByText(appId, env, clusterName, namespaceName, operator, openNamespaceTextModel) + +通过文本批量修改配置项 (new added) + +PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate: ### Example ```java @@ -41,7 +42,7 @@ 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"); @@ -49,17 +50,17 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String key = "key_example"; // String | - String operator = "operator_example"; // String | + String appId = "appId_example"; // String | + String env = "env_example"; // String | + String clusterName = "clusterName_example"; // String | + String namespaceName = "namespaceName_example"; // String | + String operator = "operator_example"; // String | 操作人用户名 + OpenNamespaceTextModel openNamespaceTextModel = new OpenNamespaceTextModel(); // OpenNamespaceTextModel | try { - Object result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete(appId, env, clusterName, namespaceName, key, operator); + Object result = apiInstance.batchUpdateItemsByText(appId, env, clusterName, namespaceName, operator, openNamespaceTextModel); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete"); + System.err.println("Exception when calling ItemManagementApi#batchUpdateItemsByText"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -77,8 +78,8 @@ public class Example { | **env** | **String**| | | | **clusterName** | **String**| | | | **namespaceName** | **String**| | | -| **key** | **String**| | | -| **operator** | **String**| | | +| **operator** | **String**| 操作人用户名 | | +| **openNamespaceTextModel** | [**OpenNamespaceTextModel**](OpenNamespaceTextModel.md)| | | ### Return type @@ -90,21 +91,22 @@ public class Example { ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | | - | +| **200** | 批量更新配置项成功 | - | +| **403** | 权限不足 | - | - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet** -> OpenItemDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet(appId, env, clusterName, namespaceName, key) + +# **compareItems** +> List<OpenItemDiffs> compareItems(appId, env, clusterName, namespaceName, openNamespaceSyncModel) -通过查询参数获取配置项(支持编码的key) +对比命名空间配置差异 (new added) -GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false} +POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare ### Example ```java @@ -120,7 +122,7 @@ 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"); @@ -128,16 +130,16 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String key = "key_example"; // String | + String appId = "appId_example"; // String | 应用ID + String env = "env_example"; // String | 环境标识 + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 命名空间名称 + OpenNamespaceSyncModel openNamespaceSyncModel = new OpenNamespaceSyncModel(); // OpenNamespaceSyncModel | try { - OpenItemDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet(appId, env, clusterName, namespaceName, key); + List result = apiInstance.compareItems(appId, env, clusterName, namespaceName, openNamespaceSyncModel); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet"); + System.err.println("Exception when calling ItemManagementApi#compareItems"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -151,15 +153,15 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **key** | **String**| | | +| **appId** | **String**| 应用ID | | +| **env** | **String**| 环境标识 | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 命名空间名称 | | +| **openNamespaceSyncModel** | [**OpenNamespaceSyncModel**](OpenNamespaceSyncModel.md)| | | ### Return type -[**OpenItemDTO**](OpenItemDTO.md) +[**List<OpenItemDiffs>**](OpenItemDiffs.md) ### Authorization @@ -167,22 +169,21 @@ public class Example { ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | 成功获取配置项(支持编码key) | - | -| **404** | 配置项不存在 | - | +| **200** | 成功对比命名空间配置差异 | - | - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut** -> OpenapiV1AppsGet401Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO) + +# **createItem** +> OpenItemDTO createItem(appId, env, clusterName, namespaceName, operator, openItemDTO) -通过编码的key更新配置项 +创建新的配置项 (original openapi) -PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} +POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items ### Example ```java @@ -198,7 +199,7 @@ 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"); @@ -206,18 +207,17 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String key = "key_example"; // String | - Boolean createIfNotExists = false; // Boolean | - OpenItemDTO openItemDTO = new OpenItemDTO(); // OpenItemDTO | + String appId = "appId_example"; // String | 应用ID + String env = "env_example"; // String | 环境标识 + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 命名空间名称 + String operator = "operator_example"; // String | 操作人用户名 + OpenItemDTO openItemDTO = new OpenItemDTO(); // OpenItemDTO | try { - OpenapiV1AppsGet401Response result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); + OpenItemDTO result = apiInstance.createItem(appId, env, clusterName, namespaceName, operator, openItemDTO); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut"); + System.err.println("Exception when calling ItemManagementApi#createItem"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -231,17 +231,16 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **key** | **String**| | | -| **createIfNotExists** | **Boolean**| | | +| **appId** | **String**| 应用ID | | +| **env** | **String**| 环境标识 | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 命名空间名称 | | +| **operator** | **String**| 操作人用户名 | | | **openItemDTO** | [**OpenItemDTO**](OpenItemDTO.md)| | | ### Return type -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) +[**OpenItemDTO**](OpenItemDTO.md) ### Authorization @@ -255,18 +254,17 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | 配置项更新成功(编码key) | - | +| **200** | 配置项创建成功 | - | | **400** | 请求参数错误 | - | | **403** | 权限不足 | - | -| **404** | 配置项不存在 | - | - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut** -> OpenapiV1AppsGet401Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut(appId, env, clusterName, namespaceName, namespaceTextModel) + +# **deleteItem** +> Object deleteItem(appId, env, clusterName, namespaceName, key, operator) -通过文本批量修改配置项 +删除配置项 (original openapi) -PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate +DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} ### Example ```java @@ -282,7 +280,7 @@ 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"); @@ -290,16 +288,17 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - NamespaceTextModel namespaceTextModel = new NamespaceTextModel(); // NamespaceTextModel | + String appId = "appId_example"; // String | 应用ID + String env = "env_example"; // String | 环境标识 + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 命名空间名称 + String key = "key_example"; // String | 配置项键名 + String operator = "operator_example"; // String | 操作人用户名 try { - OpenapiV1AppsGet401Response result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut(appId, env, clusterName, namespaceName, namespaceTextModel); + Object result = apiInstance.deleteItem(appId, env, clusterName, namespaceName, key, operator); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut"); + System.err.println("Exception when calling ItemManagementApi#deleteItem"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -313,15 +312,16 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **namespaceTextModel** | [**NamespaceTextModel**](NamespaceTextModel.md)| | | +| **appId** | **String**| 应用ID | | +| **env** | **String**| 环境标识 | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 命名空间名称 | | +| **key** | **String**| 配置项键名 | | +| **operator** | **String**| 操作人用户名 | | ### Return type -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) +**Object** ### Authorization @@ -329,23 +329,21 @@ public class Example { ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | 批量更新配置项成功 | - | -| **400** | 请求参数错误 | - | -| **403** | 权限不足 | - | +| **200** | 配置项删除成功 | - | - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost** -> List<ListItemDiffs> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost(appId, env, clusterName, namespaceName, namespaceSyncModel) + +# **deleteItemByEncodedKey** +> Object deleteItemByEncodedKey(appId, env, clusterName, namespaceName, key, operator) -对比命名空间配置差异 +通过编码的key删除配置项 (original openapi) -POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare +DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} ### Example ```java @@ -361,7 +359,7 @@ 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"); @@ -369,16 +367,17 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - NamespaceSyncModel namespaceSyncModel = new NamespaceSyncModel(); // NamespaceSyncModel | + String appId = "appId_example"; // String | + String env = "env_example"; // String | + String clusterName = "clusterName_example"; // String | + String namespaceName = "namespaceName_example"; // String | + String key = "key_example"; // String | + String operator = "operator_example"; // String | try { - List result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost(appId, env, clusterName, namespaceName, namespaceSyncModel); + Object result = apiInstance.deleteItemByEncodedKey(appId, env, clusterName, namespaceName, key, operator); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost"); + System.err.println("Exception when calling ItemManagementApi#deleteItemByEncodedKey"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -396,11 +395,12 @@ public class Example { | **env** | **String**| | | | **clusterName** | **String**| | | | **namespaceName** | **String**| | | -| **namespaceSyncModel** | [**NamespaceSyncModel**](NamespaceSyncModel.md)| | | +| **key** | **String**| | | +| **operator** | **String**| | | ### Return type -[**List<ListItemDiffs>**](ListItemDiffs.md) +**Object** ### Authorization @@ -408,21 +408,21 @@ public class Example { ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | 成功对比命名空间配置差异 | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet** -> OpenPageDTOOpenItemDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet(appId, env, clusterName, namespaceName, page, size) +| **200** | | - | -获取命名空间下的配置项列表 + +# **findItemsByNamespace** +> OpenPageDTOOpenItemDTO findItemsByNamespace(appId, env, clusterName, namespaceName, page, size) +获取命名空间下的配置项列表 (original openapi) +获取指定命名空间的配置项列表,支持分页 ### Example ```java @@ -438,7 +438,7 @@ 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"); @@ -446,17 +446,17 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - Integer page = 0; // Integer | - Integer size = 50; // Integer | + String appId = "appId_example"; // String | 应用ID + String env = "env_example"; // String | 环境标识 + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 命名空间名称 + Integer page = 0; // Integer | 页码,从0开始 + Integer size = 50; // Integer | 每页数量 try { - OpenPageDTOOpenItemDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet(appId, env, clusterName, namespaceName, page, size); + OpenPageDTOOpenItemDTO result = apiInstance.findItemsByNamespace(appId, env, clusterName, namespaceName, page, size); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet"); + System.err.println("Exception when calling ItemManagementApi#findItemsByNamespace"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -470,12 +470,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **page** | **Integer**| | | -| **size** | **Integer**| | | +| **appId** | **String**| 应用ID | | +| **env** | **String**| 环境标识 | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 命名空间名称 | | +| **page** | **Integer**| 页码,从0开始 | | +| **size** | **Integer**| 每页数量 | | ### Return type @@ -496,13 +496,13 @@ public class Example { | **200** | 成功获取配置项列表 | - | | **404** | 命名空间不存在 | - | - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete** -> Object openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete(appId, env, clusterName, namespaceName, key, operator) + +# **getBranchItems** +> List<OpenItemDTO> getBranchItems(appId, env, clusterName, namespaceName, branchName) -删除配置项 +获取分支下的配置项 (new added) -DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: ### Example ```java @@ -518,7 +518,7 @@ 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"); @@ -526,17 +526,16 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String key = "key_example"; // String | - String operator = "operator_example"; // String | + String appId = "appId_example"; // String | 应用ID + String env = "env_example"; // String | 环境标识 + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 命名空间名称 + String branchName = "branchName_example"; // String | 分支名称 try { - Object result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete(appId, env, clusterName, namespaceName, key, operator); + List result = apiInstance.getBranchItems(appId, env, clusterName, namespaceName, branchName); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete"); + System.err.println("Exception when calling ItemManagementApi#getBranchItems"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -550,16 +549,15 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **key** | **String**| | | -| **operator** | **String**| | | +| **appId** | **String**| 应用ID | | +| **env** | **String**| 环境标识 | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 命名空间名称 | | +| **branchName** | **String**| 分支名称 | | ### Return type -**Object** +[**List<OpenItemDTO>**](OpenItemDTO.md) ### Authorization @@ -573,15 +571,16 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | | - | +| **200** | 成功获取分支下的配置项列表 | - | +| **404** | 分支不存在 | - | - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet** -> OpenItemDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet(appId, env, clusterName, namespaceName, key) + +# **getItem** +> OpenItemDTO getItem(appId, env, clusterName, namespaceName, key) -获取单个配置项 +获取单个配置项 (original openapi) -GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} ### Example ```java @@ -597,7 +596,7 @@ 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"); @@ -605,16 +604,16 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String key = "key_example"; // String | + String appId = "appId_example"; // String | 应用ID + String env = "env_example"; // String | 环境标识 + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 命名空间名称 + String key = "key_example"; // String | 配置项键名 try { - OpenItemDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet(appId, env, clusterName, namespaceName, key); + OpenItemDTO result = apiInstance.getItem(appId, env, clusterName, namespaceName, key); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet"); + System.err.println("Exception when calling ItemManagementApi#getItem"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -628,11 +627,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **key** | **String**| | | +| **appId** | **String**| 应用ID | | +| **env** | **String**| 环境标识 | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 命名空间名称 | | +| **key** | **String**| 配置项键名 | | ### Return type @@ -653,13 +652,91 @@ public class Example { | **200** | 成功获取配置项 | - | | **404** | 配置项不存在 | - | - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut** -> OpenapiV1AppsGet401Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO) + +# **getItemByEncodedKey** +> OpenItemDTO getItemByEncodedKey(appId, env, clusterName, namespaceName, key) + +通过查询参数获取配置项(支持编码的key) (original openapi) + +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ItemManagementApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); + String appId = "appId_example"; // String | + String env = "env_example"; // String | 环境标识 + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 命名空间名称 + String key = "key_example"; // String | 配置项键名(需要URL编码) + try { + OpenItemDTO result = apiInstance.getItemByEncodedKey(appId, env, clusterName, namespaceName, key); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ItemManagementApi#getItemByEncodedKey"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| | | +| **env** | **String**| 环境标识 | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 命名空间名称 | | +| **key** | **String**| 配置项键名(需要URL编码) | | + +### Return type + +[**OpenItemDTO**](OpenItemDTO.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功获取配置项(支持编码key) | - | +| **404** | 配置项不存在 | - | + + +# **revertItems** +> Object revertItems(appId, env, clusterName, namespaceName, operator) -更新配置项 +撤销配置项更改 (new added) -PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} +POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert ### Example ```java @@ -675,7 +752,7 @@ 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"); @@ -683,18 +760,16 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String key = "key_example"; // String | - Boolean createIfNotExists = false; // Boolean | - OpenItemDTO openItemDTO = new OpenItemDTO(); // OpenItemDTO | + String appId = "appId_example"; // String | + String env = "env_example"; // String | + String clusterName = "clusterName_example"; // String | + String namespaceName = "namespaceName_example"; // String | + String operator = "operator_example"; // String | 操作人用户名 try { - OpenapiV1AppsGet401Response result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); + Object result = apiInstance.revertItems(appId, env, clusterName, namespaceName, operator); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut"); + System.err.println("Exception when calling ItemManagementApi#revertItems"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -712,13 +787,11 @@ public class Example { | **env** | **String**| | | | **clusterName** | **String**| | | | **namespaceName** | **String**| | | -| **key** | **String**| | | -| **createIfNotExists** | **Boolean**| | | -| **openItemDTO** | [**OpenItemDTO**](OpenItemDTO.md)| | | +| **operator** | **String**| 操作人用户名 | | ### Return type -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) +**Object** ### Authorization @@ -726,24 +799,23 @@ public class Example { ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | 配置项更新成功 | - | +| **200** | 配置项更改撤销成功 | - | | **400** | 请求参数错误 | - | | **403** | 权限不足 | - | -| **404** | 配置项不存在 | - | - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost** -> OpenItemDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost(appId, env, clusterName, namespaceName, openItemDTO) + +# **syncItems** +> Object syncItems(appId, env, clusterName, namespaceName, operator, openNamespaceSyncModel) -创建新的配置项 +同步配置项到多个命名空间 (new added) -POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items +POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync: ### Example ```java @@ -759,7 +831,7 @@ 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"); @@ -767,16 +839,17 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - OpenItemDTO openItemDTO = new OpenItemDTO(); // OpenItemDTO | + String appId = "appId_example"; // String | 应用ID + String env = "env_example"; // String | 环境标识 + String clusterName = "clusterName_example"; // String | + String namespaceName = "namespaceName_example"; // String | + String operator = "operator_example"; // String | 操作人用户名 + OpenNamespaceSyncModel openNamespaceSyncModel = new OpenNamespaceSyncModel(); // OpenNamespaceSyncModel | try { - OpenItemDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost(appId, env, clusterName, namespaceName, openItemDTO); + Object result = apiInstance.syncItems(appId, env, clusterName, namespaceName, operator, openNamespaceSyncModel); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost"); + System.err.println("Exception when calling ItemManagementApi#syncItems"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -790,15 +863,16 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | +| **appId** | **String**| 应用ID | | +| **env** | **String**| 环境标识 | | | **clusterName** | **String**| | | | **namespaceName** | **String**| | | -| **openItemDTO** | [**OpenItemDTO**](OpenItemDTO.md)| | | +| **operator** | **String**| 操作人用户名 | | +| **openNamespaceSyncModel** | [**OpenNamespaceSyncModel**](OpenNamespaceSyncModel.md)| | | ### Return type -[**OpenItemDTO**](OpenItemDTO.md) +**Object** ### Authorization @@ -812,17 +886,17 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | 配置项创建成功 | - | +| **200** | 配置项同步成功 | - | | **400** | 请求参数错误 | - | | **403** | 权限不足 | - | - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost** -> OpenapiV1AppsGet401Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost(appId, env, clusterName, namespaceName) + +# **updateItem** +> Object updateItem(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO) -撤销配置项更改 +更新配置项 (original openapi) -POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert +PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} ### Example ```java @@ -838,7 +912,7 @@ 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"); @@ -846,15 +920,18 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | + String appId = "appId_example"; // String | + String env = "env_example"; // String | 环境标识 + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 命名空间名称 + String key = "key_example"; // String | + Boolean createIfNotExists = false; // Boolean | + OpenItemDTO openItemDTO = new OpenItemDTO(); // OpenItemDTO | try { - OpenapiV1AppsGet401Response result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost(appId, env, clusterName, namespaceName); + Object result = apiInstance.updateItem(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost"); + System.err.println("Exception when calling ItemManagementApi#updateItem"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -869,13 +946,16 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | +| **env** | **String**| 环境标识 | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 命名空间名称 | | +| **key** | **String**| | | +| **createIfNotExists** | **Boolean**| | [default to false] | +| **openItemDTO** | [**OpenItemDTO**](OpenItemDTO.md)| | | ### Return type -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) +**Object** ### Authorization @@ -883,23 +963,24 @@ public class Example { ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | 配置项更改撤销成功 | - | +| **200** | 配置项更新成功 | - | | **400** | 请求参数错误 | - | | **403** | 权限不足 | - | +| **404** | 配置项不存在 | - | - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost** -> OpenapiV1AppsGet401Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost(appId, env, clusterName, namespaceName, namespaceSyncModel) + +# **updateItemByEncodedKey** +> Object updateItemByEncodedKey(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO) -同步配置项到多个命名空间 +通过编码的key更新配置项 (original openapi) -POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync +PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} ### Example ```java @@ -915,7 +996,7 @@ 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"); @@ -923,16 +1004,18 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - NamespaceSyncModel namespaceSyncModel = new NamespaceSyncModel(); // NamespaceSyncModel | + String appId = "appId_example"; // String | 应用ID + String env = "env_example"; // String | 环境标识 + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 命名空间名称 + String key = "key_example"; // String | 配置项键名(需要URL编码) + Boolean createIfNotExists = false; // Boolean | 若不存在则创建(true/false) + OpenItemDTO openItemDTO = new OpenItemDTO(); // OpenItemDTO | try { - OpenapiV1AppsGet401Response result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost(appId, env, clusterName, namespaceName, namespaceSyncModel); + Object result = apiInstance.updateItemByEncodedKey(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost"); + System.err.println("Exception when calling ItemManagementApi#updateItemByEncodedKey"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -946,15 +1029,17 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **namespaceSyncModel** | [**NamespaceSyncModel**](NamespaceSyncModel.md)| | | +| **appId** | **String**| 应用ID | | +| **env** | **String**| 环境标识 | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 命名空间名称 | | +| **key** | **String**| 配置项键名(需要URL编码) | | +| **createIfNotExists** | **Boolean**| 若不存在则创建(true/false) | [default to false] | +| **openItemDTO** | [**OpenItemDTO**](OpenItemDTO.md)| | | ### Return type -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) +**Object** ### Authorization @@ -968,17 +1053,18 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | 配置项同步成功 | - | +| **200** | 配置项更新成功(编码key) | - | | **400** | 请求参数错误 | - | | **403** | 权限不足 | - | +| **404** | 配置项不存在 | - | - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost** -> OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost(appId, env, clusterName, namespaceName, namespaceTextModel) + +# **validateItems** +> Object validateItems(appId, env, clusterName, namespaceName, openNamespaceTextModel) -验证配置文本语法 +验证配置文本语法 (new added) -POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate +POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate ### Example ```java @@ -994,7 +1080,7 @@ 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"); @@ -1002,16 +1088,16 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - NamespaceTextModel namespaceTextModel = new NamespaceTextModel(); // NamespaceTextModel | + String appId = "appId_example"; // String | + String env = "env_example"; // String | + String clusterName = "clusterName_example"; // String | + String namespaceName = "namespaceName_example"; // String | + OpenNamespaceTextModel openNamespaceTextModel = new OpenNamespaceTextModel(); // OpenNamespaceTextModel | try { - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost(appId, env, clusterName, namespaceName, namespaceTextModel); + Object result = apiInstance.validateItems(appId, env, clusterName, namespaceName, openNamespaceTextModel); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost"); + System.err.println("Exception when calling ItemManagementApi#validateItems"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -1029,11 +1115,11 @@ public class Example { | **env** | **String**| | | | **clusterName** | **String**| | | | **namespaceName** | **String**| | | -| **namespaceTextModel** | [**NamespaceTextModel**](NamespaceTextModel.md)| | | +| **openNamespaceTextModel** | [**OpenNamespaceTextModel**](OpenNamespaceTextModel.md)| | | ### Return type -[**OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response**](OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md) +**Object** ### Authorization @@ -1049,4 +1135,3 @@ public class Example { |-------------|-------------|------------------| | **200** | 配置文本语法验证通过 | - | | **400** | 配置文本语法错误 | - | - diff --git a/java-client/docs/KVEntity.md b/java-client/docs/KVEntity.md index 45c1130e..a99d053e 100644 --- a/java-client/docs/KVEntity.md +++ b/java-client/docs/KVEntity.md @@ -7,8 +7,5 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**key** | **String** | | [optional] | -|**value** | **String** | | [optional] | - - - +|**key** | **String** | 键 | [optional] | +|**value** | **String** | 值 | [optional] | diff --git a/java-client/docs/ListItemDiffs.md b/java-client/docs/ListItemDiffs.md deleted file mode 100644 index e1b3cd09..00000000 --- a/java-client/docs/ListItemDiffs.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ListItemDiffs - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**namespace** | [**NamespaceIdentifier**](NamespaceIdentifier.md) | | [optional] | -|**diffs** | [**ItemChangeSets**](ItemChangeSets.md) | | [optional] | -|**extInfo** | **String** | | [optional] | - - - diff --git a/java-client/docs/MapString.md b/java-client/docs/MapString.md deleted file mode 100644 index a8698e9b..00000000 --- a/java-client/docs/MapString.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# MapString - -字符串映射对象,用于表示键值对的配置数据结构 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**key** | **String** | | [optional] | - - - diff --git a/java-client/docs/MultiResponseEntity.md b/java-client/docs/MultiResponseEntity.md new file mode 100644 index 00000000..bab0989f --- /dev/null +++ b/java-client/docs/MultiResponseEntity.md @@ -0,0 +1,12 @@ + + +# MultiResponseEntity + +A response container holding multiple RichResponseEntity objects + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | Overall HTTP status code | | +|**entities** | [**List<RichResponseEntity>**](RichResponseEntity.md) | List of rich response entities | | diff --git a/java-client/docs/NamespaceBranchManagementApi.md b/java-client/docs/NamespaceBranchManagementApi.md index 48515b96..d9076d83 100644 --- a/java-client/docs/NamespaceBranchManagementApi.md +++ b/java-client/docs/NamespaceBranchManagementApi.md @@ -4,24 +4,21 @@ All URIs are relative to *http://localhost* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost**](NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch | 创建命名空间分支 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete**](NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 删除命名空间分支 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost**](NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases | 创建灰度删除发布 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet**](NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules | 获取分支灰度发布规则 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut**](NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules | 更新分支灰度发布规则 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet**](NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items | 获取分支下的配置项 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost**](NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge | 合并分支 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch**](NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch) | **PATCH** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 合并分支到主分支 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost**](NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases | 创建灰度发布 | +| [**createBranch**](NamespaceBranchManagementApi.md#createBranch) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches | 创建命名空间分支 (original openapi) | +| [**deleteBranch**](NamespaceBranchManagementApi.md#deleteBranch) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 删除命名空间分支 (original openapi) | +| [**findBranch**](NamespaceBranchManagementApi.md#findBranch) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches | 获取命名空间分支信息 (original openapi) | +| [**getBranchGrayRules**](NamespaceBranchManagementApi.md#getBranchGrayRules) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules | 获取分支灰度发布规则 (original openapi) | +| [**mergeBranch**](NamespaceBranchManagementApi.md#mergeBranch) | **PATCH** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 合并分支到主分支 (new added) | +| [**updateBranchRules**](NamespaceBranchManagementApi.md#updateBranchRules) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules | 更新分支灰度发布规则 (original openapi) | - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost** -> OpenNamespaceDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost(appId, env, clusterName, namespaceName, operator) + +# **createBranch** +> OpenNamespaceDTO createBranch(appId, env, clusterName, namespaceName, operator) -创建命名空间分支 +创建命名空间分支 (original openapi) -POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch +POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches ### Example ```java @@ -37,7 +34,7 @@ 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"); @@ -45,16 +42,16 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); NamespaceBranchManagementApi apiInstance = new NamespaceBranchManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String operator = "operator_example"; // String | + String appId = "appId_example"; // String | app标识 + String env = "env_example"; // String | 环境标识 + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 命名空间名称 + String operator = "operator_example"; // String | 操作人用户名 try { - OpenNamespaceDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost(appId, env, clusterName, namespaceName, operator); + OpenNamespaceDTO result = apiInstance.createBranch(appId, env, clusterName, namespaceName, operator); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost"); + System.err.println("Exception when calling NamespaceBranchManagementApi#createBranch"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -68,11 +65,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **operator** | **String**| | | +| **appId** | **String**| app标识 | | +| **env** | **String**| 环境标识 | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 命名空间名称 | | +| **operator** | **String**| 操作人用户名 | | ### Return type @@ -90,13 +87,13 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | | - | +| **200** | 命名空间分支创建成功 | - | - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete** -> Object openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete(env, appId, clusterName, namespaceName, branchName, operator) + +# **deleteBranch** +> Object deleteBranch(env, appId, clusterName, namespaceName, branchName, operator) -删除命名空间分支 +删除命名空间分支 (original openapi) DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} @@ -114,7 +111,7 @@ 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"); @@ -122,17 +119,17 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); NamespaceBranchManagementApi apiInstance = new NamespaceBranchManagementApi(defaultClient); - String env = "env_example"; // String | - String appId = "appId_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String branchName = "branchName_example"; // String | - String operator = "operator_example"; // String | + String env = "env_example"; // String | 环境标识 + String appId = "appId_example"; // String | 应用ID + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 命名空间名称 + String branchName = "branchName_example"; // String | 分支名称 + String operator = "operator_example"; // String | 操作人用户名 try { - Object result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete(env, appId, clusterName, namespaceName, branchName, operator); + Object result = apiInstance.deleteBranch(env, appId, clusterName, namespaceName, branchName, operator); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete"); + System.err.println("Exception when calling NamespaceBranchManagementApi#deleteBranch"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -146,12 +143,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **env** | **String**| | | -| **appId** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **branchName** | **String**| | | -| **operator** | **String**| | | +| **env** | **String**| 环境标识 | | +| **appId** | **String**| 应用ID | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 命名空间名称 | | +| **branchName** | **String**| 分支名称 | | +| **operator** | **String**| 操作人用户名 | | ### Return type @@ -169,15 +166,15 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost** -> OpenReleaseDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO) +| **200** | 分支删除成功 | - | -创建灰度删除发布 + +# **findBranch** +> OpenNamespaceDTO findBranch(appId, env, clusterName, namespaceName) +获取命名空间分支信息 (original openapi) +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches ### Example ```java @@ -193,86 +190,7 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceBranchManagementApi apiInstance = new NamespaceBranchManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String branchName = "branchName_example"; // String | - NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO = new NamespaceGrayDelReleaseDTO(); // NamespaceGrayDelReleaseDTO | - try { - OpenReleaseDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **branchName** | **String**| | | -| **namespaceGrayDelReleaseDTO** | [**NamespaceGrayDelReleaseDTO**](NamespaceGrayDelReleaseDTO.md)| | | - -### Return type - -[**OpenReleaseDTO**](OpenReleaseDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet** -> OpenGrayReleaseRuleDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet(appId, env, clusterName, namespaceName, branchName) - -获取分支灰度发布规则 - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceBranchManagementApi; -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); ApiKeyAuth.setApiKey("YOUR API KEY"); @@ -280,16 +198,15 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); NamespaceBranchManagementApi apiInstance = new NamespaceBranchManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String branchName = "branchName_example"; // String | + String appId = "appId_example"; // String | 应用ID + String env = "env_example"; // String | 环境标识 + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 命名空间名称 try { - OpenGrayReleaseRuleDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet(appId, env, clusterName, namespaceName, branchName); + OpenNamespaceDTO result = apiInstance.findBranch(appId, env, clusterName, namespaceName); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet"); + System.err.println("Exception when calling NamespaceBranchManagementApi#findBranch"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -303,15 +220,14 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **branchName** | **String**| | | +| **appId** | **String**| 应用ID | | +| **env** | **String**| 环境标识 | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 命名空间名称 | | ### Return type -[**OpenGrayReleaseRuleDTO**](OpenGrayReleaseRuleDTO.md) +[**OpenNamespaceDTO**](OpenNamespaceDTO.md) ### Authorization @@ -325,15 +241,16 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | | - | +| **200** | 成功获取分支信息 | - | +| **404** | 分支不存在 | - | - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut** -> Object openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO) + +# **getBranchGrayRules** +> OpenGrayReleaseRuleDTO getBranchGrayRules(appId, env, clusterName, namespaceName, branchName) -更新分支灰度发布规则 +获取分支灰度发布规则 (original openapi) -PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules ### Example ```java @@ -349,88 +266,7 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceBranchManagementApi apiInstance = new NamespaceBranchManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String branchName = "branchName_example"; // String | - String operator = "operator_example"; // String | - OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO = new OpenGrayReleaseRuleDTO(); // OpenGrayReleaseRuleDTO | - try { - Object result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **branchName** | **String**| | | -| **operator** | **String**| | | -| **openGrayReleaseRuleDTO** | [**OpenGrayReleaseRuleDTO**](OpenGrayReleaseRuleDTO.md)| | | - -### Return type - -**Object** - -### Authorization -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet** -> List<OpenItemDTO> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet(appId, env, clusterName, namespaceName, branchName) - -获取分支下的配置项 - -GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceBranchManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); ApiKeyAuth.setApiKey("YOUR API KEY"); @@ -438,16 +274,16 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); NamespaceBranchManagementApi apiInstance = new NamespaceBranchManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String branchName = "branchName_example"; // String | + String appId = "appId_example"; // String | app标识 + String env = "env_example"; // String | 环境标识 + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 命名空间名称 + String branchName = "branchName_example"; // String | 分支名称 try { - List result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet(appId, env, clusterName, namespaceName, branchName); + OpenGrayReleaseRuleDTO result = apiInstance.getBranchGrayRules(appId, env, clusterName, namespaceName, branchName); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet"); + System.err.println("Exception when calling NamespaceBranchManagementApi#getBranchGrayRules"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -461,15 +297,15 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **branchName** | **String**| | | +| **appId** | **String**| app标识 | | +| **env** | **String**| 环境标识 | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 命名空间名称 | | +| **branchName** | **String**| 分支名称 | | ### Return type -[**List<OpenItemDTO>**](OpenItemDTO.md) +[**OpenGrayReleaseRuleDTO**](OpenGrayReleaseRuleDTO.md) ### Authorization @@ -483,16 +319,15 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | 成功获取分支下的配置项列表 | - | -| **404** | 分支不存在 | - | +| **200** | 成功获取灰度发布规则 | - | - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost** -> OpenReleaseDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO) - -合并分支 + +# **mergeBranch** +> OpenReleaseDTO mergeBranch(env, appId, clusterName, namespaceName, branchName, deleteBranch, operator, namespaceReleaseDTO) +合并分支到主分支 (new added) +PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") ### Example ```java @@ -508,7 +343,7 @@ 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"); @@ -516,18 +351,19 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); NamespaceBranchManagementApi apiInstance = new NamespaceBranchManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String branchName = "branchName_example"; // String | - Boolean deleteBranch = true; // Boolean | - NamespaceReleaseDTO namespaceReleaseDTO = new NamespaceReleaseDTO(); // NamespaceReleaseDTO | + String env = "env_example"; // String | 环境标识 + String appId = "appId_example"; // String | 应用ID + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 命名空间名称 + String branchName = "branchName_example"; // String | 分支名称 + Boolean deleteBranch = true; // Boolean | 合并后是否删除分支(true/false) + String operator = "operator_example"; // String | 操作人用户名 + NamespaceReleaseDTO namespaceReleaseDTO = new NamespaceReleaseDTO(); // NamespaceReleaseDTO | try { - OpenReleaseDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO); + OpenReleaseDTO result = apiInstance.mergeBranch(env, appId, clusterName, namespaceName, branchName, deleteBranch, operator, namespaceReleaseDTO); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost"); + System.err.println("Exception when calling NamespaceBranchManagementApi#mergeBranch"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -541,12 +377,13 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **branchName** | **String**| | | -| **deleteBranch** | **Boolean**| | | +| **env** | **String**| 环境标识 | | +| **appId** | **String**| 应用ID | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 命名空间名称 | | +| **branchName** | **String**| 分支名称 | | +| **deleteBranch** | **Boolean**| 合并后是否删除分支(true/false) | | +| **operator** | **String**| 操作人用户名 | | | **namespaceReleaseDTO** | [**NamespaceReleaseDTO**](NamespaceReleaseDTO.md)| | | ### Return type @@ -566,16 +403,14 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | 分支合并成功 | - | -| **400** | 合并参数错误 | - | -| **403** | 权限不足 | - | - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch** -> OpenReleaseDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(env, appId, clusterName, namespaceName, branchName, deleteBranch, xApolloOperator, namespaceReleaseDTO) + +# **updateBranchRules** +> Object updateBranchRules(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO) -合并分支到主分支 +更新分支灰度发布规则 (original openapi) -PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") +PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules ### Example ```java @@ -591,90 +426,7 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - NamespaceBranchManagementApi apiInstance = new NamespaceBranchManagementApi(defaultClient); - String env = "env_example"; // String | - String appId = "appId_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String branchName = "branchName_example"; // String | - Boolean deleteBranch = true; // Boolean | - String xApolloOperator = "xApolloOperator_example"; // String | - NamespaceReleaseDTO namespaceReleaseDTO = new NamespaceReleaseDTO(); // NamespaceReleaseDTO | - try { - OpenReleaseDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(env, appId, clusterName, namespaceName, branchName, deleteBranch, xApolloOperator, namespaceReleaseDTO); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **env** | **String**| | | -| **appId** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **branchName** | **String**| | | -| **deleteBranch** | **Boolean**| | | -| **xApolloOperator** | **String**| | | -| **namespaceReleaseDTO** | [**NamespaceReleaseDTO**](NamespaceReleaseDTO.md)| | | - -### Return type - -[**OpenReleaseDTO**](OpenReleaseDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost** -> OpenReleaseDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO) - -创建灰度发布 - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceBranchManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); ApiKeyAuth.setApiKey("YOUR API KEY"); @@ -682,17 +434,18 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); NamespaceBranchManagementApi apiInstance = new NamespaceBranchManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String branchName = "branchName_example"; // String | - NamespaceReleaseDTO namespaceReleaseDTO = new NamespaceReleaseDTO(); // NamespaceReleaseDTO | + String appId = "appId_example"; // String | 应用ID + String env = "env_example"; // String | 环境标识 + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 命名空间名称 + String branchName = "branchName_example"; // String | 分支名称 + String operator = "operator_example"; // String | 操作人用户名 + OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO = new OpenGrayReleaseRuleDTO(); // OpenGrayReleaseRuleDTO | try { - OpenReleaseDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO); + Object result = apiInstance.updateBranchRules(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost"); + System.err.println("Exception when calling NamespaceBranchManagementApi#updateBranchRules"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -706,16 +459,17 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **branchName** | **String**| | | -| **namespaceReleaseDTO** | [**NamespaceReleaseDTO**](NamespaceReleaseDTO.md)| | | +| **appId** | **String**| 应用ID | | +| **env** | **String**| 环境标识 | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 命名空间名称 | | +| **branchName** | **String**| 分支名称 | | +| **operator** | **String**| 操作人用户名 | | +| **openGrayReleaseRuleDTO** | [**OpenGrayReleaseRuleDTO**](OpenGrayReleaseRuleDTO.md)| | | ### Return type -[**OpenReleaseDTO**](OpenReleaseDTO.md) +**Object** ### Authorization @@ -729,5 +483,4 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | | - | - +| **200** | 灰度规则更新成功 | - | diff --git a/java-client/docs/NamespaceGrayDelReleaseDTO.md b/java-client/docs/NamespaceGrayDelReleaseDTO.md index ed9eaa19..6b3bf605 100644 --- a/java-client/docs/NamespaceGrayDelReleaseDTO.md +++ b/java-client/docs/NamespaceGrayDelReleaseDTO.md @@ -13,6 +13,3 @@ |**releasedBy** | **String** | 发布操作者用户名,记录是谁执行了这次灰度删除发布操作 | [optional] | |**isEmergencyPublish** | **Boolean** | 是否为紧急发布,紧急发布可能会跳过某些审核流程 | [optional] | |**grayDelKeys** | **List<String>** | 需要在灰度发布中删除的配置项键名列表 | [optional] | - - - diff --git a/java-client/docs/NamespaceIdentifier.md b/java-client/docs/NamespaceIdentifier.md deleted file mode 100644 index dc61b500..00000000 --- a/java-client/docs/NamespaceIdentifier.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# NamespaceIdentifier - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**appId** | **String** | | [optional] | -|**env** | **String** | | [optional] | -|**clusterName** | **String** | | [optional] | -|**namespaceName** | **String** | | [optional] | - - - diff --git a/java-client/docs/NamespaceManagementApi.md b/java-client/docs/NamespaceManagementApi.md index b4ac0cda..7ae75790 100644 --- a/java-client/docs/NamespaceManagementApi.md +++ b/java-client/docs/NamespaceManagementApi.md @@ -4,24 +4,101 @@ All URIs are relative to *http://localhost* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**openapiV1AppnamespacesGet**](NamespaceManagementApi.md#openapiV1AppnamespacesGet) | **GET** /openapi/v1/appnamespaces | 获取所有公共AppNamespace | -| [**openapiV1AppsAppIdAppnamespacesGet**](NamespaceManagementApi.md#openapiV1AppsAppIdAppnamespacesGet) | **GET** /openapi/v1/apps/{appId}/appnamespaces | 获取指定应用的AppNamespace | -| [**openapiV1AppsAppIdAppnamespacesNamespaceNameGet**](NamespaceManagementApi.md#openapiV1AppsAppIdAppnamespacesNamespaceNameGet) | **GET** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 获取指定的AppNamespace | -| [**openapiV1AppsAppIdAppnamespacesPost**](NamespaceManagementApi.md#openapiV1AppsAppIdAppnamespacesPost) | **POST** /openapi/v1/apps/{appId}/appnamespaces | 创建AppNamespace | -| [**openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet**](NamespaceManagementApi.md#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check | 检查缺失的Namespace | -| [**openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet**](NamespaceManagementApi.md#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association | 获取关联的公共Namespace | -| [**openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet**](NamespaceManagementApi.md#openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet) | **GET** /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances | 获取公共AppNamespace的所有实例 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet**](NamespaceManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces | 获取指定集群下的所有Namespace | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet**](NamespaceManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock | 获取Namespace的锁状态 | +| [**checkNamespaceIntegrity**](NamespaceManagementApi.md#checkNamespaceIntegrity) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check | 检查缺失的Namespace (new added) | +| [**createNamespace**](NamespaceManagementApi.md#createNamespace) | **POST** /openapi/v1/apps/{appId}/appnamespaces | 创建AppNamespace (original openapi) | +| [**deleteAppNamespace**](NamespaceManagementApi.md#deleteAppNamespace) | **DELETE** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 删除AppNamespace (new added) | +| [**deleteNamespaceLinks**](NamespaceManagementApi.md#deleteNamespaceLinks) | **DELETE** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links | 删除关联的Namespace (new added) | +| [**findNamespaces**](NamespaceManagementApi.md#findNamespaces) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces | 获取指定集群下的所有Namespace (original openapi) | +| [**getAppNamespace**](NamespaceManagementApi.md#getAppNamespace) | **GET** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 获取指定的AppNamespace (new added) | +| [**getAppNamespaces**](NamespaceManagementApi.md#getAppNamespaces) | **GET** /openapi/v1/appnamespaces | 获取所有公共AppNamespace (new added) | +| [**getAppNamespacesByApp**](NamespaceManagementApi.md#getAppNamespacesByApp) | **GET** /openapi/v1/apps/{appId}/appnamespaces | 获取指定应用的AppNamespace (new added) | +| [**getNamespaceLock**](NamespaceManagementApi.md#getNamespaceLock) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock | 获取Namespace的锁状态 (original openapi) | +| [**getNamespacesReleaseStatus**](NamespaceManagementApi.md#getNamespacesReleaseStatus) | **GET** /openapi/v1/apps/{appId}/namespaces/releases/status | 获取应用下所有Namespace的发布状态 (new added) | +| [**getPublicAppNamespaceInstances**](NamespaceManagementApi.md#getPublicAppNamespaceInstances) | **GET** /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances | 获取公共AppNamespace的所有实例 (new added) | +| [**getPublicNamespaceAssociation**](NamespaceManagementApi.md#getPublicNamespaceAssociation) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association | 获取关联的公共Namespace (new added) | +| [**loadNamespace**](NamespaceManagementApi.md#loadNamespace) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} | 获取指定的Namespace (original openapi) | + + + +# **checkNamespaceIntegrity** +> List<String> checkNamespaceIntegrity(appId, env, clusterName) + +检查缺失的Namespace (new added) +GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check - -# **openapiV1AppnamespacesGet** -> List<OpenAppNamespaceDTO> openapiV1AppnamespacesGet(publicOnly) +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.NamespaceManagementApi; -获取所有公共AppNamespace +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); -GET /openapi/v1/appnamespaces?public=true + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); + String appId = "appId_example"; // String | 应用ID + String env = "env_example"; // String | 环境标识 + String clusterName = "clusterName_example"; // String | 集群名称 + try { + List result = apiInstance.checkNamespaceIntegrity(appId, env, clusterName); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling NamespaceManagementApi#checkNamespaceIntegrity"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| 应用ID | | +| **env** | **String**| 环境标识 | | +| **clusterName** | **String**| 集群名称 | | + +### Return type + +**List<String>** + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 缺失的命名空间名称列表 | - | + + +# **createNamespace** +> OpenAppNamespaceDTO createNamespace(appId, openAppNamespaceDTO) + +创建AppNamespace (original openapi) + +POST /openapi/v1/apps/{appId}/appnamespaces ### Example ```java @@ -37,7 +114,7 @@ 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"); @@ -45,12 +122,13 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); - Boolean publicOnly = false; // Boolean | + String appId = "appId_example"; // String | + OpenAppNamespaceDTO openAppNamespaceDTO = new OpenAppNamespaceDTO(); // OpenAppNamespaceDTO | try { - List result = apiInstance.openapiV1AppnamespacesGet(publicOnly); + OpenAppNamespaceDTO result = apiInstance.createNamespace(appId, openAppNamespaceDTO); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#openapiV1AppnamespacesGet"); + System.err.println("Exception when calling NamespaceManagementApi#createNamespace"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -64,11 +142,87 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **publicOnly** | **Boolean**| | | +| **appId** | **String**| | | +| **openAppNamespaceDTO** | [**OpenAppNamespaceDTO**](OpenAppNamespaceDTO.md)| | | ### Return type -[**List<OpenAppNamespaceDTO>**](OpenAppNamespaceDTO.md) +[**OpenAppNamespaceDTO**](OpenAppNamespaceDTO.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | AppNamespace创建成功 | - | +| **400** | 请求参数错误 | - | +| **403** | 权限不足 | - | + + +# **deleteAppNamespace** +> Object deleteAppNamespace(appId, namespaceName, operator) + +删除AppNamespace (new added) + +DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.NamespaceManagementApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); + String appId = "appId_example"; // String | 应用ID + String namespaceName = "namespaceName_example"; // String | 命名空间名称 + String operator = "operator_example"; // String | 操作人用户名 + try { + Object result = apiInstance.deleteAppNamespace(appId, namespaceName, operator); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling NamespaceManagementApi#deleteAppNamespace"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| 应用ID | | +| **namespaceName** | **String**| 命名空间名称 | | +| **operator** | **String**| 操作人用户名 | | + +### Return type + +**Object** ### Authorization @@ -82,15 +236,15 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | | - | +| **200** | AppNamespace删除成功 | - | - -# **openapiV1AppsAppIdAppnamespacesGet** -> List<OpenAppNamespaceDTO> openapiV1AppsAppIdAppnamespacesGet(appId) + +# **deleteNamespaceLinks** +> Object deleteNamespaceLinks(appId, env, clusterName, namespaceName, operator) -获取指定应用的AppNamespace +删除关联的Namespace (new added) -GET /openapi/v1/apps/{appId}/appnamespaces +DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links ### Example ```java @@ -106,7 +260,7 @@ 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"); @@ -114,12 +268,92 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); - String appId = "appId_example"; // String | + String appId = "appId_example"; // String | 应用ID + String env = "env_example"; // String | 环境标识 + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 命名空间名称 + String operator = "operator_example"; // String | 操作人用户名 try { - List result = apiInstance.openapiV1AppsAppIdAppnamespacesGet(appId); + Object result = apiInstance.deleteNamespaceLinks(appId, env, clusterName, namespaceName, operator); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#openapiV1AppsAppIdAppnamespacesGet"); + System.err.println("Exception when calling NamespaceManagementApi#deleteNamespaceLinks"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| 应用ID | | +| **env** | **String**| 环境标识 | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 命名空间名称 | | +| **operator** | **String**| 操作人用户名 | | + +### Return type + +**Object** + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 解除关联成功 | - | + + +# **findNamespaces** +> List<OpenNamespaceDTO> findNamespaces(appId, env, clusterName, fillItemDetail) + +获取指定集群下的所有Namespace (original openapi) + +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.NamespaceManagementApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); + String appId = "appId_example"; // String | + String env = "env_example"; // String | + String clusterName = "clusterName_example"; // String | + Boolean fillItemDetail = true; // Boolean | + try { + List result = apiInstance.findNamespaces(appId, env, clusterName, fillItemDetail); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling NamespaceManagementApi#findNamespaces"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -134,10 +368,13 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **appId** | **String**| | | +| **env** | **String**| | | +| **clusterName** | **String**| | | +| **fillItemDetail** | **Boolean**| | [default to true] | ### Return type -[**List<OpenAppNamespaceDTO>**](OpenAppNamespaceDTO.md) +[**List<OpenNamespaceDTO>**](OpenNamespaceDTO.md) ### Authorization @@ -153,11 +390,11 @@ public class Example { |-------------|-------------|------------------| | **200** | | - | - -# **openapiV1AppsAppIdAppnamespacesNamespaceNameGet** -> OpenAppNamespaceDTO openapiV1AppsAppIdAppnamespacesNamespaceNameGet(appId, namespaceName) + +# **getAppNamespace** +> OpenAppNamespaceDTO getAppNamespace(appId, namespaceName) -获取指定的AppNamespace +获取指定的AppNamespace (new added) GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} @@ -175,7 +412,7 @@ 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"); @@ -183,13 +420,13 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); - String appId = "appId_example"; // String | - String namespaceName = "namespaceName_example"; // String | + String appId = "appId_example"; // String | 应用ID + String namespaceName = "namespaceName_example"; // String | 命名空间名称 try { - OpenAppNamespaceDTO result = apiInstance.openapiV1AppsAppIdAppnamespacesNamespaceNameGet(appId, namespaceName); + OpenAppNamespaceDTO result = apiInstance.getAppNamespace(appId, namespaceName); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#openapiV1AppsAppIdAppnamespacesNamespaceNameGet"); + System.err.println("Exception when calling NamespaceManagementApi#getAppNamespace"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -203,8 +440,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **namespaceName** | **String**| | | +| **appId** | **String**| 应用ID | | +| **namespaceName** | **String**| 命名空间名称 | | ### Return type @@ -222,15 +459,15 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | | - | +| **200** | 成功获取AppNamespace | - | - -# **openapiV1AppsAppIdAppnamespacesPost** -> OpenAppNamespaceDTO openapiV1AppsAppIdAppnamespacesPost(appId, openAppNamespaceDTO) + +# **getAppNamespaces** +> List<OpenAppNamespaceDTO> getAppNamespaces(publicOnly) -创建AppNamespace +获取所有公共AppNamespace (new added) -POST /openapi/v1/apps/{appId}/appnamespaces +GET /openapi/v1/appnamespaces?public=true ### Example ```java @@ -246,7 +483,7 @@ 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"); @@ -254,13 +491,12 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); - String appId = "appId_example"; // String | - OpenAppNamespaceDTO openAppNamespaceDTO = new OpenAppNamespaceDTO(); // OpenAppNamespaceDTO | + Boolean publicOnly = false; // Boolean | try { - OpenAppNamespaceDTO result = apiInstance.openapiV1AppsAppIdAppnamespacesPost(appId, openAppNamespaceDTO); + List result = apiInstance.getAppNamespaces(publicOnly); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#openapiV1AppsAppIdAppnamespacesPost"); + System.err.println("Exception when calling NamespaceManagementApi#getAppNamespaces"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -274,12 +510,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **openAppNamespaceDTO** | [**OpenAppNamespaceDTO**](OpenAppNamespaceDTO.md)| | | +| **publicOnly** | **Boolean**| | | ### Return type -[**OpenAppNamespaceDTO**](OpenAppNamespaceDTO.md) +[**List<OpenAppNamespaceDTO>**](OpenAppNamespaceDTO.md) ### Authorization @@ -287,23 +522,21 @@ public class Example { ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | AppNamespace创建成功 | - | -| **400** | 请求参数错误 | - | -| **403** | 权限不足 | - | +| **200** | | - | - -# **openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet** -> List<String> openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet(appId, env, clusterName) + +# **getAppNamespacesByApp** +> List<OpenAppNamespaceDTO> getAppNamespacesByApp(appId) -检查缺失的Namespace +获取指定应用的AppNamespace (new added) -GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check +GET /openapi/v1/apps/{appId}/appnamespaces ### Example ```java @@ -319,7 +552,7 @@ 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"); @@ -327,14 +560,12 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | + String appId = "appId_example"; // String | try { - List result = apiInstance.openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet(appId, env, clusterName); + List result = apiInstance.getAppNamespacesByApp(appId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet"); + System.err.println("Exception when calling NamespaceManagementApi#getAppNamespacesByApp"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -349,12 +580,10 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | ### Return type -**List<String>** +[**List<OpenAppNamespaceDTO>**](OpenAppNamespaceDTO.md) ### Authorization @@ -370,13 +599,13 @@ public class Example { |-------------|-------------|------------------| | **200** | | - | - -# **openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet** -> OpenNamespaceDTO openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet(appId, env, clusterName, namespaceName) + +# **getNamespaceLock** +> OpenNamespaceLockDTO getNamespaceLock(appId, env, clusterName, namespaceName) -获取关联的公共Namespace +获取Namespace的锁状态 (original openapi) -GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock ### Example ```java @@ -392,7 +621,7 @@ 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"); @@ -400,15 +629,15 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | + String appId = "appId_example"; // String | + String env = "env_example"; // String | + String clusterName = "clusterName_example"; // String | + String namespaceName = "namespaceName_example"; // String | try { - OpenNamespaceDTO result = apiInstance.openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet(appId, env, clusterName, namespaceName); + OpenNamespaceLockDTO result = apiInstance.getNamespaceLock(appId, env, clusterName, namespaceName); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet"); + System.err.println("Exception when calling NamespaceManagementApi#getNamespaceLock"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -429,7 +658,7 @@ public class Example { ### Return type -[**OpenNamespaceDTO**](OpenNamespaceDTO.md) +[**OpenNamespaceLockDTO**](OpenNamespaceLockDTO.md) ### Authorization @@ -445,11 +674,80 @@ public class Example { |-------------|-------------|------------------| | **200** | | - | - -# **openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet** -> List<OpenNamespaceDTO> openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet(env, publicNamespaceName, page, size) + +# **getNamespacesReleaseStatus** +> Map<String, Map<String, Boolean>> getNamespacesReleaseStatus(appId) + +获取应用下所有Namespace的发布状态 (new added) -获取公共AppNamespace的所有实例 +GET /openapi/v1/apps/{appId}/namespaces/releases/status + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.NamespaceManagementApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); + String appId = "appId_example"; // String | 应用ID + try { + Map> result = apiInstance.getNamespacesReleaseStatus(appId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling NamespaceManagementApi#getNamespacesReleaseStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| 应用ID | | + +### Return type + +[**Map<String, Map<String, Boolean>>**](Map.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功获取发布状态映射 | - | + + +# **getPublicAppNamespaceInstances** +> List<OpenNamespaceDTO> getPublicAppNamespaceInstances(env, publicNamespaceName, page, size) + +获取公共AppNamespace的所有实例 (new added) GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances @@ -467,7 +765,7 @@ 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"); @@ -475,15 +773,15 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); - String env = "env_example"; // String | - String publicNamespaceName = "publicNamespaceName_example"; // String | - Integer page = 0; // Integer | - Integer size = 10; // Integer | + String env = "env_example"; // String | 环境标识 + String publicNamespaceName = "publicNamespaceName_example"; // String | 公共命名空间名称 + Integer page = 0; // Integer | 页码,从0开始 + Integer size = 10; // Integer | 每页数量 try { - List result = apiInstance.openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet(env, publicNamespaceName, page, size); + List result = apiInstance.getPublicAppNamespaceInstances(env, publicNamespaceName, page, size); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet"); + System.err.println("Exception when calling NamespaceManagementApi#getPublicAppNamespaceInstances"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -497,10 +795,10 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **env** | **String**| | | -| **publicNamespaceName** | **String**| | | -| **page** | **Integer**| | | -| **size** | **Integer**| | | +| **env** | **String**| 环境标识 | | +| **publicNamespaceName** | **String**| 公共命名空间名称 | | +| **page** | **Integer**| 页码,从0开始 | | +| **size** | **Integer**| 每页数量 | | ### Return type @@ -518,15 +816,15 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | | - | +| **200** | 成功获取实例列表 | - | - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet** -> List<OpenNamespaceDTO> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet(appId, env, clusterName, fillItemDetail) + +# **getPublicNamespaceAssociation** +> OpenNamespaceDTO getPublicNamespaceAssociation(appId, env, clusterName, namespaceName) -获取指定集群下的所有Namespace +获取关联的公共Namespace (new added) -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces +GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association ### Example ```java @@ -542,7 +840,7 @@ 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"); @@ -550,15 +848,15 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - Boolean fillItemDetail = true; // Boolean | + String appId = "appId_example"; // String | 应用ID + String env = "env_example"; // String | 环境标识 + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 命名空间名称 try { - List result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet(appId, env, clusterName, fillItemDetail); + OpenNamespaceDTO result = apiInstance.getPublicNamespaceAssociation(appId, env, clusterName, namespaceName); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet"); + System.err.println("Exception when calling NamespaceManagementApi#getPublicNamespaceAssociation"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -572,14 +870,14 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **fillItemDetail** | **Boolean**| | | +| **appId** | **String**| 应用ID | | +| **env** | **String**| 环境标识 | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 命名空间名称 | | ### Return type -[**List<OpenNamespaceDTO>**](OpenNamespaceDTO.md) +[**OpenNamespaceDTO**](OpenNamespaceDTO.md) ### Authorization @@ -593,15 +891,15 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | | - | +| **200** | 成功获取关联的公共Namespace | - | - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet** -> OpenNamespaceLockDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet(appId, env, clusterName, namespaceName) + +# **loadNamespace** +> OpenNamespaceDTO loadNamespace(appId, env, clusterName, namespaceName, fillItemDetail) -获取Namespace的锁状态 +获取指定的Namespace (original openapi) -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} ### Example ```java @@ -617,7 +915,7 @@ 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"); @@ -625,15 +923,16 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | + String appId = "appId_example"; // String | + String env = "env_example"; // String | + String clusterName = "clusterName_example"; // String | + String namespaceName = "namespaceName_example"; // String | + Boolean fillItemDetail = true; // Boolean | try { - OpenNamespaceLockDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet(appId, env, clusterName, namespaceName); + OpenNamespaceDTO result = apiInstance.loadNamespace(appId, env, clusterName, namespaceName, fillItemDetail); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet"); + System.err.println("Exception when calling NamespaceManagementApi#loadNamespace"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -651,10 +950,11 @@ public class Example { | **env** | **String**| | | | **clusterName** | **String**| | | | **namespaceName** | **String**| | | +| **fillItemDetail** | **Boolean**| | [default to true] | ### Return type -[**OpenNamespaceLockDTO**](OpenNamespaceLockDTO.md) +[**OpenNamespaceDTO**](OpenNamespaceDTO.md) ### Authorization @@ -669,4 +969,3 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | | - | - diff --git a/java-client/docs/NamespaceReleaseDTO.md b/java-client/docs/NamespaceReleaseDTO.md index 2c7af0c1..f521a059 100644 --- a/java-client/docs/NamespaceReleaseDTO.md +++ b/java-client/docs/NamespaceReleaseDTO.md @@ -12,6 +12,3 @@ |**releaseComment** | **String** | 发布备注,详细描述本次发布的变更内容和目的 | [optional] | |**releasedBy** | **String** | 发布操作者用户名,记录是谁执行了这次发布操作 | [optional] | |**isEmergencyPublish** | **Boolean** | 是否为紧急发布,紧急发布可能会跳过某些审核流程 | [optional] | - - - diff --git a/java-client/docs/NamespaceSyncModel.md b/java-client/docs/NamespaceSyncModel.md deleted file mode 100644 index ec78fba7..00000000 --- a/java-client/docs/NamespaceSyncModel.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# NamespaceSyncModel - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**syncToNamespaces** | [**List<NamespaceIdentifier>**](NamespaceIdentifier.md) | | [optional] | -|**syncItems** | [**List<ItemDTO>**](ItemDTO.md) | | [optional] | - - - diff --git a/java-client/docs/NamespaceTextModel.md b/java-client/docs/NamespaceTextModel.md deleted file mode 100644 index 40395b51..00000000 --- a/java-client/docs/NamespaceTextModel.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# NamespaceTextModel - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**appId** | **String** | | [optional] | -|**env** | **String** | | [optional] | -|**clusterName** | **String** | | [optional] | -|**namespaceName** | **String** | | [optional] | -|**namespaceId** | **Long** | | [optional] | -|**format** | **String** | | [optional] | -|**configText** | **String** | | [optional] | -|**operator** | **String** | | [optional] | - - - diff --git a/java-client/docs/OpenAppDTO.md b/java-client/docs/OpenAppDTO.md index b60a5d51..521706ea 100644 --- a/java-client/docs/OpenAppDTO.md +++ b/java-client/docs/OpenAppDTO.md @@ -18,6 +18,3 @@ Apollo应用信息数据传输对象,包含应用的基本信息和元数据 |**orgName** | **String** | 组织名称,应用所属组织的显示名称 | [optional] | |**ownerName** | **String** | 应用负责人姓名,应用的主要负责人 | [optional] | |**ownerEmail** | **String** | 应用负责人邮箱地址,用于接收应用相关通知 | [optional] | - - - diff --git a/java-client/docs/OpenAppNamespaceDTO.md b/java-client/docs/OpenAppNamespaceDTO.md index c1e51011..704ba1ee 100644 --- a/java-client/docs/OpenAppNamespaceDTO.md +++ b/java-client/docs/OpenAppNamespaceDTO.md @@ -18,6 +18,3 @@ Apollo应用命名空间数据传输对象,表示应用级别的命名空间 |**isPublic** | **Boolean** | 是否为公共命名空间,公共命名空间可以被其他应用关联使用 | [optional] | |**appendNamespacePrefix** | **Boolean** | 对于公共命名空间,是否在命名空间名称前添加前缀 | [optional] | |**comment** | **String** | 命名空间备注说明,描述命名空间的用途和包含的配置类型 | [optional] | - - - diff --git a/java-client/docs/OpenClusterDTO.md b/java-client/docs/OpenClusterDTO.md index 54fc4a83..bd27f6ed 100644 --- a/java-client/docs/OpenClusterDTO.md +++ b/java-client/docs/OpenClusterDTO.md @@ -14,6 +14,3 @@ Apollo集群信息数据传输对象,表示应用在特定环境下的集群 |**dataChangeLastModifiedTime** | **String** | 集群最后修改时间,ISO 8601格式的时间戳 | [optional] | |**name** | **String** | 集群名称,在同一应用和环境下唯一标识一个集群 | [optional] | |**appId** | **String** | 所属应用的唯一标识符 | [optional] | - - - diff --git a/java-client/docs/OpenCreateAppDTO.md b/java-client/docs/OpenCreateAppDTO.md index b51f186a..e297c906 100644 --- a/java-client/docs/OpenCreateAppDTO.md +++ b/java-client/docs/OpenCreateAppDTO.md @@ -11,6 +11,3 @@ |**assignAppRoleToSelf** | **Boolean** | 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 | [optional] | |**admins** | **List<String>** | 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 | [optional] | |**app** | [**OpenAppDTO**](OpenAppDTO.md) | | [optional] | - - - diff --git a/java-client/docs/OpenEnvClusterDTO.md b/java-client/docs/OpenEnvClusterDTO.md index a7251c78..1134e220 100644 --- a/java-client/docs/OpenEnvClusterDTO.md +++ b/java-client/docs/OpenEnvClusterDTO.md @@ -7,8 +7,5 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**env** | **String** | | [optional] | -|**clusters** | **List<String>** | | [optional] | - - - +|**env** | **String** | 环境标识,例如 DEV、FAT、UAT、PROD | [optional] | +|**clusters** | **List<String>** | 该环境下的集群名称列表 | [optional] | diff --git a/java-client/docs/OpenEnvClusterInfo.md b/java-client/docs/OpenEnvClusterInfo.md new file mode 100644 index 00000000..d9f13bbc --- /dev/null +++ b/java-client/docs/OpenEnvClusterInfo.md @@ -0,0 +1,11 @@ + + +# OpenEnvClusterInfo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**env** | **String** | 环境标识 | [optional] | +|**clusters** | [**List<OpenClusterDTO>**](OpenClusterDTO.md) | 集群信息列表 | [optional] | diff --git a/java-client/docs/OpenGrayReleaseRuleDTO.md b/java-client/docs/OpenGrayReleaseRuleDTO.md index 8a30133c..47438ff8 100644 --- a/java-client/docs/OpenGrayReleaseRuleDTO.md +++ b/java-client/docs/OpenGrayReleaseRuleDTO.md @@ -17,6 +17,3 @@ Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则 |**namespaceName** | **String** | 所属命名空间的名称 | [optional] | |**branchName** | **String** | 灰度分支名称,标识灰度发布的分支 | [optional] | |**ruleItems** | [**List<OpenGrayReleaseRuleItemDTO>**](OpenGrayReleaseRuleItemDTO.md) | 灰度发布规则项列表,包含具体的灰度规则条件 | [optional] | - - - diff --git a/java-client/docs/OpenGrayReleaseRuleItemDTO.md b/java-client/docs/OpenGrayReleaseRuleItemDTO.md index a53ef87c..b8de3036 100644 --- a/java-client/docs/OpenGrayReleaseRuleItemDTO.md +++ b/java-client/docs/OpenGrayReleaseRuleItemDTO.md @@ -11,6 +11,3 @@ Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规 |**clientAppId** | **String** | 客户端应用ID,指定哪个应用可以获取灰度配置 | [optional] | |**clientIpList** | **List<String>** | 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 | [optional] | |**clientLabelList** | **List<String>** | 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 | [optional] | - - - diff --git a/java-client/docs/OpenInstanceConfigDTO.md b/java-client/docs/OpenInstanceConfigDTO.md index 17d61a94..4f959ce2 100644 --- a/java-client/docs/OpenInstanceConfigDTO.md +++ b/java-client/docs/OpenInstanceConfigDTO.md @@ -8,8 +8,5 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**release** | [**OpenReleaseDTO**](OpenReleaseDTO.md) | | [optional] | -|**releaseDeliveryTime** | **String** | | [optional] | -|**dataChangeLastModifiedTime** | **String** | | [optional] | - - - +|**releaseDeliveryTime** | **String** | 配置下发时间(ISO 8601) | [optional] | +|**dataChangeLastModifiedTime** | **String** | 最后修改时间(ISO 8601) | [optional] | diff --git a/java-client/docs/OpenInstanceDTO.md b/java-client/docs/OpenInstanceDTO.md index 5d174be8..595b4463 100644 --- a/java-client/docs/OpenInstanceDTO.md +++ b/java-client/docs/OpenInstanceDTO.md @@ -7,13 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **Long** | | [optional] | -|**appId** | **String** | | [optional] | -|**clusterName** | **String** | | [optional] | -|**dataCenter** | **String** | | [optional] | -|**ip** | **String** | | [optional] | -|**configs** | [**List<OpenInstanceConfigDTO>**](OpenInstanceConfigDTO.md) | | [optional] | -|**dataChangeCreatedTime** | **String** | | [optional] | - - - +|**id** | **Long** | 实例ID | [optional] | +|**appId** | **String** | 实例所属应用ID | [optional] | +|**clusterName** | **String** | 实例所属集群名称 | [optional] | +|**dataCenter** | **String** | 数据中心/机房标识 | [optional] | +|**ip** | **String** | 实例IP地址 | [optional] | +|**configs** | [**List<OpenInstanceConfigDTO>**](OpenInstanceConfigDTO.md) | 实例当前生效的配置列表 | [optional] | +|**dataChangeCreatedTime** | **String** | 数据创建时间(ISO 8601) | [optional] | diff --git a/java-client/docs/OpenItemChangeSets.md b/java-client/docs/OpenItemChangeSets.md new file mode 100644 index 00000000..cc29f4b9 --- /dev/null +++ b/java-client/docs/OpenItemChangeSets.md @@ -0,0 +1,18 @@ + + +# OpenItemChangeSets + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**dataChangeCreatedBy** | **String** | 变更集合创建者用户名 | [optional] | +|**dataChangeLastModifiedBy** | **String** | 变更集合最后修改者用户名 | [optional] | +|**dataChangeCreatedByDisplayName** | **String** | 创建者显示名 | [optional] | +|**dataChangeLastModifiedByDisplayName** | **String** | 最后修改者显示名 | [optional] | +|**dataChangeCreatedTime** | **String** | 变更集合创建时间(ISO 8601) | [optional] | +|**dataChangeLastModifiedTime** | **String** | 变更集合最后修改时间(ISO 8601) | [optional] | +|**createItems** | [**List<OpenItemDTO>**](OpenItemDTO.md) | 待创建的配置项列表 | [optional] | +|**updateItems** | [**List<OpenItemDTO>**](OpenItemDTO.md) | 待更新的配置项列表 | [optional] | +|**deleteItems** | [**List<OpenItemDTO>**](OpenItemDTO.md) | 待删除的配置项列表 | [optional] | diff --git a/java-client/docs/OpenItemDTO.md b/java-client/docs/OpenItemDTO.md index bcfea659..8777f9a9 100644 --- a/java-client/docs/OpenItemDTO.md +++ b/java-client/docs/OpenItemDTO.md @@ -16,6 +16,3 @@ Apollo配置项数据传输对象,表示一个具体的配置键值对及其 |**type** | **Integer** | 配置项类型,0表示普通配置项,1表示文件类型配置项 | [optional] | |**value** | **String** | 配置项的值,可以是字符串、数字、JSON等格式 | [optional] | |**comment** | **String** | 配置项的注释说明,用于描述配置项的用途和含义 | [optional] | - - - diff --git a/java-client/docs/OpenItemDiffs.md b/java-client/docs/OpenItemDiffs.md new file mode 100644 index 00000000..824dd581 --- /dev/null +++ b/java-client/docs/OpenItemDiffs.md @@ -0,0 +1,12 @@ + + +# OpenItemDiffs + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**namespace** | [**OpenNamespaceIdentifier**](OpenNamespaceIdentifier.md) | | [optional] | +|**diffs** | [**OpenItemChangeSets**](OpenItemChangeSets.md) | | [optional] | +|**extInfo** | **String** | 扩展信息 | [optional] | diff --git a/java-client/docs/OpenNamespaceDTO.md b/java-client/docs/OpenNamespaceDTO.md index f8da948e..f4e0cf9c 100644 --- a/java-client/docs/OpenNamespaceDTO.md +++ b/java-client/docs/OpenNamespaceDTO.md @@ -19,6 +19,3 @@ Apollo命名空间数据传输对象,表示一个完整的命名空间及其 |**format** | **String** | 命名空间格式类型,如properties、xml、json、yml等 | [optional] | |**isPublic** | **Boolean** | 是否为公共命名空间,公共命名空间可以被其他应用关联使用 | [optional] | |**items** | [**List<OpenItemDTO>**](OpenItemDTO.md) | 命名空间包含的配置项列表 | [optional] | - - - diff --git a/java-client/docs/OpenNamespaceIdentifier.md b/java-client/docs/OpenNamespaceIdentifier.md new file mode 100644 index 00000000..d9a138ce --- /dev/null +++ b/java-client/docs/OpenNamespaceIdentifier.md @@ -0,0 +1,13 @@ + + +# OpenNamespaceIdentifier + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**appId** | **String** | 应用唯一标识 | [optional] | +|**env** | **String** | 环境标识 | [optional] | +|**clusterName** | **String** | 集群名称 | [optional] | +|**namespaceName** | **String** | 命名空间名称 | [optional] | diff --git a/java-client/docs/OpenNamespaceLockDTO.md b/java-client/docs/OpenNamespaceLockDTO.md index b369a19c..ae01bd8c 100644 --- a/java-client/docs/OpenNamespaceLockDTO.md +++ b/java-client/docs/OpenNamespaceLockDTO.md @@ -11,6 +11,3 @@ Apollo命名空间锁状态数据传输对象 |**namespaceName** | **String** | 命名空间名称 | [optional] | |**isLocked** | **Boolean** | 是否被锁定 | [optional] | |**lockedBy** | **String** | 锁定者用户名 | [optional] | - - - diff --git a/java-client/docs/OpenNamespaceSyncModel.md b/java-client/docs/OpenNamespaceSyncModel.md new file mode 100644 index 00000000..08aaa115 --- /dev/null +++ b/java-client/docs/OpenNamespaceSyncModel.md @@ -0,0 +1,11 @@ + + +# OpenNamespaceSyncModel + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**syncToNamespaces** | [**List<OpenNamespaceIdentifier>**](OpenNamespaceIdentifier.md) | 目标命名空间标识列表 | [optional] | +|**syncItems** | [**List<OpenItemDTO>**](OpenItemDTO.md) | 需要同步的配置项列表 | [optional] | diff --git a/java-client/docs/OpenNamespaceTextModel.md b/java-client/docs/OpenNamespaceTextModel.md new file mode 100644 index 00000000..6823cded --- /dev/null +++ b/java-client/docs/OpenNamespaceTextModel.md @@ -0,0 +1,17 @@ + + +# OpenNamespaceTextModel + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**appId** | **String** | 应用唯一标识 | [optional] | +|**env** | **String** | 环境标识 | [optional] | +|**clusterName** | **String** | 集群名称 | [optional] | +|**namespaceName** | **String** | 命名空间名称 | [optional] | +|**namespaceId** | **Long** | 命名空间ID | [optional] | +|**format** | **String** | 命名空间格式类型(properties/xml/json/yml等) | [optional] | +|**configText** | **String** | 配置内容的原始文本 | [optional] | +|**operator** | **String** | 操作者用户名 | [optional] | diff --git a/java-client/docs/OpenOrganizationDto.md b/java-client/docs/OpenOrganizationDto.md index dd546a31..281c9dfe 100644 --- a/java-client/docs/OpenOrganizationDto.md +++ b/java-client/docs/OpenOrganizationDto.md @@ -7,8 +7,5 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**orgId** | **String** | | [optional] | -|**orgName** | **String** | | [optional] | - - - +|**orgId** | **String** | 组织ID | [optional] | +|**orgName** | **String** | 组织名称 | [optional] | diff --git a/java-client/docs/OpenPageDTOOpenInstanceDTO.md b/java-client/docs/OpenPageDTOOpenInstanceDTO.md index 4adee064..8321218a 100644 --- a/java-client/docs/OpenPageDTOOpenInstanceDTO.md +++ b/java-client/docs/OpenPageDTOOpenInstanceDTO.md @@ -12,6 +12,3 @@ |**size** | **Integer** | 每页显示的记录数量 | [optional] | |**total** | **Long** | 总记录数,符合查询条件的实例总数量 | [optional] | |**content** | [**List<OpenInstanceDTO>**](OpenInstanceDTO.md) | 当前页的实例列表,包含具体的实例数据 | [optional] | - - - diff --git a/java-client/docs/OpenPageDTOOpenItemDTO.md b/java-client/docs/OpenPageDTOOpenItemDTO.md index 036ac0d3..411b4756 100644 --- a/java-client/docs/OpenPageDTOOpenItemDTO.md +++ b/java-client/docs/OpenPageDTOOpenItemDTO.md @@ -12,6 +12,3 @@ |**size** | **Integer** | 每页显示的记录数量 | [optional] | |**total** | **Long** | 总记录数,符合查询条件的配置项总数量 | [optional] | |**content** | [**List<OpenItemDTO>**](OpenItemDTO.md) | 当前页的配置项列表,包含具体的配置项数据 | [optional] | - - - diff --git a/java-client/docs/ListReleaseBO.md b/java-client/docs/OpenReleaseBO.md similarity index 67% rename from java-client/docs/ListReleaseBO.md rename to java-client/docs/OpenReleaseBO.md index 22348cb0..80beb2c2 100644 --- a/java-client/docs/ListReleaseBO.md +++ b/java-client/docs/OpenReleaseBO.md @@ -1,14 +1,11 @@ -# ListReleaseBO +# OpenReleaseBO ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**baseInfo** | [**ReleaseDTO**](ReleaseDTO.md) | | [optional] | +|**baseInfo** | [**OpenReleaseDTO**](OpenReleaseDTO.md) | | [optional] | |**items** | [**List<KVEntity>**](KVEntity.md) | | [optional] | - - - diff --git a/java-client/docs/OpenReleaseDTO.md b/java-client/docs/OpenReleaseDTO.md index 14753a3a..3d8f92a3 100644 --- a/java-client/docs/OpenReleaseDTO.md +++ b/java-client/docs/OpenReleaseDTO.md @@ -17,8 +17,5 @@ Apollo发布信息数据传输对象,表示一次配置发布的完整信息 |**clusterName** | **String** | 所属集群的名称 | [optional] | |**namespaceName** | **String** | 所属命名空间的名称 | [optional] | |**name** | **String** | 发布名称,用于标识这次发布的版本或描述 | [optional] | -|**configurations** | [**MapString**](MapString.md) | | [optional] | +|**configurations** | **Map<String, String>** | | [optional] | |**comment** | **String** | 发布备注,描述本次发布的变更内容和目的 | [optional] | - - - diff --git a/java-client/docs/OpenapiV1AppsGet401Response.md b/java-client/docs/OpenapiV1AppsGet401Response.md deleted file mode 100644 index 39658519..00000000 --- a/java-client/docs/OpenapiV1AppsGet401Response.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# OpenapiV1AppsGet401Response - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**message** | **String** | | [optional] | - - - diff --git a/java-client/docs/OpenapiV1AppsPost400Response.md b/java-client/docs/OpenapiV1AppsPost400Response.md deleted file mode 100644 index 966162b5..00000000 --- a/java-client/docs/OpenapiV1AppsPost400Response.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# OpenapiV1AppsPost400Response - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**message** | **String** | | [optional] | -|**exception** | **String** | | [optional] | - - - diff --git a/java-client/docs/OpenapiV1AppsPostRequest.md b/java-client/docs/OpenapiV1AppsPostRequest.md deleted file mode 100644 index 46f4ba49..00000000 --- a/java-client/docs/OpenapiV1AppsPostRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# OpenapiV1AppsPostRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**app** | [**OpenAppDTO**](OpenAppDTO.md) | | | -|**assignAppRoleToSelf** | **Boolean** | 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 | | -|**admins** | **List<String>** | 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 | | - - - diff --git a/java-client/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md b/java-client/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md deleted file mode 100644 index 02b3fdf6..00000000 --- a/java-client/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**valid** | **Boolean** | | [optional] | -|**message** | **String** | | [optional] | - - - diff --git a/java-client/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md b/java-client/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md deleted file mode 100644 index 7744d106..00000000 --- a/java-client/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**valid** | **Boolean** | | [optional] | -|**message** | **String** | | [optional] | -|**errors** | **List<String>** | | [optional] | - - - diff --git a/java-client/docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md b/java-client/docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md deleted file mode 100644 index 48c021c0..00000000 --- a/java-client/docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# OpenapiV1EnvsEnvReleasesCompareGet200Response - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**changes** | [**List<Change>**](Change.md) | | [optional] | - - - diff --git a/java-client/docs/OrganizationManagementApi.md b/java-client/docs/OrganizationManagementApi.md index bfac5d9c..a73b6ec4 100644 --- a/java-client/docs/OrganizationManagementApi.md +++ b/java-client/docs/OrganizationManagementApi.md @@ -4,14 +4,14 @@ All URIs are relative to *http://localhost* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**openapiV1OrganizationsGet**](OrganizationManagementApi.md#openapiV1OrganizationsGet) | **GET** /openapi/v1/organizations | 获取所有组织信息 | +| [**getOrganization**](OrganizationManagementApi.md#getOrganization) | **GET** /openapi/v1/organizations | 获取所有组织信息 (original openapi) | - -# **openapiV1OrganizationsGet** -> List<OpenOrganizationDto> openapiV1OrganizationsGet() + +# **getOrganization** +> List<OpenOrganizationDto> getOrganization() -获取所有组织信息 +获取所有组织信息 (original openapi) GET /openapi/v1/organizations @@ -29,7 +29,7 @@ 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"); @@ -38,10 +38,10 @@ public class Example { OrganizationManagementApi apiInstance = new OrganizationManagementApi(defaultClient); try { - List result = apiInstance.openapiV1OrganizationsGet(); + List result = apiInstance.getOrganization(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling OrganizationManagementApi#openapiV1OrganizationsGet"); + System.err.println("Exception when calling OrganizationManagementApi#getOrganization"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -72,4 +72,3 @@ This endpoint does not need any parameter. |-------------|-------------|------------------| | **200** | 成功获取组织列表 | - | | **401** | 未授权访问 | - | - diff --git a/java-client/docs/ReleaseDTO.md b/java-client/docs/ReleaseDTO.md deleted file mode 100644 index f9e157d5..00000000 --- a/java-client/docs/ReleaseDTO.md +++ /dev/null @@ -1,27 +0,0 @@ - - -# ReleaseDTO - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dataChangeCreatedBy** | **String** | | [optional] | -|**dataChangeLastModifiedBy** | **String** | | [optional] | -|**dataChangeCreatedByDisplayName** | **String** | | [optional] | -|**dataChangeLastModifiedByDisplayName** | **String** | | [optional] | -|**dataChangeCreatedTime** | **String** | | [optional] | -|**dataChangeLastModifiedTime** | **String** | | [optional] | -|**id** | **Long** | | [optional] | -|**releaseKey** | **String** | | [optional] | -|**name** | **String** | | [optional] | -|**appId** | **String** | | [optional] | -|**clusterName** | **String** | | [optional] | -|**namespaceName** | **String** | | [optional] | -|**configurations** | **String** | | [optional] | -|**comment** | **String** | | [optional] | -|**isAbandoned** | **Boolean** | | [optional] | - - - diff --git a/java-client/docs/ReleaseManagementApi.md b/java-client/docs/ReleaseManagementApi.md index 4bacc90e..d41f6d98 100644 --- a/java-client/docs/ReleaseManagementApi.md +++ b/java-client/docs/ReleaseManagementApi.md @@ -4,22 +4,24 @@ All URIs are relative to *http://localhost* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet**](ReleaseManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active | 获取活跃发布(分页) | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet**](ReleaseManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all | 获取所有发布(分页) | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet**](ReleaseManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest | 获取最新活跃发布 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost**](ReleaseManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases | 创建发布 | -| [**openapiV1EnvsEnvReleasesCompareGet**](ReleaseManagementApi.md#openapiV1EnvsEnvReleasesCompareGet) | **GET** /openapi/v1/envs/{env}/releases/compare | 对比发布 | -| [**openapiV1EnvsEnvReleasesReleaseIdGet**](ReleaseManagementApi.md#openapiV1EnvsEnvReleasesReleaseIdGet) | **GET** /openapi/v1/envs/{env}/releases/{releaseId} | 获取发布详情 | -| [**openapiV1EnvsEnvReleasesReleaseIdRollbackPut**](ReleaseManagementApi.md#openapiV1EnvsEnvReleasesReleaseIdRollbackPut) | **PUT** /openapi/v1/envs/{env}/releases/{releaseId}/rollback | 回滚发布 | +| [**createGrayDelRelease**](ReleaseManagementApi.md#createGrayDelRelease) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases | 创建灰度删除发布 (original openapi) | +| [**createGrayRelease**](ReleaseManagementApi.md#createGrayRelease) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases | 创建灰度发布 (original openapi) | +| [**createRelease**](ReleaseManagementApi.md#createRelease) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases | 创建发布 (original openapi) | +| [**findActiveReleases**](ReleaseManagementApi.md#findActiveReleases) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active | 获取活跃发布(分页) (new added) | +| [**findAllReleases**](ReleaseManagementApi.md#findAllReleases) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all | 获取所有发布(分页) (new added) | +| [**getReleaseById**](ReleaseManagementApi.md#getReleaseById) | **GET** /openapi/v1/envs/{env}/releases/{releaseId} | 获取发布详情 (new added) | +| [**loadLatestActiveRelease**](ReleaseManagementApi.md#loadLatestActiveRelease) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest | 获取最新活跃发布 (original openapi) | +| [**merge**](ReleaseManagementApi.md#merge) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge | 合并分支 (original openapi) | +| [**rollback**](ReleaseManagementApi.md#rollback) | **PUT** /openapi/v1/envs/{env}/releases/{releaseId}/rollback | 回滚发布 (original openapi) | - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet** -> List<OpenReleaseDTO> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet(appId, env, clusterName, namespaceName, page, size) + +# **createGrayDelRelease** +> OpenReleaseDTO createGrayDelRelease(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO) + +创建灰度删除发布 (original openapi) -获取活跃发布(分页) -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active ### Example ```java @@ -35,7 +37,7 @@ 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"); @@ -43,17 +45,17 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); ReleaseManagementApi apiInstance = new ReleaseManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - Integer page = 0; // Integer | - Integer size = 5; // Integer | + String appId = "appId_example"; // String | + String env = "env_example"; // String | + String clusterName = "clusterName_example"; // String | + String namespaceName = "namespaceName_example"; // String | + String branchName = "branchName_example"; // String | + NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO = new NamespaceGrayDelReleaseDTO(); // NamespaceGrayDelReleaseDTO | try { - List result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet(appId, env, clusterName, namespaceName, page, size); + OpenReleaseDTO result = apiInstance.createGrayDelRelease(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling ReleaseManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet"); + System.err.println("Exception when calling ReleaseManagementApi#createGrayDelRelease"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -71,12 +73,12 @@ public class Example { | **env** | **String**| | | | **clusterName** | **String**| | | | **namespaceName** | **String**| | | -| **page** | **Integer**| | | -| **size** | **Integer**| | | +| **branchName** | **String**| | | +| **namespaceGrayDelReleaseDTO** | [**NamespaceGrayDelReleaseDTO**](NamespaceGrayDelReleaseDTO.md)| | | ### Return type -[**List<OpenReleaseDTO>**](OpenReleaseDTO.md) +[**OpenReleaseDTO**](OpenReleaseDTO.md) ### Authorization @@ -84,7 +86,7 @@ public class Example { ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details @@ -92,13 +94,13 @@ public class Example { |-------------|-------------|------------------| | **200** | | - | - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet** -> List<ListReleaseBO> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet(appId, env, clusterName, namespaceName, page, size) + +# **createGrayRelease** +> OpenReleaseDTO createGrayRelease(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO) -获取所有发布(分页) +创建灰度发布 (original openapi) -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all +创建灰度发布 ### Example ```java @@ -114,7 +116,7 @@ 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"); @@ -122,17 +124,17 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); ReleaseManagementApi apiInstance = new ReleaseManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - Integer page = 0; // Integer | - Integer size = 5; // Integer | + String appId = "appId_example"; // String | app标识 + String env = "env_example"; // String | 环境标识 + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 命名空间名称 + String branchName = "branchName_example"; // String | 分支名称 + NamespaceReleaseDTO namespaceReleaseDTO = new NamespaceReleaseDTO(); // NamespaceReleaseDTO | try { - List result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet(appId, env, clusterName, namespaceName, page, size); + OpenReleaseDTO result = apiInstance.createGrayRelease(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling ReleaseManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet"); + System.err.println("Exception when calling ReleaseManagementApi#createGrayRelease"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -146,16 +148,16 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **page** | **Integer**| | | -| **size** | **Integer**| | | +| **appId** | **String**| app标识 | | +| **env** | **String**| 环境标识 | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 命名空间名称 | | +| **branchName** | **String**| 分支名称 | | +| **namespaceReleaseDTO** | [**NamespaceReleaseDTO**](NamespaceReleaseDTO.md)| | | ### Return type -[**List<ListReleaseBO>**](ListReleaseBO.md) +[**OpenReleaseDTO**](OpenReleaseDTO.md) ### Authorization @@ -163,21 +165,21 @@ public class Example { ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | | - | +| **200** | 灰度发布创建成功 | - | - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet** -> OpenReleaseDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet(appId, env, clusterName, namespaceName) - -获取最新活跃发布 + +# **createRelease** +> OpenReleaseDTO createRelease(appId, env, clusterName, namespaceName, namespaceReleaseDTO) +创建发布 (original openapi) +创建发布 ### Example ```java @@ -193,7 +195,7 @@ 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"); @@ -201,15 +203,16 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); ReleaseManagementApi apiInstance = new ReleaseManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | + String appId = "appId_example"; // String | app标识 + String env = "env_example"; // String | 环境标识 + String clusterName = "clusterName_example"; // String | + String namespaceName = "namespaceName_example"; // String | 命名空间名称 + NamespaceReleaseDTO namespaceReleaseDTO = new NamespaceReleaseDTO(); // NamespaceReleaseDTO | try { - OpenReleaseDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet(appId, env, clusterName, namespaceName); + OpenReleaseDTO result = apiInstance.createRelease(appId, env, clusterName, namespaceName, namespaceReleaseDTO); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling ReleaseManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet"); + System.err.println("Exception when calling ReleaseManagementApi#createRelease"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -223,10 +226,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | +| **appId** | **String**| app标识 | | +| **env** | **String**| 环境标识 | | | **clusterName** | **String**| | | -| **namespaceName** | **String**| | | +| **namespaceName** | **String**| 命名空间名称 | | +| **namespaceReleaseDTO** | [**NamespaceReleaseDTO**](NamespaceReleaseDTO.md)| | | ### Return type @@ -238,22 +242,23 @@ public class Example { ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | 成功获取最新活跃发布 | - | -| **404** | 未找到活跃发布 | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost** -> OpenReleaseDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost(appId, env, clusterName, namespaceName, namespaceReleaseDTO) +| **200** | 发布创建成功 | - | +| **400** | 发布参数错误 | - | +| **403** | 权限不足 | - | -创建发布 + +# **findActiveReleases** +> List<OpenReleaseDTO> findActiveReleases(appId, env, clusterName, namespaceName, page, size) +获取活跃发布(分页) (new added) +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active ### Example ```java @@ -269,7 +274,7 @@ 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"); @@ -277,16 +282,17 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); ReleaseManagementApi apiInstance = new ReleaseManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - NamespaceReleaseDTO namespaceReleaseDTO = new NamespaceReleaseDTO(); // NamespaceReleaseDTO | + String appId = "appId_example"; // String | 应用ID + String env = "env_example"; // String | 环境标识 + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 命名空间名称 + Integer page = 0; // Integer | 页码,从0开始 + Integer size = 5; // Integer | 每页数量 try { - OpenReleaseDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost(appId, env, clusterName, namespaceName, namespaceReleaseDTO); + List result = apiInstance.findActiveReleases(appId, env, clusterName, namespaceName, page, size); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling ReleaseManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost"); + System.err.println("Exception when calling ReleaseManagementApi#findActiveReleases"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -300,15 +306,16 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **namespaceReleaseDTO** | [**NamespaceReleaseDTO**](NamespaceReleaseDTO.md)| | | +| **appId** | **String**| 应用ID | | +| **env** | **String**| 环境标识 | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 命名空间名称 | | +| **page** | **Integer**| 页码,从0开始 | | +| **size** | **Integer**| 每页数量 | | ### Return type -[**OpenReleaseDTO**](OpenReleaseDTO.md) +[**List<OpenReleaseDTO>**](OpenReleaseDTO.md) ### Authorization @@ -316,23 +323,21 @@ public class Example { ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | 发布创建成功 | - | -| **400** | 发布参数错误 | - | -| **403** | 权限不足 | - | +| **200** | 成功获取活跃发布列表 | - | - -# **openapiV1EnvsEnvReleasesCompareGet** -> OpenapiV1EnvsEnvReleasesCompareGet200Response openapiV1EnvsEnvReleasesCompareGet(env, baseReleaseId, toCompareReleaseId) + +# **findAllReleases** +> List<OpenReleaseBO> findAllReleases(appId, env, clusterName, namespaceName, page, size) -对比发布 +获取所有发布(分页) (new added) -GET /openapi/v1/envs/{env}/releases/compare +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all ### Example ```java @@ -348,7 +353,7 @@ 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"); @@ -356,14 +361,17 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); ReleaseManagementApi apiInstance = new ReleaseManagementApi(defaultClient); - String env = "env_example"; // String | - Integer baseReleaseId = 56; // Integer | - Integer toCompareReleaseId = 56; // Integer | + String appId = "appId_example"; // String | 应用ID + String env = "env_example"; // String | 环境标识 + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 命名空间名称 + Integer page = 0; // Integer | 页码,从0开始 + Integer size = 5; // Integer | 每页数量 try { - OpenapiV1EnvsEnvReleasesCompareGet200Response result = apiInstance.openapiV1EnvsEnvReleasesCompareGet(env, baseReleaseId, toCompareReleaseId); + List result = apiInstance.findAllReleases(appId, env, clusterName, namespaceName, page, size); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling ReleaseManagementApi#openapiV1EnvsEnvReleasesCompareGet"); + System.err.println("Exception when calling ReleaseManagementApi#findAllReleases"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -377,13 +385,16 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **env** | **String**| | | -| **baseReleaseId** | **Integer**| | | -| **toCompareReleaseId** | **Integer**| | | +| **appId** | **String**| 应用ID | | +| **env** | **String**| 环境标识 | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 命名空间名称 | | +| **page** | **Integer**| 页码,从0开始 | | +| **size** | **Integer**| 每页数量 | | ### Return type -[**OpenapiV1EnvsEnvReleasesCompareGet200Response**](OpenapiV1EnvsEnvReleasesCompareGet200Response.md) +[**List<OpenReleaseBO>**](OpenReleaseBO.md) ### Authorization @@ -397,13 +408,13 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | | - | +| **200** | 成功获取发布列表 | - | - -# **openapiV1EnvsEnvReleasesReleaseIdGet** -> OpenReleaseDTO openapiV1EnvsEnvReleasesReleaseIdGet(env, releaseId) + +# **getReleaseById** +> OpenReleaseDTO getReleaseById(env, releaseId) -获取发布详情 +获取发布详情 (new added) GET /openapi/v1/envs/{env}/releases/{releaseId} @@ -421,7 +432,7 @@ 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"); @@ -429,13 +440,13 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); ReleaseManagementApi apiInstance = new ReleaseManagementApi(defaultClient); - String env = "env_example"; // String | - Integer releaseId = 56; // Integer | + String env = "env_example"; // String | 环境标识 + Integer releaseId = 56; // Integer | 发布ID try { - OpenReleaseDTO result = apiInstance.openapiV1EnvsEnvReleasesReleaseIdGet(env, releaseId); + OpenReleaseDTO result = apiInstance.getReleaseById(env, releaseId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling ReleaseManagementApi#openapiV1EnvsEnvReleasesReleaseIdGet"); + System.err.println("Exception when calling ReleaseManagementApi#getReleaseById"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -449,8 +460,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **env** | **String**| | | -| **releaseId** | **Integer**| | | +| **env** | **String**| 环境标识 | | +| **releaseId** | **Integer**| 发布ID | | ### Return type @@ -468,15 +479,91 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | | - | +| **200** | 成功获取发布详情 | - | + + +# **loadLatestActiveRelease** +> OpenReleaseDTO loadLatestActiveRelease(appId, env, clusterName, namespaceName) + +获取最新活跃发布 (original openapi) + +查询命名空间最新活跃发布 + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ReleaseManagementApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ReleaseManagementApi apiInstance = new ReleaseManagementApi(defaultClient); + String appId = "appId_example"; // String | 应用ID + String env = "env_example"; // String | 环境标识 + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 命名空间名称 + try { + OpenReleaseDTO result = apiInstance.loadLatestActiveRelease(appId, env, clusterName, namespaceName); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ReleaseManagementApi#loadLatestActiveRelease"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| 应用ID | | +| **env** | **String**| 环境标识 | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 命名空间名称 | | + +### Return type - -# **openapiV1EnvsEnvReleasesReleaseIdRollbackPut** -> Object openapiV1EnvsEnvReleasesReleaseIdRollbackPut(env, releaseId, operator) +[**OpenReleaseDTO**](OpenReleaseDTO.md) -回滚发布 +### Authorization +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 成功获取最新活跃发布 | - | +| **404** | 未找到活跃发布 | - | + +# **merge** +> OpenReleaseDTO merge(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO) + +合并分支 (original openapi) + +合并灰度分支并可选择删除分支 ### Example ```java @@ -492,7 +579,7 @@ 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"); @@ -500,14 +587,18 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); ReleaseManagementApi apiInstance = new ReleaseManagementApi(defaultClient); - String env = "env_example"; // String | - Integer releaseId = 56; // Integer | - String operator = "operator_example"; // String | + String appId = "appId_example"; // String | 应用ID + String env = "env_example"; // String | 环境标识 + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 命名空间名称 + String branchName = "branchName_example"; // String | 分支名称 + Boolean deleteBranch = true; // Boolean | 合并后是否删除分支(true/false) + NamespaceReleaseDTO namespaceReleaseDTO = new NamespaceReleaseDTO(); // NamespaceReleaseDTO | try { - Object result = apiInstance.openapiV1EnvsEnvReleasesReleaseIdRollbackPut(env, releaseId, operator); + OpenReleaseDTO result = apiInstance.merge(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling ReleaseManagementApi#openapiV1EnvsEnvReleasesReleaseIdRollbackPut"); + System.err.println("Exception when calling ReleaseManagementApi#merge"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -521,9 +612,88 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **env** | **String**| | | -| **releaseId** | **Integer**| | | -| **operator** | **String**| | | +| **appId** | **String**| 应用ID | | +| **env** | **String**| 环境标识 | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 命名空间名称 | | +| **branchName** | **String**| 分支名称 | | +| **deleteBranch** | **Boolean**| 合并后是否删除分支(true/false) | | +| **namespaceReleaseDTO** | [**NamespaceReleaseDTO**](NamespaceReleaseDTO.md)| | | + +### Return type + +[**OpenReleaseDTO**](OpenReleaseDTO.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 分支合并成功 | - | +| **400** | 合并参数错误 | - | +| **403** | 权限不足 | - | + + +# **rollback** +> Object rollback(env, releaseId, operator) + +回滚发布 (original openapi) + +回滚到指定的发布版本 + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.ReleaseManagementApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + ReleaseManagementApi apiInstance = new ReleaseManagementApi(defaultClient); + String env = "env_example"; // String | 环境标识 + Long releaseId = 56L; // Long | 发布ID + String operator = "operator_example"; // String | 操作人用户名 + try { + Object result = apiInstance.rollback(env, releaseId, operator); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ReleaseManagementApi#rollback"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **env** | **String**| 环境标识 | | +| **releaseId** | **Long**| 发布ID | | +| **operator** | **String**| 操作人用户名 | | ### Return type @@ -541,5 +711,4 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | | - | - +| **200** | 发布回滚成功 | - | diff --git a/java-client/docs/RichResponseEntity.md b/java-client/docs/RichResponseEntity.md new file mode 100644 index 00000000..2de3a850 --- /dev/null +++ b/java-client/docs/RichResponseEntity.md @@ -0,0 +1,13 @@ + + +# RichResponseEntity + +A wrapper for a single response entity with code, message, and body + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | HTTP status code | | +|**message** | **Object** | Response message (can be string or object) | | +|**body** | **Object** | Response payload (generic type T) | [optional] | diff --git a/java-client/gradle/wrapper/gradle-wrapper.jar b/java-client/gradle/wrapper/gradle-wrapper.jar index e6441136f3d4ba8a0da8d277868979cfbc8ad796..7454180f2ae8848c63b8b4dea2cb829da983f2fa 100644 GIT binary patch literal 59536 zcma&NbC71ylI~qywr$(CZQJHswz}-9F59+k+g;UV+cs{`J?GrGXYR~=-ydruB3JCa zB64N^cILAcWk5iofq)<(fq;O7{th4@;QxID0)qN`mJ?GIqLY#rX8-|G{5M0pdVW5^ zzXk$-2kQTAC?_N@B`&6-N-rmVFE=$QD?>*=4<|!MJu@}isLc4AW#{m2if&A5T5g&~ ziuMQeS*U5sL6J698wOd)K@oK@1{peP5&Esut<#VH^u)gp`9H4)`uE!2$>RTctN+^u z=ASkePDZA-X8)rp%D;p*~P?*a_=*Kwc<^>QSH|^<0>o37lt^+Mj1;4YvJ(JR-Y+?%Nu}JAYj5 z_Qc5%Ao#F?q32i?ZaN2OSNhWL;2oDEw_({7ZbgUjna!Fqn3NzLM@-EWFPZVmc>(fZ z0&bF-Ch#p9C{YJT9Rcr3+Y_uR^At1^BxZ#eo>$PLJF3=;t_$2|t+_6gg5(j{TmjYU zK12c&lE?Eh+2u2&6Gf*IdKS&6?rYbSEKBN!rv{YCm|Rt=UlPcW9j`0o6{66#y5t9C zruFA2iKd=H%jHf%ypOkxLnO8#H}#Zt{8p!oi6)7#NqoF({t6|J^?1e*oxqng9Q2Cc zg%5Vu!em)}Yuj?kaP!D?b?(C*w!1;>R=j90+RTkyEXz+9CufZ$C^umX^+4|JYaO<5 zmIM3#dv`DGM;@F6;(t!WngZSYzHx?9&$xEF70D1BvfVj<%+b#)vz)2iLCrTeYzUcL z(OBnNoG6Le%M+@2oo)&jdOg=iCszzv59e zDRCeaX8l1hC=8LbBt|k5?CXgep=3r9BXx1uR8!p%Z|0+4Xro=xi0G!e{c4U~1j6!) zH6adq0}#l{%*1U(Cb%4AJ}VLWKBPi0MoKFaQH6x?^hQ!6em@993xdtS%_dmevzeNl z(o?YlOI=jl(`L9^ z0O+H9k$_@`6L13eTT8ci-V0ljDMD|0ifUw|Q-Hep$xYj0hTO@0%IS^TD4b4n6EKDG z??uM;MEx`s98KYN(K0>c!C3HZdZ{+_53DO%9k5W%pr6yJusQAv_;IA}925Y%;+!tY z%2k!YQmLLOr{rF~!s<3-WEUs)`ix_mSU|cNRBIWxOox_Yb7Z=~Q45ZNe*u|m^|)d* zog=i>`=bTe!|;8F+#H>EjIMcgWcG2ORD`w0WD;YZAy5#s{65~qfI6o$+Ty&-hyMyJ z3Ra~t>R!p=5ZpxA;QkDAoPi4sYOP6>LT+}{xp}tk+<0k^CKCFdNYG(Es>p0gqD)jP zWOeX5G;9(m@?GOG7g;e74i_|SmE?`B2i;sLYwRWKLy0RLW!Hx`=!LH3&k=FuCsM=9M4|GqzA)anEHfxkB z?2iK-u(DC_T1};KaUT@3nP~LEcENT^UgPvp!QC@Dw&PVAhaEYrPey{nkcn(ro|r7XUz z%#(=$7D8uP_uU-oPHhd>>^adbCSQetgSG`e$U|7mr!`|bU0aHl_cmL)na-5x1#OsVE#m*+k84Y^+UMeSAa zbrVZHU=mFwXEaGHtXQq`2ZtjfS!B2H{5A<3(nb-6ARVV8kEmOkx6D2x7~-6hl;*-*}2Xz;J#a8Wn;_B5=m zl3dY;%krf?i-Ok^Pal-}4F`{F@TYPTwTEhxpZK5WCpfD^UmM_iYPe}wpE!Djai6_{ z*pGO=WB47#Xjb7!n2Ma)s^yeR*1rTxp`Mt4sfA+`HwZf%!7ZqGosPkw69`Ix5Ku6G z@Pa;pjzV&dn{M=QDx89t?p?d9gna*}jBly*#1!6}5K<*xDPJ{wv4& zM$17DFd~L*Te3A%yD;Dp9UGWTjRxAvMu!j^Tbc}2v~q^59d4bz zvu#!IJCy(BcWTc`;v$9tH;J%oiSJ_i7s;2`JXZF+qd4C)vY!hyCtl)sJIC{ebI*0> z@x>;EzyBv>AI-~{D6l6{ST=em*U( z(r$nuXY-#CCi^8Z2#v#UXOt`dbYN1z5jzNF2 z411?w)whZrfA20;nl&C1Gi+gk<`JSm+{|*2o<< zqM#@z_D`Cn|0H^9$|Tah)0M_X4c37|KQ*PmoT@%xHc3L1ZY6(p(sNXHa&49Frzto& zR`c~ClHpE~4Z=uKa5S(-?M8EJ$zt0&fJk~p$M#fGN1-y$7!37hld`Uw>Urri(DxLa;=#rK0g4J)pXMC zxzraOVw1+kNWpi#P=6(qxf`zSdUC?D$i`8ZI@F>k6k zz21?d+dw7b&i*>Kv5L(LH-?J%@WnqT7j#qZ9B>|Zl+=> z^U-pV@1y_ptHo4hl^cPRWewbLQ#g6XYQ@EkiP z;(=SU!yhjHp%1&MsU`FV1Z_#K1&(|5n(7IHbx&gG28HNT)*~-BQi372@|->2Aw5It z0CBpUcMA*QvsPy)#lr!lIdCi@1k4V2m!NH)%Px(vu-r(Q)HYc!p zJ^$|)j^E#q#QOgcb^pd74^JUi7fUmMiNP_o*lvx*q%_odv49Dsv$NV;6J z9GOXKomA{2Pb{w}&+yHtH?IkJJu~}Z?{Uk++2mB8zyvh*xhHKE``99>y#TdD z&(MH^^JHf;g(Tbb^&8P*;_i*2&fS$7${3WJtV7K&&(MBV2~)2KB3%cWg#1!VE~k#C z!;A;?p$s{ihyojEZz+$I1)L}&G~ml=udD9qh>Tu(ylv)?YcJT3ihapi!zgPtWb*CP zlLLJSRCj-^w?@;RU9aL2zDZY1`I3d<&OMuW=c3$o0#STpv_p3b9Wtbql>w^bBi~u4 z3D8KyF?YE?=HcKk!xcp@Cigvzy=lnFgc^9c%(^F22BWYNAYRSho@~*~S)4%AhEttv zvq>7X!!EWKG?mOd9&n>vvH1p4VzE?HCuxT-u+F&mnsfDI^}*-d00-KAauEaXqg3k@ zy#)MGX!X;&3&0s}F3q40ZmVM$(H3CLfpdL?hB6nVqMxX)q=1b}o_PG%r~hZ4gUfSp zOH4qlEOW4OMUc)_m)fMR_rl^pCfXc{$fQbI*E&mV77}kRF z&{<06AJyJ!e863o-V>FA1a9Eemx6>^F$~9ppt()ZbPGfg_NdRXBWoZnDy2;#ODgf! zgl?iOcF7Meo|{AF>KDwTgYrJLb$L2%%BEtO>T$C?|9bAB&}s;gI?lY#^tttY&hfr# zKhC+&b-rpg_?~uVK%S@mQleU#_xCsvIPK*<`E0fHE1&!J7!xD#IB|SSPW6-PyuqGn3^M^Rz%WT{e?OI^svARX&SAdU77V(C~ zM$H{Kg59op{<|8ry9ecfP%=kFm(-!W&?U0@<%z*+!*<e0XesMxRFu9QnGqun6R_%T+B%&9Dtk?*d$Q zb~>84jEAPi@&F@3wAa^Lzc(AJz5gsfZ7J53;@D<;Klpl?sK&u@gie`~vTsbOE~Cd4 z%kr56mI|#b(Jk&;p6plVwmNB0H@0SmgdmjIn5Ne@)}7Vty(yb2t3ev@22AE^s!KaN zyQ>j+F3w=wnx7w@FVCRe+`vUH)3gW%_72fxzqX!S&!dchdkRiHbXW1FMrIIBwjsai8`CB2r4mAbwp%rrO>3B$Zw;9=%fXI9B{d(UzVap7u z6piC-FQ)>}VOEuPpuqznpY`hN4dGa_1Xz9rVg(;H$5Te^F0dDv*gz9JS<|>>U0J^# z6)(4ICh+N_Q`Ft0hF|3fSHs*?a=XC;e`sJaU9&d>X4l?1W=|fr!5ShD|nv$GK;j46@BV6+{oRbWfqOBRb!ir88XD*SbC(LF}I1h#6@dvK%Toe%@ zhDyG$93H8Eu&gCYddP58iF3oQH*zLbNI;rN@E{T9%A8!=v#JLxKyUe}e}BJpB{~uN zqgxRgo0*-@-iaHPV8bTOH(rS(huwK1Xg0u+e!`(Irzu@Bld&s5&bWgVc@m7;JgELd zimVs`>vQ}B_1(2#rv#N9O`fJpVfPc7V2nv34PC);Dzbb;p!6pqHzvy?2pD&1NE)?A zt(t-ucqy@wn9`^MN5apa7K|L=9>ISC>xoc#>{@e}m#YAAa1*8-RUMKwbm|;5p>T`Z zNf*ph@tnF{gmDa3uwwN(g=`Rh)4!&)^oOy@VJaK4lMT&5#YbXkl`q?<*XtsqD z9PRK6bqb)fJw0g-^a@nu`^?71k|m3RPRjt;pIkCo1{*pdqbVs-Yl>4E>3fZx3Sv44grW=*qdSoiZ9?X0wWyO4`yDHh2E!9I!ZFi zVL8|VtW38}BOJHW(Ax#KL_KQzarbuE{(%TA)AY)@tY4%A%P%SqIU~8~-Lp3qY;U-} z`h_Gel7;K1h}7$_5ZZT0&%$Lxxr-<89V&&TCsu}LL#!xpQ1O31jaa{U34~^le*Y%L za?7$>Jk^k^pS^_M&cDs}NgXlR>16AHkSK-4TRaJSh#h&p!-!vQY%f+bmn6x`4fwTp z$727L^y`~!exvmE^W&#@uY!NxJi`g!i#(++!)?iJ(1)2Wk;RN zFK&O4eTkP$Xn~4bB|q8y(btx$R#D`O@epi4ofcETrx!IM(kWNEe42Qh(8*KqfP(c0 zouBl6>Fc_zM+V;F3znbo{x#%!?mH3`_ANJ?y7ppxS@glg#S9^MXu|FM&ynpz3o&Qh z2ujAHLF3($pH}0jXQsa#?t--TnF1P73b?4`KeJ9^qK-USHE)4!IYgMn-7z|=ALF5SNGkrtPG@Y~niUQV2?g$vzJN3nZ{7;HZHzWAeQ;5P|@Tl3YHpyznGG4-f4=XflwSJY+58-+wf?~Fg@1p1wkzuu-RF3j2JX37SQUc? zQ4v%`V8z9ZVZVqS8h|@@RpD?n0W<=hk=3Cf8R?d^9YK&e9ZybFY%jdnA)PeHvtBe- zhMLD+SSteHBq*q)d6x{)s1UrsO!byyLS$58WK;sqip$Mk{l)Y(_6hEIBsIjCr5t>( z7CdKUrJTrW%qZ#1z^n*Lb8#VdfzPw~OIL76aC+Rhr<~;4Tl!sw?Rj6hXj4XWa#6Tp z@)kJ~qOV)^Rh*-?aG>ic2*NlC2M7&LUzc9RT6WM%Cpe78`iAowe!>(T0jo&ivn8-7 zs{Qa@cGy$rE-3AY0V(l8wjI^uB8Lchj@?L}fYal^>T9z;8juH@?rG&g-t+R2dVDBe zq!K%{e-rT5jX19`(bP23LUN4+_zh2KD~EAYzhpEO3MUG8@}uBHH@4J zd`>_(K4q&>*k82(dDuC)X6JuPrBBubOg7qZ{?x!r@{%0);*`h*^F|%o?&1wX?Wr4b z1~&cy#PUuES{C#xJ84!z<1tp9sfrR(i%Tu^jnXy;4`Xk;AQCdFC@?V%|; zySdC7qS|uQRcH}EFZH%mMB~7gi}a0utE}ZE_}8PQH8f;H%PN41Cb9R%w5Oi5el^fd z$n{3SqLCnrF##x?4sa^r!O$7NX!}&}V;0ZGQ&K&i%6$3C_dR%I7%gdQ;KT6YZiQrW zk%q<74oVBV>@}CvJ4Wj!d^?#Zwq(b$E1ze4$99DuNg?6t9H}k_|D7KWD7i0-g*EO7 z;5{hSIYE4DMOK3H%|f5Edx+S0VI0Yw!tsaRS2&Il2)ea^8R5TG72BrJue|f_{2UHa z@w;^c|K3da#$TB0P3;MPlF7RuQeXT$ zS<<|C0OF(k)>fr&wOB=gP8!Qm>F41u;3esv7_0l%QHt(~+n; zf!G6%hp;Gfa9L9=AceiZs~tK+Tf*Wof=4!u{nIO90jH@iS0l+#%8=~%ASzFv7zqSB^?!@N7)kp0t&tCGLmzXSRMRyxCmCYUD2!B`? zhs$4%KO~m=VFk3Buv9osha{v+mAEq=ik3RdK@;WWTV_g&-$U4IM{1IhGX{pAu%Z&H zFfwCpUsX%RKg);B@7OUzZ{Hn{q6Vv!3#8fAg!P$IEx<0vAx;GU%}0{VIsmFBPq_mb zpe^BChDK>sc-WLKl<6 zwbW|e&d&dv9Wu0goueyu>(JyPx1mz0v4E?cJjFuKF71Q1)AL8jHO$!fYT3(;U3Re* zPPOe%*O+@JYt1bW`!W_1!mN&=w3G9ru1XsmwfS~BJ))PhD(+_J_^N6j)sx5VwbWK| zwRyC?W<`pOCY)b#AS?rluxuuGf-AJ=D!M36l{ua?@SJ5>e!IBr3CXIxWw5xUZ@Xrw z_R@%?{>d%Ld4p}nEsiA@v*nc6Ah!MUs?GA7e5Q5lPpp0@`%5xY$C;{%rz24$;vR#* zBP=a{)K#CwIY%p} zXVdxTQ^HS@O&~eIftU+Qt^~(DGxrdi3k}DdT^I7Iy5SMOp$QuD8s;+93YQ!OY{eB24%xY7ml@|M7I(Nb@K_-?F;2?et|CKkuZK_>+>Lvg!>JE~wN`BI|_h6$qi!P)+K-1Hh(1;a`os z55)4Q{oJiA(lQM#;w#Ta%T0jDNXIPM_bgESMCDEg6rM33anEr}=|Fn6)|jBP6Y}u{ zv9@%7*#RI9;fv;Yii5CI+KrRdr0DKh=L>)eO4q$1zmcSmglsV`*N(x=&Wx`*v!!hn6X-l0 zP_m;X??O(skcj+oS$cIdKhfT%ABAzz3w^la-Ucw?yBPEC+=Pe_vU8nd-HV5YX6X8r zZih&j^eLU=%*;VzhUyoLF;#8QsEfmByk+Y~caBqSvQaaWf2a{JKB9B>V&r?l^rXaC z8)6AdR@Qy_BxQrE2Fk?ewD!SwLuMj@&d_n5RZFf7=>O>hzVE*seW3U?_p|R^CfoY`?|#x9)-*yjv#lo&zP=uI`M?J zbzC<^3x7GfXA4{FZ72{PE*-mNHyy59Q;kYG@BB~NhTd6pm2Oj=_ zizmD?MKVRkT^KmXuhsk?eRQllPo2Ubk=uCKiZ&u3Xjj~<(!M94c)Tez@9M1Gfs5JV z->@II)CDJOXTtPrQudNjE}Eltbjq>6KiwAwqvAKd^|g!exgLG3;wP+#mZYr`cy3#39e653d=jrR-ulW|h#ddHu(m9mFoW~2yE zz5?dB%6vF}+`-&-W8vy^OCxm3_{02royjvmwjlp+eQDzFVEUiyO#gLv%QdDSI#3W* z?3!lL8clTaNo-DVJw@ynq?q!%6hTQi35&^>P85G$TqNt78%9_sSJt2RThO|JzM$iL zg|wjxdMC2|Icc5rX*qPL(coL!u>-xxz-rFiC!6hD1IR%|HSRsV3>Kq~&vJ=s3M5y8SG%YBQ|{^l#LGlg!D?E>2yR*eV%9m$_J6VGQ~AIh&P$_aFbh zULr0Z$QE!QpkP=aAeR4ny<#3Fwyw@rZf4?Ewq`;mCVv}xaz+3ni+}a=k~P+yaWt^L z@w67!DqVf7D%7XtXX5xBW;Co|HvQ8WR1k?r2cZD%U;2$bsM%u8{JUJ5Z0k= zZJARv^vFkmWx15CB=rb=D4${+#DVqy5$C%bf`!T0+epLJLnh1jwCdb*zuCL}eEFvE z{rO1%gxg>1!W(I!owu*mJZ0@6FM(?C+d*CeceZRW_4id*D9p5nzMY&{mWqrJomjIZ z97ZNnZ3_%Hx8dn;H>p8m7F#^2;T%yZ3H;a&N7tm=Lvs&lgJLW{V1@h&6Vy~!+Ffbb zv(n3+v)_D$}dqd!2>Y2B)#<+o}LH#%ogGi2-?xRIH)1!SD)u-L65B&bsJTC=LiaF+YOCif2dUX6uAA|#+vNR z>U+KQekVGon)Yi<93(d!(yw1h3&X0N(PxN2{%vn}cnV?rYw z$N^}_o!XUB!mckL`yO1rnUaI4wrOeQ(+&k?2mi47hzxSD`N#-byqd1IhEoh!PGq>t z_MRy{5B0eKY>;Ao3z$RUU7U+i?iX^&r739F)itdrTpAi-NN0=?^m%?{A9Ly2pVv>Lqs6moTP?T2-AHqFD-o_ znVr|7OAS#AEH}h8SRPQ@NGG47dO}l=t07__+iK8nHw^(AHx&Wb<%jPc$$jl6_p(b$ z)!pi(0fQodCHfM)KMEMUR&UID>}m^(!{C^U7sBDOA)$VThRCI0_+2=( zV8mMq0R(#z;C|7$m>$>`tX+T|xGt(+Y48@ZYu#z;0pCgYgmMVbFb!$?%yhZqP_nhn zy4<#3P1oQ#2b51NU1mGnHP$cf0j-YOgAA}A$QoL6JVLcmExs(kU{4z;PBHJD%_=0F z>+sQV`mzijSIT7xn%PiDKHOujX;n|M&qr1T@rOxTdxtZ!&u&3HHFLYD5$RLQ=heur zb>+AFokUVQeJy-#LP*^)spt{mb@Mqe=A~-4p0b+Bt|pZ+@CY+%x}9f}izU5;4&QFE zO1bhg&A4uC1)Zb67kuowWY4xbo&J=%yoXlFB)&$d*-}kjBu|w!^zbD1YPc0-#XTJr z)pm2RDy%J3jlqSMq|o%xGS$bPwn4AqitC6&e?pqWcjWPt{3I{>CBy;hg0Umh#c;hU3RhCUX=8aR>rmd` z7Orw(5tcM{|-^J?ZAA9KP|)X6n9$-kvr#j5YDecTM6n z&07(nD^qb8hpF0B^z^pQ*%5ePYkv&FabrlI61ntiVp!!C8y^}|<2xgAd#FY=8b*y( zuQOuvy2`Ii^`VBNJB&R!0{hABYX55ooCAJSSevl4RPqEGb)iy_0H}v@vFwFzD%>#I>)3PsouQ+_Kkbqy*kKdHdfkN7NBcq%V{x^fSxgXpg7$bF& zj!6AQbDY(1u#1_A#1UO9AxiZaCVN2F0wGXdY*g@x$ByvUA?ePdide0dmr#}udE%K| z3*k}Vv2Ew2u1FXBaVA6aerI36R&rzEZeDDCl5!t0J=ug6kuNZzH>3i_VN`%BsaVB3 zQYw|Xub_SGf{)F{$ZX5`Jc!X!;eybjP+o$I{Z^Hsj@D=E{MnnL+TbC@HEU2DjG{3-LDGIbq()U87x4eS;JXnSh;lRlJ z>EL3D>wHt-+wTjQF$fGyDO$>d+(fq@bPpLBS~xA~R=3JPbS{tzN(u~m#Po!?H;IYv zE;?8%^vle|%#oux(Lj!YzBKv+Fd}*Ur-dCBoX*t{KeNM*n~ZPYJ4NNKkI^MFbz9!v z4(Bvm*Kc!-$%VFEewYJKz-CQN{`2}KX4*CeJEs+Q(!kI%hN1!1P6iOq?ovz}X0IOi z)YfWpwW@pK08^69#wSyCZkX9?uZD?C^@rw^Y?gLS_xmFKkooyx$*^5#cPqntNTtSG zlP>XLMj2!VF^0k#ole7`-c~*~+_T5ls?x4)ah(j8vo_ zwb%S8qoaZqY0-$ZI+ViIA_1~~rAH7K_+yFS{0rT@eQtTAdz#8E5VpwnW!zJ_^{Utv zlW5Iar3V5t&H4D6A=>?mq;G92;1cg9a2sf;gY9pJDVKn$DYdQlvfXq}zz8#LyPGq@ z+`YUMD;^-6w&r-82JL7mA8&M~Pj@aK!m{0+^v<|t%APYf7`}jGEhdYLqsHW-Le9TL z_hZZ1gbrz7$f9^fAzVIP30^KIz!!#+DRLL+qMszvI_BpOSmjtl$hh;&UeM{ER@INV zcI}VbiVTPoN|iSna@=7XkP&-4#06C};8ajbxJ4Gcq8(vWv4*&X8bM^T$mBk75Q92j z1v&%a;OSKc8EIrodmIiw$lOES2hzGDcjjB`kEDfJe{r}yE6`eZL zEB`9u>Cl0IsQ+t}`-cx}{6jqcANucqIB>Qmga_&<+80E2Q|VHHQ$YlAt{6`Qu`HA3 z03s0-sSlwbvgi&_R8s={6<~M^pGvBNjKOa>tWenzS8s zR>L7R5aZ=mSU{f?ib4Grx$AeFvtO5N|D>9#)ChH#Fny2maHWHOf2G=#<9Myot#+4u zWVa6d^Vseq_0=#AYS(-m$Lp;*8nC_6jXIjEM`omUmtH@QDs3|G)i4j*#_?#UYVZvJ z?YjT-?!4Q{BNun;dKBWLEw2C-VeAz`%?A>p;)PL}TAZn5j~HK>v1W&anteARlE+~+ zj>c(F;?qO3pXBb|#OZdQnm<4xWmn~;DR5SDMxt0UK_F^&eD|KZ=O;tO3vy4@4h^;2 zUL~-z`-P1aOe?|ZC1BgVsL)2^J-&vIFI%q@40w0{jjEfeVl)i9(~bt2z#2Vm)p`V_ z1;6$Ae7=YXk#=Qkd24Y23t&GvRxaOoad~NbJ+6pxqzJ>FY#Td7@`N5xp!n(c!=RE& z&<<@^a$_Ys8jqz4|5Nk#FY$~|FPC0`*a5HH!|Gssa9=~66&xG9)|=pOOJ2KE5|YrR zw!w6K2aC=J$t?L-;}5hn6mHd%hC;p8P|Dgh6D>hGnXPgi;6r+eA=?f72y9(Cf_ho{ zH6#)uD&R=73^$$NE;5piWX2bzR67fQ)`b=85o0eOLGI4c-Tb@-KNi2pz=Ke@SDcPn za$AxXib84`!Sf;Z3B@TSo`Dz7GM5Kf(@PR>Ghzi=BBxK8wRp>YQoXm+iL>H*Jo9M3 z6w&E?BC8AFTFT&Tv8zf+m9<&S&%dIaZ)Aoqkak_$r-2{$d~0g2oLETx9Y`eOAf14QXEQw3tJne;fdzl@wV#TFXSLXM2428F-Q}t+n2g%vPRMUzYPvzQ9f# zu(liiJem9P*?0%V@RwA7F53r~|I!Ty)<*AsMX3J{_4&}{6pT%Tpw>)^|DJ)>gpS~1rNEh z0$D?uO8mG?H;2BwM5a*26^7YO$XjUm40XmBsb63MoR;bJh63J;OngS5sSI+o2HA;W zdZV#8pDpC9Oez&L8loZO)MClRz!_!WD&QRtQxnazhT%Vj6Wl4G11nUk8*vSeVab@N#oJ}`KyJv+8Mo@T1-pqZ1t|?cnaVOd;1(h9 z!$DrN=jcGsVYE-0-n?oCJ^4x)F}E;UaD-LZUIzcD?W^ficqJWM%QLy6QikrM1aKZC zi{?;oKwq^Vsr|&`i{jIphA8S6G4)$KGvpULjH%9u(Dq247;R#l&I0{IhcC|oBF*Al zvLo7Xte=C{aIt*otJD}BUq)|_pdR>{zBMT< z(^1RpZv*l*m*OV^8>9&asGBo8h*_4q*)-eCv*|Pq=XNGrZE)^(SF7^{QE_~4VDB(o zVcPA_!G+2CAtLbl+`=Q~9iW`4ZRLku!uB?;tWqVjB0lEOf}2RD7dJ=BExy=<9wkb- z9&7{XFA%n#JsHYN8t5d~=T~5DcW4$B%3M+nNvC2`0!#@sckqlzo5;hhGi(D9=*A4` z5ynobawSPRtWn&CDLEs3Xf`(8^zDP=NdF~F^s&={l7(aw&EG}KWpMjtmz7j_VLO;@ zM2NVLDxZ@GIv7*gzl1 zjq78tv*8#WSY`}Su0&C;2F$Ze(q>F(@Wm^Gw!)(j;dk9Ad{STaxn)IV9FZhm*n+U} zi;4y*3v%A`_c7a__DJ8D1b@dl0Std3F||4Wtvi)fCcBRh!X9$1x!_VzUh>*S5s!oq z;qd{J_r79EL2wIeiGAqFstWtkfIJpjVh%zFo*=55B9Zq~y0=^iqHWfQl@O!Ak;(o*m!pZqe9 z%U2oDOhR)BvW8&F70L;2TpkzIutIvNQaTjjs5V#8mV4!NQ}zN=i`i@WI1z0eN-iCS z;vL-Wxc^Vc_qK<5RPh(}*8dLT{~GzE{w2o$2kMFaEl&q zP{V=>&3kW7tWaK-Exy{~`v4J0U#OZBk{a9{&)&QG18L@6=bsZ1zC_d{{pKZ-Ey>I> z;8H0t4bwyQqgu4hmO`3|4K{R*5>qnQ&gOfdy?z`XD%e5+pTDzUt3`k^u~SaL&XMe= z9*h#kT(*Q9jO#w2Hd|Mr-%DV8i_1{J1MU~XJ3!WUplhXDYBpJH><0OU`**nIvPIof z|N8@I=wA)sf45SAvx||f?Z5uB$kz1qL3Ky_{%RPdP5iN-D2!p5scq}buuC00C@jom zhfGKm3|f?Z0iQ|K$Z~!`8{nmAS1r+fp6r#YDOS8V*;K&Gs7Lc&f^$RC66O|)28oh`NHy&vq zJh+hAw8+ybTB0@VhWN^0iiTnLsCWbS_y`^gs!LX!Lw{yE``!UVzrV24tP8o;I6-65 z1MUiHw^{bB15tmrVT*7-#sj6cs~z`wk52YQJ*TG{SE;KTm#Hf#a~|<(|ImHH17nNM z`Ub{+J3dMD!)mzC8b(2tZtokKW5pAwHa?NFiso~# z1*iaNh4lQ4TS)|@G)H4dZV@l*Vd;Rw;-;odDhW2&lJ%m@jz+Panv7LQm~2Js6rOW3 z0_&2cW^b^MYW3)@o;neZ<{B4c#m48dAl$GCc=$>ErDe|?y@z`$uq3xd(%aAsX)D%l z>y*SQ%My`yDP*zof|3@_w#cjaW_YW4BdA;#Glg1RQcJGY*CJ9`H{@|D+*e~*457kd z73p<%fB^PV!Ybw@)Dr%(ZJbX}xmCStCYv#K3O32ej{$9IzM^I{6FJ8!(=azt7RWf4 z7ib0UOPqN40X!wOnFOoddd8`!_IN~9O)#HRTyjfc#&MCZ zZAMzOVB=;qwt8gV?{Y2?b=iSZG~RF~uyx18K)IDFLl})G1v@$(s{O4@RJ%OTJyF+Cpcx4jmy|F3euCnMK!P2WTDu5j z{{gD$=M*pH!GGzL%P)V2*ROm>!$Y=z|D`!_yY6e7SU$~a5q8?hZGgaYqaiLnkK%?0 zs#oI%;zOxF@g*@(V4p!$7dS1rOr6GVs6uYCTt2h)eB4?(&w8{#o)s#%gN@BBosRUe z)@P@8_Zm89pr~)b>e{tbPC~&_MR--iB{=)y;INU5#)@Gix-YpgP<-c2Ms{9zuCX|3 z!p(?VaXww&(w&uBHzoT%!A2=3HAP>SDxcljrego7rY|%hxy3XlODWffO_%g|l+7Y_ zqV(xbu)s4lV=l7M;f>vJl{`6qBm>#ZeMA}kXb97Z)?R97EkoI?x6Lp0yu1Z>PS?2{ z0QQ(8D)|lc9CO3B~e(pQM&5(1y&y=e>C^X$`)_&XuaI!IgDTVqt31wX#n+@!a_A0ZQkA zCJ2@M_4Gb5MfCrm5UPggeyh)8 zO9?`B0J#rkoCx(R0I!ko_2?iO@|oRf1;3r+i)w-2&j?=;NVIdPFsB)`|IC0zk6r9c zRrkfxWsiJ(#8QndNJj@{@WP2Ackr|r1VxV{7S&rSU(^)-M8gV>@UzOLXu9K<{6e{T zXJ6b92r$!|lwjhmgqkdswY&}c)KW4A)-ac%sU;2^fvq7gfUW4Bw$b!i@duy1CAxSn z(pyh$^Z=&O-q<{bZUP+$U}=*#M9uVc>CQVgDs4swy5&8RAHZ~$)hrTF4W zPsSa~qYv_0mJnF89RnnJTH`3}w4?~epFl=D(35$ zWa07ON$`OMBOHgCmfO(9RFc<)?$x)N}Jd2A(<*Ll7+4jrRt9w zwGxExUXd9VB#I|DwfxvJ;HZ8Q{37^wDhaZ%O!oO(HpcqfLH%#a#!~;Jl7F5>EX_=8 z{()l2NqPz>La3qJR;_v+wlK>GsHl;uRA8%j`A|yH@k5r%55S9{*Cp%uw6t`qc1!*T za2OeqtQj7sAp#Q~=5Fs&aCR9v>5V+s&RdNvo&H~6FJOjvaj--2sYYBvMq;55%z8^o z|BJDA4vzfow#DO#ZQHh;Oq_{r+qP{R9ox2TOgwQiv7Ow!zjN+A@BN;0tA2lUb#+zO z(^b89eV)D7UVE+h{mcNc6&GtpOqDn_?VAQ)Vob$hlFwW%xh>D#wml{t&Ofmm_d_+; zKDxzdr}`n2Rw`DtyIjrG)eD0vut$}dJAZ0AohZ+ZQdWXn_Z@dI_y=7t3q8x#pDI-K z2VVc&EGq445Rq-j0=U=Zx`oBaBjsefY;%)Co>J3v4l8V(T8H?49_@;K6q#r~Wwppc z4XW0(4k}cP=5ex>-Xt3oATZ~bBWKv)aw|I|Lx=9C1s~&b77idz({&q3T(Y(KbWO?+ zmcZ6?WeUsGk6>km*~234YC+2e6Zxdl~<_g2J|IE`GH%n<%PRv-50; zH{tnVts*S5*_RxFT9eM0z-pksIb^drUq4>QSww=u;UFCv2AhOuXE*V4z?MM`|ABOC4P;OfhS(M{1|c%QZ=!%rQTDFx`+}?Kdx$&FU?Y<$x;j7z=(;Lyz+?EE>ov!8vvMtSzG!nMie zsBa9t8as#2nH}n8xzN%W%U$#MHNXmDUVr@GX{?(=yI=4vks|V)!-W5jHsU|h_&+kY zS_8^kd3jlYqOoiI`ZqBVY!(UfnAGny!FowZWY_@YR0z!nG7m{{)4OS$q&YDyw6vC$ zm4!$h>*|!2LbMbxS+VM6&DIrL*X4DeMO!@#EzMVfr)e4Tagn~AQHIU8?e61TuhcKD zr!F4(kEebk(Wdk-?4oXM(rJwanS>Jc%<>R(siF+>+5*CqJLecP_we33iTFTXr6W^G z7M?LPC-qFHK;E!fxCP)`8rkxZyFk{EV;G-|kwf4b$c1k0atD?85+|4V%YATWMG|?K zLyLrws36p%Qz6{}>7b>)$pe>mR+=IWuGrX{3ZPZXF3plvuv5Huax86}KX*lbPVr}L z{C#lDjdDeHr~?l|)Vp_}T|%$qF&q#U;ClHEPVuS+Jg~NjC1RP=17=aQKGOcJ6B3mp z8?4*-fAD~}sX*=E6!}^u8)+m2j<&FSW%pYr_d|p_{28DZ#Cz0@NF=gC-o$MY?8Ca8 zr5Y8DSR^*urS~rhpX^05r30Ik#2>*dIOGxRm0#0YX@YQ%Mg5b6dXlS!4{7O_kdaW8PFSdj1=ryI-=5$fiieGK{LZ+SX(1b=MNL!q#lN zv98?fqqTUH8r8C7v(cx#BQ5P9W>- zmW93;eH6T`vuJ~rqtIBg%A6>q>gnWb3X!r0wh_q;211+Om&?nvYzL1hhtjB zK_7G3!n7PL>d!kj){HQE zE8(%J%dWLh1_k%gVXTZt zEdT09XSKAx27Ncaq|(vzL3gm83q>6CAw<$fTnMU05*xAe&rDfCiu`u^1)CD<>sx0i z*hr^N_TeN89G(nunZoLBf^81#pmM}>JgD@Nn1l*lN#a=B=9pN%tmvYFjFIoKe_(GF z-26x{(KXdfsQL7Uv6UtDuYwV`;8V3w>oT_I<`Ccz3QqK9tYT5ZQzbop{=I=!pMOCb zCU68`n?^DT%^&m>A%+-~#lvF!7`L7a{z<3JqIlk1$<||_J}vW1U9Y&eX<}l8##6i( zZcTT@2`9(Mecptm@{3A_Y(X`w9K0EwtPq~O!16bq{7c0f7#(3wn-^)h zxV&M~iiF!{-6A@>o;$RzQ5A50kxXYj!tcgme=Qjrbje~;5X2xryU;vH|6bE(8z^<7 zQ>BG7_c*JG8~K7Oe68i#0~C$v?-t@~@r3t2inUnLT(c=URpA9kA8uq9PKU(Ps(LVH zqgcqW>Gm?6oV#AldDPKVRcEyQIdTT`Qa1j~vS{<;SwyTdr&3*t?J)y=M7q*CzucZ&B0M=joT zBbj@*SY;o2^_h*>R0e({!QHF0=)0hOj^B^d*m>SnRrwq>MolNSgl^~r8GR#mDWGYEIJA8B<|{{j?-7p zVnV$zancW3&JVDtVpIlI|5djKq0(w$KxEFzEiiL=h5Jw~4Le23@s(mYyXWL9SX6Ot zmb)sZaly_P%BeX_9 zw&{yBef8tFm+%=--m*J|o~+Xg3N+$IH)t)=fqD+|fEk4AAZ&!wcN5=mi~Vvo^i`}> z#_3ahR}Ju)(Px7kev#JGcSwPXJ2id9%Qd2A#Uc@t8~egZ8;iC{e! z%=CGJOD1}j!HW_sgbi_8suYnn4#Ou}%9u)dXd3huFIb!ytlX>Denx@pCS-Nj$`VO&j@(z!kKSP0hE4;YIP#w9ta=3DO$7f*x zc9M4&NK%IrVmZAe=r@skWD`AEWH=g+r|*13Ss$+{c_R!b?>?UaGXlw*8qDmY#xlR= z<0XFbs2t?8i^G~m?b|!Hal^ZjRjt<@a? z%({Gn14b4-a|#uY^=@iiKH+k?~~wTj5K1A&hU z2^9-HTC)7zpoWK|$JXaBL6C z#qSNYtY>65T@Zs&-0cHeu|RX(Pxz6vTITdzJdYippF zC-EB+n4}#lM7`2Ry~SO>FxhKboIAF#Z{1wqxaCb{#yEFhLuX;Rx(Lz%T`Xo1+a2M}7D+@wol2)OJs$TwtRNJ={( zD@#zTUEE}#Fz#&(EoD|SV#bayvr&E0vzmb%H?o~46|FAcx?r4$N z&67W3mdip-T1RIxwSm_&(%U|+WvtGBj*}t69XVd&ebn>KOuL(7Y8cV?THd-(+9>G7*Nt%T zcH;`p={`SOjaf7hNd(=37Lz3-51;58JffzIPgGs_7xIOsB5p2t&@v1mKS$2D$*GQ6 zM(IR*j4{nri7NMK9xlDy-hJW6sW|ZiDRaFiayj%;(%51DN!ZCCCXz+0Vm#};70nOx zJ#yA0P3p^1DED;jGdPbQWo0WATN=&2(QybbVdhd=Vq*liDk`c7iZ?*AKEYC#SY&2g z&Q(Ci)MJ{mEat$ZdSwTjf6h~roanYh2?9j$CF@4hjj_f35kTKuGHvIs9}Re@iKMxS-OI*`0S z6s)fOtz}O$T?PLFVSeOjSO26$@u`e<>k(OSP!&YstH3ANh>)mzmKGNOwOawq-MPXe zy4xbeUAl6tamnx))-`Gi2uV5>9n(73yS)Ukma4*7fI8PaEwa)dWHs6QA6>$}7?(L8 ztN8M}?{Tf!Zu22J5?2@95&rQ|F7=FK-hihT-vDp!5JCcWrVogEnp;CHenAZ)+E+K5 z$Cffk5sNwD_?4+ymgcHR(5xgt20Z8M`2*;MzOM#>yhk{r3x=EyM226wb&!+j`W<%* zSc&|`8!>dn9D@!pYow~(DsY_naSx7(Z4i>cu#hA5=;IuI88}7f%)bRkuY2B;+9Uep zpXcvFWkJ!mQai63BgNXG26$5kyhZ2&*3Q_tk)Ii4M>@p~_~q_cE!|^A;_MHB;7s#9 zKzMzK{lIxotjc};k67^Xsl-gS!^*m*m6kn|sbdun`O?dUkJ{0cmI0-_2y=lTAfn*Y zKg*A-2sJq)CCJgY0LF-VQvl&6HIXZyxo2#!O&6fOhbHXC?%1cMc6y^*dOS{f$=137Ds1m01qs`>iUQ49JijsaQ( zksqV9@&?il$|4Ua%4!O15>Zy&%gBY&wgqB>XA3!EldQ%1CRSM(pp#k~-pkcCg4LAT zXE=puHbgsw)!xtc@P4r~Z}nTF=D2~j(6D%gTBw$(`Fc=OOQ0kiW$_RDd=hcO0t97h zb86S5r=>(@VGy1&#S$Kg_H@7G^;8Ue)X5Y+IWUi`o;mpvoV)`fcVk4FpcT|;EG!;? zHG^zrVVZOm>1KFaHlaogcWj(v!S)O(Aa|Vo?S|P z5|6b{qkH(USa*Z7-y_Uvty_Z1|B{rTS^qmEMLEYUSk03_Fg&!O3BMo{b^*`3SHvl0 zhnLTe^_vVIdcSHe)SQE}r~2dq)VZJ!aSKR?RS<(9lzkYo&dQ?mubnWmgMM37Nudwo z3Vz@R{=m2gENUE3V4NbIzAA$H1z0pagz94-PTJyX{b$yndsdKptmlKQKaaHj@3=ED zc7L?p@%ui|RegVYutK$64q4pe9+5sv34QUpo)u{1ci?)_7gXQd{PL>b0l(LI#rJmN zGuO+%GO`xneFOOr4EU(Wg}_%bhzUf;d@TU+V*2#}!2OLwg~%D;1FAu=Un>OgjPb3S z7l(riiCwgghC=Lm5hWGf5NdGp#01xQ59`HJcLXbUR3&n%P(+W2q$h2Qd z*6+-QXJ*&Kvk9ht0f0*rO_|FMBALen{j7T1l%=Q>gf#kma zQlg#I9+HB+z*5BMxdesMND`_W;q5|FaEURFk|~&{@qY32N$G$2B=&Po{=!)x5b!#n zxLzblkq{yj05#O7(GRuT39(06FJlalyv<#K4m}+vs>9@q-&31@1(QBv82{}Zkns~K ze{eHC_RDX0#^A*JQTwF`a=IkE6Ze@j#-8Q`tTT?k9`^ZhA~3eCZJ-Jr{~7Cx;H4A3 zcZ+Zj{mzFZbVvQ6U~n>$U2ZotGsERZ@}VKrgGh0xM;Jzt29%TX6_&CWzg+YYMozrM z`nutuS)_0dCM8UVaKRj804J4i%z2BA_8A4OJRQ$N(P9Mfn-gF;4#q788C@9XR0O3< zsoS4wIoyt046d+LnSCJOy@B@Uz*#GGd#+Ln1ek5Dv>(ZtD@tgZlPnZZJGBLr^JK+!$$?A_fA3LOrkoDRH&l7 zcMcD$Hsjko3`-{bn)jPL6E9Ds{WskMrivsUu5apD z?grQO@W7i5+%X&E&p|RBaEZ(sGLR@~(y^BI@lDMot^Ll?!`90KT!JXUhYS`ZgX3jnu@Ja^seA*M5R@f`=`ynQV4rc$uT1mvE?@tz)TN<=&H1%Z?5yjxcpO+6y_R z6EPuPKM5uxKpmZfT(WKjRRNHs@ib)F5WAP7QCADvmCSD#hPz$V10wiD&{NXyEwx5S z6NE`3z!IS^$s7m}PCwQutVQ#~w+V z=+~->DI*bR2j0^@dMr9`p>q^Ny~NrAVxrJtX2DUveic5vM%#N*XO|?YAWwNI$Q)_) zvE|L(L1jP@F%gOGtnlXtIv2&1i8q<)Xfz8O3G^Ea~e*HJsQgBxWL(yuLY+jqUK zRE~`-zklrGog(X}$9@ZVUw!8*=l`6mzYLtsg`AvBYz(cxmAhr^j0~(rzXdiOEeu_p zE$sf2(w(BPAvO5DlaN&uQ$4@p-b?fRs}d7&2UQ4Fh?1Hzu*YVjcndqJLw0#q@fR4u zJCJ}>_7-|QbvOfylj+e^_L`5Ep9gqd>XI3-O?Wp z-gt*P29f$Tx(mtS`0d05nHH=gm~Po_^OxxUwV294BDKT>PHVlC5bndncxGR!n(OOm znsNt@Q&N{TLrmsoKFw0&_M9$&+C24`sIXGWgQaz=kY;S{?w`z^Q0JXXBKFLj0w0U6P*+jPKyZHX9F#b0D1$&(- zrm8PJd?+SrVf^JlfTM^qGDK&-p2Kdfg?f>^%>1n8bu&byH(huaocL>l@f%c*QkX2i znl}VZ4R1en4S&Bcqw?$=Zi7ohqB$Jw9x`aM#>pHc0x z0$!q7iFu zZ`tryM70qBI6JWWTF9EjgG@>6SRzsd}3h+4D8d~@CR07P$LJ}MFsYi-*O%XVvD@yT|rJ+Mk zDllJ7$n0V&A!0flbOf)HE6P_afPWZmbhpliqJuw=-h+r;WGk|ntkWN(8tKlYpq5Ow z(@%s>IN8nHRaYb*^d;M(D$zGCv5C|uqmsDjwy4g=Lz>*OhO3z=)VD}C<65;`89Ye} zSCxrv#ILzIpEx1KdLPlM&%Cctf@FqTKvNPXC&`*H9=l=D3r!GLM?UV zOxa(8ZsB`&+76S-_xuj?G#wXBfDY@Z_tMpXJS7^mp z@YX&u0jYw2A+Z+bD#6sgVK5ZgdPSJV3>{K^4~%HV?rn~4D)*2H!67Y>0aOmzup`{D zzDp3c9yEbGCY$U<8biJ_gB*`jluz1ShUd!QUIQJ$*1;MXCMApJ^m*Fiv88RZ zFopLViw}{$Tyhh_{MLGIE2~sZ)t0VvoW%=8qKZ>h=adTe3QM$&$PO2lfqH@brt!9j ziePM8$!CgE9iz6B<6_wyTQj?qYa;eC^{x_0wuwV~W+^fZmFco-o%wsKSnjXFEx02V zF5C2t)T6Gw$Kf^_c;Ei3G~uC8SM-xyycmXyC2hAVi-IfXqhu$$-C=*|X?R0~hu z8`J6TdgflslhrmDZq1f?GXF7*ALeMmOEpRDg(s*H`4>_NAr`2uqF;k;JQ+8>A|_6ZNsNLECC%NNEb1Y1dP zbIEmNpK)#XagtL4R6BC{C5T(+=yA-(Z|Ap}U-AfZM#gwVpus3(gPn}Q$CExObJ5AC z)ff9Yk?wZ}dZ-^)?cbb9Fw#EjqQ8jxF4G3=L?Ra zg_)0QDMV1y^A^>HRI$x?Op@t;oj&H@1xt4SZ9(kifQ zb59B*`M99Td7@aZ3UWvj1rD0sE)d=BsBuW*KwkCds7ay(7*01_+L}b~7)VHI>F_!{ zyxg-&nCO?v#KOUec0{OOKy+sjWA;8rTE|Lv6I9H?CI?H(mUm8VXGwU$49LGpz&{nQp2}dinE1@lZ1iox6{ghN&v^GZv9J${7WaXj)<0S4g_uiJ&JCZ zr8-hsu`U%N;+9N^@&Q0^kVPB3)wY(rr}p7{p0qFHb3NUUHJb672+wRZs`gd1UjKPX z4o6zljKKA+Kkj?H>Ew63o%QjyBk&1!P22;MkD>sM0=z_s-G{mTixJCT9@_|*(p^bz zJ8?ZZ&;pzV+7#6Mn`_U-)k8Pjg?a;|Oe^us^PoPY$Va~yi8|?+&=y$f+lABT<*pZr zP}D{~Pq1Qyni+@|aP;ixO~mbEW9#c0OU#YbDZIaw=_&$K%Ep2f%hO^&P67hApZe`x zv8b`Mz@?M_7-)b!lkQKk)JXXUuT|B8kJlvqRmRpxtQDgvrHMXC1B$M@Y%Me!BSx3P z#2Eawl$HleZhhTS6Txm>lN_+I`>eV$&v9fOg)%zVn3O5mI*lAl>QcHuW6!Kixmq`X zBCZ*Ck6OYtDiK!N47>jxI&O2a9x7M|i^IagRr-fmrmikEQGgw%J7bO|)*$2FW95O4 zeBs>KR)izRG1gRVL;F*sr8A}aRHO0gc$$j&ds8CIO1=Gwq1%_~E)CWNn9pCtBE}+`Jelk4{>S)M)`Ll=!~gnn1yq^EX(+y*ik@3Ou0qU`IgYi3*doM+5&dU!cho$pZ zn%lhKeZkS72P?Cf68<#kll_6OAO26bIbueZx**j6o;I0cS^XiL`y+>{cD}gd%lux} z)3N>MaE24WBZ}s0ApfdM;5J_Ny}rfUyxfkC``Awo2#sgLnGPewK};dORuT?@I6(5~ z?kE)Qh$L&fwJXzK){iYx!l5$Tt|^D~MkGZPA}(o6f7w~O2G6Vvzdo*a;iXzk$B66$ zwF#;wM7A+(;uFG4+UAY(2`*3XXx|V$K8AYu#ECJYSl@S=uZW$ksfC$~qrrbQj4??z-)uz0QL}>k^?fPnJTPw% zGz)~?B4}u0CzOf@l^um}HZzbaIwPmb<)< zi_3@E9lc)Qe2_`*Z^HH;1CXOceL=CHpHS{HySy3T%<^NrWQ}G0i4e1xm_K3(+~oi$ zoHl9wzb?Z4j#90DtURtjtgvi7uw8DzHYmtPb;?%8vb9n@bszT=1qr)V_>R%s!92_` zfnHQPANx z<#hIjIMm#*(v*!OXtF+w8kLu`o?VZ5k7{`vw{Yc^qYclpUGIM_PBN1+c{#Vxv&E*@ zxg=W2W~JuV{IuRYw3>LSI1)a!thID@R=bU+cU@DbR^_SXY`MC7HOsCN z!dO4OKV7(E_Z8T#8MA1H`99?Z!r0)qKW_#|29X3#Jb+5+>qUidbeP1NJ@)(qi2S-X zao|f0_tl(O+$R|Qwd$H{_ig|~I1fbp_$NkI!0E;Y z6JrnU{1Ra6^on{9gUUB0mwzP3S%B#h0fjo>JvV~#+X0P~JV=IG=yHG$O+p5O3NUgG zEQ}z6BTp^Fie)Sg<){Z&I8NwPR(=mO4joTLHkJ>|Tnk23E(Bo`FSbPc05lF2-+)X? z6vV3*m~IBHTy*^E!<0nA(tCOJW2G4DsH7)BxLV8kICn5lu6@U*R`w)o9;Ro$i8=Q^V%uH8n3q=+Yf;SFRZu z!+F&PKcH#8cG?aSK_Tl@K9P#8o+jry@gdexz&d(Q=47<7nw@e@FFfIRNL9^)1i@;A z28+$Z#rjv-wj#heI|<&J_DiJ*s}xd-f!{J8jfqOHE`TiHHZVIA8CjkNQ_u;Ery^^t zl1I75&u^`1_q)crO+JT4rx|z2ToSC>)Or@-D zy3S>jW*sNIZR-EBsfyaJ+Jq4BQE4?SePtD2+jY8*%FsSLZ9MY>+wk?}}}AFAw)vr{ml)8LUG-y9>^t!{~|sgpxYc0Gnkg`&~R z-pilJZjr@y5$>B=VMdZ73svct%##v%wdX~9fz6i3Q-zOKJ9wso+h?VME7}SjL=!NUG{J?M&i!>ma`eoEa@IX`5G>B1(7;%}M*%-# zfhJ(W{y;>MRz!Ic8=S}VaBKqh;~7KdnGEHxcL$kA-6E~=!hrN*zw9N+_=odt<$_H_8dbo;0=42wcAETPCVGUr~v(`Uai zb{=D!Qc!dOEU6v)2eHSZq%5iqK?B(JlCq%T6av$Cb4Rko6onlG&?CqaX7Y_C_cOC3 zYZ;_oI(}=>_07}Oep&Ws7x7-R)cc8zfe!SYxJYP``pi$FDS)4Fvw5HH=FiU6xfVqIM!hJ;Rx8c0cB7~aPtNH(Nmm5Vh{ibAoU#J6 zImRCr?(iyu_4W_6AWo3*vxTPUw@vPwy@E0`(>1Qi=%>5eSIrp^`` zK*Y?fK_6F1W>-7UsB)RPC4>>Ps9)f+^MqM}8AUm@tZ->j%&h1M8s*s!LX5&WxQcAh z8mciQej@RPm?660%>{_D+7er>%zX_{s|$Z+;G7_sfNfBgY(zLB4Ey}J9F>zX#K0f6 z?dVNIeEh?EIShmP6>M+d|0wMM85Sa4diw1hrg|ITJ}JDg@o8y>(rF9mXk5M z2@D|NA)-7>wD&wF;S_$KS=eE84`BGw3g0?6wGxu8ys4rwI?9U=*^VF22t3%mbGeOh z`!O-OpF7#Vceu~F`${bW0nYVU9ecmk31V{tF%iv&5hWofC>I~cqAt@u6|R+|HLMMX zVxuSlMFOK_EQ86#E8&KwxIr8S9tj_goWtLv4f@!&h8;Ov41{J~496vp9vX=(LK#j! zAwi*21RAV-LD>9Cw3bV_9X(X3)Kr0-UaB*7Y>t82EQ%!)(&(XuAYtTsYy-dz+w=$ir)VJpe!_$ z6SGpX^i(af3{o=VlFPC);|J8#(=_8#vdxDe|Cok+ANhYwbE*FO`Su2m1~w+&9<_9~ z-|tTU_ACGN`~CNW5WYYBn^B#SwZ(t4%3aPp z;o)|L6Rk569KGxFLUPx@!6OOa+5OjQLK5w&nAmwxkC5rZ|m&HT8G%GVZxB_@ME z>>{rnXUqyiJrT(8GMj_ap#yN_!9-lO5e8mR3cJiK3NE{_UM&=*vIU`YkiL$1%kf+1 z4=jk@7EEj`u(jy$HnzE33ZVW_J4bj}K;vT?T91YlO(|Y0FU4r+VdbmQ97%(J5 zkK*Bed8+C}FcZ@HIgdCMioV%A<*4pw_n}l*{Cr4}a(lq|injK#O?$tyvyE`S%(1`H z_wwRvk#13ElkZvij2MFGOj`fhy?nC^8`Zyo%yVcUAfEr8x&J#A{|moUBAV_^f$hpaUuyQeY3da^ zS9iRgf87YBwfe}>BO+T&Fl%rfpZh#+AM?Dq-k$Bq`vG6G_b4z%Kbd&v>qFjow*mBl z-OylnqOpLg}or7_VNwRg2za3VBK6FUfFX{|TD z`Wt0Vm2H$vdlRWYQJqDmM?JUbVqL*ZQY|5&sY*?!&%P8qhA~5+Af<{MaGo(dl&C5t zE%t!J0 zh6jqANt4ABdPxSTrVV}fLsRQal*)l&_*rFq(Ez}ClEH6LHv{J#v?+H-BZ2)Wy{K@9 z+ovXHq~DiDvm>O~r$LJo!cOuwL+Oa--6;UFE2q@g3N8Qkw5E>ytz^(&($!O47+i~$ zKM+tkAd-RbmP{s_rh+ugTD;lriL~`Xwkad#;_aM?nQ7L_muEFI}U_4$phjvYgleK~`Fo`;GiC07&Hq1F<%p;9Q;tv5b?*QnR%8DYJH3P>Svmv47Y>*LPZJy8_{9H`g6kQpyZU{oJ`m%&p~D=K#KpfoJ@ zn-3cqmHsdtN!f?~w+(t+I`*7GQA#EQC^lUA9(i6=i1PqSAc|ha91I%X&nXzjYaM{8$s&wEx@aVkQ6M{E2 zfzId#&r(XwUNtPcq4Ngze^+XaJA1EK-%&C9j>^9(secqe{}z>hR5CFNveMsVA)m#S zk)_%SidkY-XmMWlVnQ(mNJ>)ooszQ#vaK;!rPmGKXV7am^_F!Lz>;~{VrIO$;!#30XRhE1QqO_~#+Ux;B_D{Nk=grn z8Y0oR^4RqtcYM)7a%@B(XdbZCOqnX#fD{BQTeLvRHd(irHKq=4*jq34`6@VAQR8WG z^%)@5CXnD_T#f%@-l${>y$tfb>2LPmc{~5A82|16mH)R?&r#KKLs7xpN-D`=&Cm^R zvMA6#Ahr<3X>Q7|-qfTY)}32HkAz$_mibYV!I)u>bmjK`qwBe(>za^0Kt*HnFbSdO z1>+ryKCNxmm^)*$XfiDOF2|{-v3KKB?&!(S_Y=Ht@|ir^hLd978xuI&N{k>?(*f8H z=ClxVJK_%_z1TH0eUwm2J+2To7FK4o+n_na)&#VLn1m;!+CX+~WC+qg1?PA~KdOlC zW)C@pw75_xoe=w7i|r9KGIvQ$+3K?L{7TGHwrQM{dCp=Z*D}3kX7E-@sZnup!BImw z*T#a=+WcTwL78exTgBn|iNE3#EsOorO z*kt)gDzHiPt07fmisA2LWN?AymkdqTgr?=loT7z@d`wnlr6oN}@o|&JX!yPzC*Y8d zu6kWlTzE1)ckyBn+0Y^HMN+GA$wUO_LN6W>mxCo!0?oiQvT`z$jbSEu&{UHRU0E8# z%B^wOc@S!yhMT49Y)ww(Xta^8pmPCe@eI5C*ed96)AX9<>))nKx0(sci8gwob_1}4 z0DIL&vsJ1_s%<@y%U*-eX z5rN&(zef-5G~?@r79oZGW1d!WaTqQn0F6RIOa9tJ=0(kdd{d1{<*tHT#cCvl*i>YY zH+L7jq8xZNcTUBqj(S)ztTU!TM!RQ}In*n&Gn<>(60G7}4%WQL!o>hbJqNDSGwl#H z`4k+twp0cj%PsS+NKaxslAEu9!#U3xT1|_KB6`h=PI0SW`P9GTa7caD1}vKEglV8# zjKZR`pluCW19c2fM&ZG)c3T3Um;ir3y(tSCJ7Agl6|b524dy5El{^EQBG?E61H0XY z`bqg!;zhGhyMFl&(o=JWEJ8n~z)xI}A@C0d2hQGvw7nGv)?POU@(kS1m=%`|+^ika zXl8zjS?xqW$WlO?Ewa;vF~XbybHBor$f<%I&*t$F5fynwZlTGj|IjZtVfGa7l&tK} zW>I<69w(cZLu)QIVG|M2xzW@S+70NinQzk&Y0+3WT*cC)rx~04O-^<{JohU_&HL5XdUKW!uFy|i$FB|EMu0eUyW;gsf`XfIc!Z0V zeK&*hPL}f_cX=@iv>K%S5kL;cl_$v?n(Q9f_cChk8Lq$glT|=e+T*8O4H2n<=NGmn z+2*h+v;kBvF>}&0RDS>)B{1!_*XuE8A$Y=G8w^qGMtfudDBsD5>T5SB;Qo}fSkkiV ze^K^M(UthkwrD!&*tTsu>Dacdj_q`~V%r_twr$(Ct&_dKeeXE?fA&4&yASJWJ*}~- zel=@W)tusynfC_YqH4ll>4Eg`Xjs5F7Tj>tTLz<0N3)X<1px_d2yUY>X~y>>93*$) z5PuNMQLf9Bu?AAGO~a_|J2akO1M*@VYN^VxvP0F$2>;Zb9;d5Yfd8P%oFCCoZE$ z4#N$^J8rxYjUE_6{T%Y>MmWfHgScpuGv59#4u6fpTF%~KB^Ae`t1TD_^Ud#DhL+Dm zbY^VAM#MrAmFj{3-BpVSWph2b_Y6gCnCAombVa|1S@DU)2r9W<> zT5L8BB^er3zxKt1v(y&OYk!^aoQisqU zH(g@_o)D~BufUXcPt!Ydom)e|aW{XiMnes2z&rE?og>7|G+tp7&^;q?Qz5S5^yd$i z8lWr4g5nctBHtigX%0%XzIAB8U|T6&JsC4&^hZBw^*aIcuNO47de?|pGXJ4t}BB`L^d8tD`H`i zqrP8?#J@8T#;{^B!KO6J=@OWKhAerih(phML`(Rg7N1XWf1TN>=Z3Do{l_!d~DND&)O)D>ta20}@Lt77qSnVsA7>)uZAaT9bsB>u&aUQl+7GiY2|dAEg@%Al3i316y;&IhQL^8fw_nwS>f60M_-m+!5)S_6EPM7Y)(Nq^8gL7(3 zOiot`6Wy6%vw~a_H?1hLVzIT^i1;HedHgW9-P#)}Y6vF%C=P70X0Tk^z9Te@kPILI z_(gk!k+0%CG)%!WnBjjw*kAKs_lf#=5HXC00s-}oM-Q1aXYLj)(1d!_a7 z*Gg4Fe6F$*ujVjI|79Z5+Pr`us%zW@ln++2l+0hsngv<{mJ%?OfSo_3HJXOCys{Ug z00*YR-(fv<=&%Q!j%b-_ppA$JsTm^_L4x`$k{VpfLI(FMCap%LFAyq;#ns5bR7V+x zO!o;c5y~DyBPqdVQX)8G^G&jWkBy2|oWTw>)?5u}SAsI$RjT#)lTV&Rf8;>u*qXnb z8F%Xb=7#$m)83z%`E;49)t3fHInhtc#kx4wSLLms!*~Z$V?bTyUGiS&m>1P(952(H zuHdv=;o*{;5#X-uAyon`hP}d#U{uDlV?W?_5UjJvf%11hKwe&(&9_~{W)*y1nR5f_ z!N(R74nNK`y8>B!0Bt_Vr!;nc3W>~RiKtGSBkNlsR#-t^&;$W#)f9tTlZz>n*+Fjz z3zXZ;jf(sTM(oDzJt4FJS*8c&;PLTW(IQDFs_5QPy+7yhi1syPCarvqrHFcf&yTy)^O<1EBx;Ir`5W{TIM>{8w&PB>ro4;YD<5LF^TjTb0!zAP|QijA+1Vg>{Afv^% zmrkc4o6rvBI;Q8rj4*=AZacy*n8B{&G3VJc)so4$XUoie0)vr;qzPZVbb<#Fc=j+8CGBWe$n|3K& z_@%?{l|TzKSlUEO{U{{%Fz_pVDxs7i9H#bnbCw7@4DR=}r_qV!Zo~CvD4ZI*+j3kO zW6_=|S`)(*gM0Z;;}nj`73OigF4p6_NPZQ-Od~e$c_);;4-7sR>+2u$6m$Gf%T{aq zle>e3(*Rt(TPD}03n5)!Ca8Pu!V}m6v0o1;5<1h$*|7z|^(3$Y&;KHKTT}hV056wuF0Xo@mK-52~r=6^SI1NC%c~CC?n>yX6wPTgiWYVz!Sx^atLby9YNn1Rk{g?|pJaxD4|9cUf|V1_I*w zzxK)hRh9%zOl=*$?XUjly5z8?jPMy%vEN)f%T*|WO|bp5NWv@B(K3D6LMl!-6dQg0 zXNE&O>Oyf%K@`ngCvbGPR>HRg5!1IV$_}m@3dWB7x3t&KFyOJn9pxRXCAzFr&%37wXG;z^xaO$ekR=LJG ztIHpY8F5xBP{mtQidqNRoz= z@){+N3(VO5bD+VrmS^YjG@+JO{EOIW)9=F4v_$Ed8rZtHvjpiEp{r^c4F6Ic#ChlC zJX^DtSK+v(YdCW)^EFcs=XP7S>Y!4=xgmv>{S$~@h=xW-G4FF9?I@zYN$e5oF9g$# zb!eVU#J+NjLyX;yb)%SY)xJdvGhsnE*JEkuOVo^k5PyS=o#vq!KD46UTW_%R=Y&0G zFj6bV{`Y6)YoKgqnir2&+sl+i6foAn-**Zd1{_;Zb7Ki=u394C5J{l^H@XN`_6XTKY%X1AgQM6KycJ+= zYO=&t#5oSKB^pYhNdzPgH~aEGW2=ec1O#s-KG z71}LOg@4UEFtp3GY1PBemXpNs6UK-ax*)#$J^pC_me;Z$Je(OqLoh|ZrW*mAMBFn< zHttjwC&fkVfMnQeen8`Rvy^$pNRFVaiEN4Pih*Y3@jo!T0nsClN)pdrr9AYLcZxZ| zJ5Wlj+4q~($hbtuY zVQ7hl>4-+@6g1i`1a)rvtp-;b0>^`Dloy(#{z~ytgv=j4q^Kl}wD>K_Y!l~ zp(_&7sh`vfO(1*MO!B%<6E_bx1)&s+Ae`O)a|X=J9y~XDa@UB`m)`tSG4AUhoM=5& znWoHlA-(z@3n0=l{E)R-p8sB9XkV zZ#D8wietfHL?J5X0%&fGg@MH~(rNS2`GHS4xTo7L$>TPme+Is~!|79=^}QbPF>m%J zFMkGzSndiPO|E~hrhCeo@&Ea{M(ieIgRWMf)E}qeTxT8Q#g-!Lu*x$v8W^M^>?-g= zwMJ$dThI|~M06rG$Sv@C@tWR>_YgaG&!BAbkGggVQa#KdtDB)lMLNVLN|51C@F^y8 zCRvMB^{GO@j=cHfmy}_pCGbP%xb{pNN>? z?7tBz$1^zVaP|uaatYaIN+#xEN4jBzwZ|YI_)p(4CUAz1ZEbDk>J~Y|63SZaak~#0 zoYKruYsWHoOlC1(MhTnsdUOwQfz5p6-D0}4;DO$B;7#M{3lSE^jnTT;ns`>!G%i*F?@pR1JO{QTuD0U+~SlZxcc8~>IB{)@8p`P&+nDxNj`*gh|u?yrv$phpQcW)Us)bi`kT%qLj(fi{dWRZ%Es2!=3mI~UxiW0$-v3vUl?#g{p6eF zMEUAqo5-L0Ar(s{VlR9g=j7+lt!gP!UN2ICMokAZ5(Agd>})#gkA2w|5+<%-CuEP# zqgcM}u@3(QIC^Gx<2dbLj?cFSws_f3e%f4jeR?4M^M3cx1f+Qr6ydQ>n)kz1s##2w zk}UyQc+Z5G-d-1}{WzjkLXgS-2P7auWSJ%pSnD|Uivj5u!xk0 z_^-N9r9o;(rFDt~q1PvE#iJZ_f>J3gcP$)SOqhE~pD2|$=GvpL^d!r z6u=sp-CrMoF7;)}Zd7XO4XihC4ji?>V&(t^?@3Q&t9Mx=qex6C9d%{FE6dvU6%d94 zIE;hJ1J)cCqjv?F``7I*6bc#X)JW2b4f$L^>j{*$R`%5VHFi*+Q$2;nyieduE}qdS{L8y8F08yLs?w}{>8>$3236T-VMh@B zq-nujsb_1aUv_7g#)*rf9h%sFj*^mIcImRV*k~Vmw;%;YH(&ylYpy!&UjUVqqtfG` zox3esju?`unJJA_zKXRJP)rA3nXc$m^{S&-p|v|-0x9LHJm;XIww7C#R$?00l&Yyj z=e}gKUOpsImwW?N)+E(awoF@HyP^EhL+GlNB#k?R<2>95hz!h9sF@U20DHSB3~WMa zk90+858r@-+vWwkawJ)8ougd(i#1m3GLN{iSTylYz$brAsP%=&m$mQQrH$g%3-^VR zE%B`Vi&m8f3T~&myTEK28BDWCVzfWir1I?03;pX))|kY5ClO^+bae z*7E?g=3g7EiisYOrE+lA)2?Ln6q2*HLNpZEWMB|O-JI_oaHZB%CvYB(%=tU= zE*OY%QY58fW#RG5=gm0NR#iMB=EuNF@)%oZJ}nmm=tsJ?eGjia{e{yuU0l3{d^D@)kVDt=1PE)&tf_hHC%0MB znL|CRCPC}SeuVTdf>-QV70`0(EHizc21s^sU>y%hW0t!0&y<7}Wi-wGy>m%(-jsDj zP?mF|>p_K>liZ6ZP(w5(|9Ga%>tLgb$|doDDfkdW>Z z`)>V2XC?NJT26mL^@ zf+IKr27TfM!UbZ@?zRddC7#6ss1sw%CXJ4FWC+t3lHZupzM77m^=9 z&(a?-LxIq}*nvv)y?27lZ{j zifdl9hyJudyP2LpU$-kXctshbJDKS{WfulP5Dk~xU4Le4c#h^(YjJit4#R8_khheS z|8(>2ibaHES4+J|DBM7I#QF5u-*EdN{n=Kt@4Zt?@Tv{JZA{`4 zU#kYOv{#A&gGPwT+$Ud}AXlK3K7hYzo$(fBSFjrP{QQ zeaKg--L&jh$9N}`pu{Bs>?eDFPaWY4|9|foN%}i;3%;@4{dc+iw>m}{3rELqH21G! z`8@;w-zsJ1H(N3%|1B@#ioLOjib)j`EiJqPQVSbPSPVHCj6t5J&(NcWzBrzCiDt{4 zdlPAUKldz%6x5II1H_+jv)(xVL+a;P+-1hv_pM>gMRr%04@k;DTokASSKKhU1Qms| zrWh3a!b(J3n0>-tipg{a?UaKsP7?+|@A+1WPDiQIW1Sf@qDU~M_P65_s}7(gjTn0X zucyEm)o;f8UyshMy&>^SC3I|C6jR*R_GFwGranWZe*I>K+0k}pBuET&M~ z;Odo*ZcT?ZpduHyrf8E%IBFtv;JQ!N_m>!sV6ly$_1D{(&nO~w)G~Y`7sD3#hQk%^ zp}ucDF_$!6DAz*PM8yE(&~;%|=+h(Rn-=1Wykas_-@d&z#=S}rDf`4w(rVlcF&lF! z=1)M3YVz7orwk^BXhslJ8jR);sh^knJW(Qmm(QdSgIAIdlN4Te5KJisifjr?eB{FjAX1a0AB>d?qY4Wx>BZ8&}5K0fA+d{l8 z?^s&l8#j7pR&ijD?0b%;lL9l$P_mi2^*_OL+b}4kuLR$GAf85sOo02?Y#90}CCDiS zZ%rbCw>=H~CBO=C_JVV=xgDe%b4FaEFtuS7Q1##y686r%F6I)s-~2(}PWK|Z8M+Gu zl$y~5@#0Ka%$M<&Cv%L`a8X^@tY&T7<0|(6dNT=EsRe0%kp1Qyq!^43VAKYnr*A5~ zsI%lK1ewqO;0TpLrT9v}!@vJK{QoVa_+N4FYT#h?Y8rS1S&-G+m$FNMP?(8N`MZP zels(*?kK{{^g9DOzkuZXJ2;SrOQsp9T$hwRB1(phw1c7`!Q!by?Q#YsSM#I12RhU{$Q+{xj83axHcftEc$mNJ8_T7A-BQc*k(sZ+~NsO~xAA zxnbb%dam_fZlHvW7fKXrB~F&jS<4FD2FqY?VG?ix*r~MDXCE^WQ|W|WM;gsIA4lQP zJ2hAK@CF*3*VqPr2eeg6GzWFlICi8S>nO>5HvWzyZTE)hlkdC_>pBej*>o0EOHR|) z$?};&I4+_?wvL*g#PJ9)!bc#9BJu1(*RdNEn>#Oxta(VWeM40ola<0aOe2kSS~{^P zDJBd}0L-P#O-CzX*%+$#v;(x%<*SPgAje=F{Zh-@ucd2DA(yC|N_|ocs*|-!H%wEw z@Q!>siv2W;C^^j^59OAX03&}&D*W4EjCvfi(ygcL#~t8XGa#|NPO+*M@Y-)ctFA@I z-p7npT1#5zOLo>7q?aZpCZ=iecn3QYklP;gF0bq@>oyBq94f6C=;Csw3PkZ|5q=(c zfs`aw?II0e(h=|7o&T+hq&m$; zBrE09Twxd9BJ2P+QPN}*OdZ-JZV7%av@OM7v!!NL8R;%WFq*?{9T3{ct@2EKgc8h) zMxoM$SaF#p<`65BwIDfmXG6+OiK0e)`I=!A3E`+K@61f}0e z!2a*FOaDrOe>U`q%K!QN`&=&0C~)CaL3R4VY(NDt{Xz(Xpqru5=r#uQN1L$Je1*dkdqQ*=lofQaN%lO!<5z9ZlHgxt|`THd>2 zsWfU$9=p;yLyJyM^t zS2w9w?Bpto`@H^xJpZDKR1@~^30Il6oFGfk5%g6w*C+VM)+%R@gfIwNprOV5{F^M2 zO?n3DEzpT+EoSV-%OdvZvNF+pDd-ZVZ&d8 zKeIyrrfPN=EcFRCPEDCVflX#3-)Ik_HCkL(ejmY8vzcf-MTA{oHk!R2*36`O68$7J zf}zJC+bbQk--9Xm!u#lgLvx8TXx2J258E5^*IZ(FXMpq$2LUUvhWQPs((z1+2{Op% z?J}9k5^N=z;7ja~zi8a_-exIqWUBJwohe#4QJ`|FF*$C{lM18z^#hX6!5B8KAkLUX ziP=oti-gpV(BsLD{0(3*dw}4JxK23Y7M{BeFPucw!sHpY&l%Ws4pSm`+~V7;bZ%Dx zeI)MK=4vC&5#;2MT7fS?^ch9?2;%<8Jlu-IB&N~gg8t;6S-#C@!NU{`p7M8@2iGc& zg|JPg%@gCoCQ&s6JvDU&`X2S<57f(k8nJ1wvBu{8r?;q3_kpZZ${?|( z+^)UvR33sjSd)aT!UPkA;ylO6{aE3MQa{g%Mcf$1KONcjO@&g5zPHWtzM1rYC{_K> zgQNcs<{&X{OA=cEWw5JGqpr0O>x*Tfak2PE9?FuWtz^DDNI}rwAaT0(bdo-<+SJ6A z&}S%boGMWIS0L}=S>|-#kRX;e^sUsotry(MjE|3_9duvfc|nwF#NHuM-w7ZU!5ei8 z6Mkf>2)WunY2eU@C-Uj-A zG(z0Tz2YoBk>zCz_9-)4a>T46$(~kF+Y{#sA9MWH%5z#zNoz)sdXq7ZR_+`RZ%0(q zC7&GyS_|BGHNFl8Xa%@>iWh%Gr?=J5<(!OEjauj5jyrA-QXBjn0OAhJJ9+v=!LK`` z@g(`^*84Q4jcDL`OA&ZV60djgwG`|bcD*i50O}Q{9_noRg|~?dj%VtKOnyRs$Uzqg z191aWoR^rDX#@iSq0n z?9Sg$WSRPqSeI<}&n1T3!6%Wj@5iw5`*`Btni~G=&;J+4`7g#OQTa>u`{4ZZ(c@s$ zK0y;ySOGD-UTjREKbru{QaS>HjN<2)R%Nn-TZiQ(Twe4p@-saNa3~p{?^V9Nixz@a zykPv~<@lu6-Ng9i$Lrk(xi2Tri3q=RW`BJYOPC;S0Yly%77c727Yj-d1vF!Fuk{Xh z)lMbA69y7*5ufET>P*gXQrxsW+ zz)*MbHZv*eJPEXYE<6g6_M7N%#%mR{#awV3i^PafNv(zyI)&bH?F}2s8_rR(6%!V4SOWlup`TKAb@ee>!9JKPM=&8g#BeYRH9FpFybxBXQI2|g}FGJfJ+ zY-*2hB?o{TVL;Wt_ek;AP5PBqfDR4@Z->_182W z{P@Mc27j6jE*9xG{R$>6_;i=y{qf(c`5w9fa*`rEzX6t!KJ(p1H|>J1pC-2zqWENF zmm=Z5B4u{cY2XYl(PfrInB*~WGWik3@1oRhiMOS|D;acnf-Bs(QCm#wR;@Vf!hOPJ zgjhDCfDj$HcyVLJ=AaTbQ{@vIv14LWWF$=i-BDoC11}V;2V8A`S>_x)vIq44-VB-v z*w-d}$G+Ql?En8j!~ZkCpQ$|cA0|+rrY>tiCeWxkRGPoarxlGU2?7%k#F693RHT24 z-?JsiXlT2PTqZqNb&sSc>$d;O4V@|b6VKSWQb~bUaWn1Cf0+K%`Q&Wc<>mQ>*iEGB zbZ;aYOotBZ{vH3y<0A*L0QVM|#rf*LIsGx(O*-7)r@yyBIzJnBFSKBUSl1e|8lxU* zzFL+YDVVkIuzFWeJ8AbgN&w(4-7zbiaMn{5!JQXu)SELk*CNL+Fro|2v|YO)1l15t zs(0^&EB6DPMyaqvY>=KL>)tEpsn;N5Q#yJj<9}ImL((SqErWN3Q=;tBO~ExTCs9hB z2E$7eN#5wX4<3m^5pdjm#5o>s#eS_Q^P)tm$@SawTqF*1dj_i#)3};JslbLKHXl_N z)Fxzf>FN)EK&Rz&*|6&%Hs-^f{V|+_vL1S;-1K-l$5xiC@}%uDuwHYhmsV?YcOUlk zOYkG5v2+`+UWqpn0aaaqrD3lYdh0*!L`3FAsNKu=Q!vJu?Yc8n|CoYyDo_`r0mPoo z8>XCo$W4>l(==h?2~PoRR*kEe)&IH{1sM41mO#-36`02m#nTX{r*r`Q5rZ2-sE|nA zhnn5T#s#v`52T5|?GNS`%HgS2;R(*|^egNPDzzH_z^W)-Q98~$#YAe)cEZ%vge965AS_am#DK#pjPRr-!^za8>`kksCAUj(Xr*1NW5~e zpypt_eJpD&4_bl_y?G%>^L}=>xAaV>KR6;^aBytqpiHe%!j;&MzI_>Sx7O%F%D*8s zSN}cS^<{iiK)=Ji`FpO#^zY!_|D)qeRNAtgmH)m;qC|mq^j(|hL`7uBz+ULUj37gj zksdbnU+LSVo35riSX_4z{UX=%n&}7s0{WuZYoSfwAP`8aKN9P@%e=~1`~1ASL-z%# zw>DO&ixr}c9%4InGc*_y42bdEk)ZdG7-mTu0bD@_vGAr*NcFoMW;@r?@LUhRI zCUJgHb`O?M3!w)|CPu~ej%fddw20lod?Ufp8Dmt0PbnA0J%KE^2~AIcnKP()025V> zG>noSM3$5Btmc$GZoyP^v1@Poz0FD(6YSTH@aD0}BXva?LphAiSz9f&Y(aDAzBnUh z?d2m``~{z;{}kZJ>a^wYI?ry(V9hIoh;|EFc0*-#*`$T0DRQ1;WsqInG;YPS+I4{g zJGpKk%%Sdc5xBa$Q^_I~(F97eqDO7AN3EN0u)PNBAb+n+ zWBTxQx^;O9o0`=g+Zrt_{lP!sgWZHW?8bLYS$;1a@&7w9rD9|Ge;Gb?sEjFoF9-6v z#!2)t{DMHZ2@0W*fCx;62d#;jouz`R5Y(t{BT=$N4yr^^o$ON8d{PQ=!O zX17^CrdM~7D-;ZrC!||<+FEOxI_WI3CA<35va%4v>gc zEX-@h8esj=a4szW7x{0g$hwoWRQG$yK{@3mqd-jYiVofJE!Wok1* znV7Gm&Ssq#hFuvj1sRyHg(6PFA5U*Q8Rx>-blOs=lb`qa{zFy&n4xY;sd$fE+<3EI z##W$P9M{B3c3Si9gw^jlPU-JqD~Cye;wr=XkV7BSv#6}DrsXWFJ3eUNrc%7{=^sP> zrp)BWKA9<}^R9g!0q7yWlh;gr_TEOD|#BmGq<@IV;ueg+D2}cjpp+dPf&Q(36sFU&K8}hA85U61faW&{ zlB`9HUl-WWCG|<1XANN3JVAkRYvr5U4q6;!G*MTdSUt*Mi=z_y3B1A9j-@aK{lNvx zK%p23>M&=KTCgR!Ee8c?DAO2_R?B zkaqr6^BSP!8dHXxj%N1l+V$_%vzHjqvu7p@%Nl6;>y*S}M!B=pz=aqUV#`;h%M0rU zHfcog>kv3UZAEB*g7Er@t6CF8kHDmKTjO@rejA^ULqn!`LwrEwOVmHx^;g|5PHm#B zZ+jjWgjJ!043F+&#_;D*mz%Q60=L9Ove|$gU&~As5^uz@2-BfQ!bW)Khn}G+Wyjw- z19qI#oB(RSNydn0t~;tAmK!P-d{b-@@E5|cdgOS#!>%#Rj6ynkMvaW@37E>@hJP^8 z2zk8VXx|>#R^JCcWdBCy{0nPmYFOxN55#^-rlqobe0#L6)bi?E?SPymF*a5oDDeSd zO0gx?#KMoOd&G(2O@*W)HgX6y_aa6iMCl^~`{@UR`nMQE`>n_{_aY5nA}vqU8mt8H z`oa=g0SyiLd~BxAj2~l$zRSDHxvDs;I4>+M$W`HbJ|g&P+$!U7-PHX4RAcR0szJ*( ze-417=bO2q{492SWrqDK+L3#ChUHtz*@MP)e^%@>_&#Yk^1|tv@j4%3T)diEX zATx4K*hcO`sY$jk#jN5WD<=C3nvuVsRh||qDHnc~;Kf59zr0;c7VkVSUPD%NnnJC_ zl3F^#f_rDu8l}l8qcAz0FFa)EAt32IUy_JLIhU_J^l~FRH&6-ivSpG2PRqzDdMWft>Zc(c)#tb%wgmWN%>IOPm zZi-noqS!^Ftb81pRcQi`X#UhWK70hy4tGW1mz|+vI8c*h@ zfFGJtW3r>qV>1Z0r|L>7I3un^gcep$AAWfZHRvB|E*kktY$qQP_$YG60C@X~tTQjB3%@`uz!qxtxF+LE!+=nrS^07hn` zEgAp!h|r03h7B!$#OZW#ACD+M;-5J!W+{h|6I;5cNnE(Y863%1(oH}_FTW})8zYb$7czP zg~Szk1+_NTm6SJ0MS_|oSz%e(S~P-&SFp;!k?uFayytV$8HPwuyELSXOs^27XvK-D zOx-Dl!P|28DK6iX>p#Yb%3`A&CG0X2S43FjN%IB}q(!hC$fG}yl1y9W&W&I@KTg6@ zK^kpH8=yFuP+vI^+59|3%Zqnb5lTDAykf z9S#X`3N(X^SpdMyWQGOQRjhiwlj!0W-yD<3aEj^&X%=?`6lCy~?`&WSWt z?U~EKFcCG_RJ(Qp7j=$I%H8t)Z@6VjA#>1f@EYiS8MRHZphp zMA_5`znM=pzUpBPO)pXGYpQ6gkine{6u_o!P@Q+NKJ}k!_X7u|qfpAyIJb$_#3@wJ z<1SE2Edkfk9C!0t%}8Yio09^F`YGzpaJHGk*-ffsn85@)%4@`;Fv^8q(-Wk7r=Q8p zT&hD`5(f?M{gfzGbbwh8(}G#|#fDuk7v1W)5H9wkorE0ZZjL0Q1=NRGY>zwgfm81DdoaVwNH;or{{eSyybt)m<=zXoA^RALYG-2t zouH|L*BLvmm9cdMmn+KGopyR@4*=&0&4g|FLoreZOhRmh=)R0bg~ zT2(8V_q7~42-zvb)+y959OAv!V$u(O3)%Es0M@CRFmG{5sovIq4%8Ahjk#*5w{+)+ zMWQoJI_r$HxL5km1#6(e@{lK3Udc~n0@g`g$s?VrnQJ$!oPnb?IHh-1qA`Rz$)Ai< z6w$-MJW-gKNvOhL+XMbE7&mFt`x1KY>k4(!KbbpZ`>`K@1J<(#vVbjx@Z@(6Q}MF# zMnbr-f55(cTa^q4+#)=s+ThMaV~E`B8V=|W_fZWDwiso8tNMTNse)RNBGi=gVwgg% zbOg8>mbRN%7^Um-7oj4=6`$|(K7!+t^90a{$18Z>}<#!bm%ZEFQ{X(yBZMc>lCz0f1I2w9Sq zuGh<9<=AO&g6BZte6hn>Qmvv;Rt)*cJfTr2=~EnGD8P$v3R|&1RCl&7)b+`=QGapi zPbLg_pxm`+HZurtFZ;wZ=`Vk*do~$wB zxoW&=j0OTbQ=Q%S8XJ%~qoa3Ea|au5o}_(P;=!y-AjFrERh%8la!z6Fn@lR?^E~H12D?8#ht=1F;7@o4$Q8GDj;sSC%Jfn01xgL&%F2 zwG1|5ikb^qHv&9hT8w83+yv&BQXOQyMVJSBL(Ky~p)gU3#%|blG?IR9rP^zUbs7rOA0X52Ao=GRt@C&zlyjNLv-} z9?*x{y(`509qhCV*B47f2hLrGl^<@SuRGR!KwHei?!CM10Tq*YDIoBNyRuO*>3FU? zHjipIE#B~y3FSfOsMfj~F9PNr*H?0oHyYB^G(YyNh{SxcE(Y-`x5jFMKb~HO*m+R% zrq|ic4fzJ#USpTm;X7K+E%xsT_3VHKe?*uc4-FsILUH;kL>_okY(w`VU*8+l>o>Jm ziU#?2^`>arnsl#)*R&nf_%>A+qwl%o{l(u)M?DK1^mf260_oteV3#E_>6Y4!_hhVD zM8AI6MM2V*^_M^sQ0dmHu11fy^kOqXqzpr?K$`}BKWG`=Es(9&S@K@)ZjA{lj3ea7_MBP zk(|hBFRjHVMN!sNUkrB;(cTP)T97M$0Dtc&UXSec<+q?y>5=)}S~{Z@ua;1xt@=T5 zI7{`Z=z_X*no8s>mY;>BvEXK%b`a6(DTS6t&b!vf_z#HM{Uoy_5fiB(zpkF{})ruka$iX*~pq1ZxD?q68dIo zIZSVls9kFGsTwvr4{T_LidcWtt$u{kJlW7moRaH6+A5hW&;;2O#$oKyEN8kx`LmG)Wfq4ykh+q{I3|RfVpkR&QH_x;t41Uw z`P+tft^E2B$domKT@|nNW`EHwyj>&}K;eDpe z1bNOh=fvIfk`&B61+S8ND<(KC%>y&?>opCnY*r5M+!UrWKxv0_QvTlJc>X#AaI^xo zaRXL}t5Ej_Z$y*|w*$6D+A?Lw-CO-$itm^{2Ct82-<0IW)0KMNvJHgBrdsIR0v~=H z?n6^}l{D``Me90`^o|q!olsF?UX3YSq^6Vu>Ijm>>PaZI8G@<^NGw{Cx&%|PwYrfw zR!gX_%AR=L3BFsf8LxI|K^J}deh0ZdV?$3r--FEX`#INxsOG6_=!v)DI>0q|BxT)z z-G6kzA01M?rba+G_mwNMQD1mbVbNTWmBi*{s_v_Ft9m2Avg!^78(QFu&n6mbRJ2bA zv!b;%yo{g*9l2)>tsZJOOp}U~8VUH`}$ z8p_}t*XIOehezolNa-a2x0BS})Y9}&*TPgua{Ewn-=wVrmJUeU39EKx+%w%=ixQWK zDLpwaNJs65#6o7Ln7~~X+p_o2BR1g~VCfxLzxA{HlWAI6^H;`juI=&r1jQrUv_q0Z z1Ja-tjdktrrP>GOC*#p?*xfQU5MqjMsBe!9lh(u8)w$e@Z|>aUHI5o;MGw*|Myiz3 z-f0;pHg~Q#%*Kx8MxH%AluVXjG2C$)WL-K63@Q`#y9_k_+}eR(x4~dp7oV-ek0H>I zgy8p#i4GN{>#v=pFYUQT(g&b$OeTy-X_#FDgNF8XyfGY6R!>inYn8IR2RDa&O!(6< znXs{W!bkP|s_YI*Yx%4stI`=ZO45IK6rBs`g7sP40ic}GZ58s?Mc$&i`kq_tfci>N zIHrC0H+Qpam1bNa=(`SRKjixBTtm&e`j9porEci!zdlg1RI0Jw#b(_Tb@RQK1Zxr_ z%7SUeH6=TrXt3J@js`4iDD0=IoHhK~I7^W8^Rcp~Yaf>2wVe|Hh1bUpX9ATD#moByY57-f2Ef1TP^lBi&p5_s7WGG9|0T}dlfxOx zXvScJO1Cnq`c`~{Dp;{;l<-KkCDE+pmexJkd}zCgE{eF=)K``-qC~IT6GcRog_)!X z?fK^F8UDz$(zFUrwuR$qro5>qqn>+Z%<5>;_*3pZ8QM|yv9CAtrAx;($>4l^_$_-L z*&?(77!-=zvnCVW&kUcZMb6;2!83si518Y%R*A3JZ8Is|kUCMu`!vxDgaWjs7^0j( ziTaS4HhQ)ldR=r)_7vYFUr%THE}cPF{0H45FJ5MQW^+W>P+eEX2kLp3zzFe*-pFVA zdDZRybv?H|>`9f$AKVjFWJ=wegO7hOOIYCtd?Vj{EYLT*^gl35|HQ`R=ti+ADm{jyQE7K@kdjuqJhWVSks>b^ zxha88-h3s;%3_5b1TqFCPTxVjvuB5U>v=HyZ$?JSk+&I%)M7KE*wOg<)1-Iy)8-K! z^XpIt|0ibmk9RtMmlUd7#Ap3Q!q9N4atQy)TmrhrFhfx1DAN`^vq@Q_SRl|V z#lU<~n67$mT)NvHh`%als+G-)x1`Y%4Bp*6Un5Ri9h=_Db zA-AdP!f>f0m@~>7X#uBM?diI@)Egjuz@jXKvm zJo+==juc9_<;CqeRaU9_Mz@;3e=E4=6TK+c`|uu#pIqhSyNm`G(X)&)B`8q0RBv#> z`gGlw(Q=1Xmf55VHj%C#^1lpc>LY8kfA@|rlC1EA<1#`iuyNO z(=;irt{_&K=i4)^x%;U(Xv<)+o=dczC5H3W~+e|f~{*ucxj@{Yi-cw^MqYr3fN zF5D+~!wd$#al?UfMnz(@K#wn`_5na@rRr8XqN@&M&FGEC@`+OEv}sI1hw>Up0qAWf zL#e4~&oM;TVfjRE+10B_gFlLEP9?Q-dARr3xi6nQqnw>k-S;~b z;!0s2VS4}W8b&pGuK=7im+t(`nz@FnT#VD|!)eQNp-W6)@>aA+j~K*H{$G`y2|QHY z|Hmy+CR@#jWY4~)lr1qBJB_RfHJFfP<}pK5(#ZZGSqcpyS&}01LnTWk5fzmXMGHkJ zTP6L^B+uj;lmB_W<~4=${+v0>z31M!-_O@o-O9GyW)j_mjx}!0@br_LE-7SIuPP84 z;5=O(U*g_um0tyG|61N@d9lEuOeiRd+#NY^{nd5;-CVlw&Ap7J?qwM^?E29wvS}2d zbzar4Fz&RSR(-|s!Z6+za&Z zY#D<5q_JUktIzvL0)yq_kLWG6DO{ri=?c!y!f(Dk%G{8)k`Gym%j#!OgXVDD3;$&v@qy#ISJfp=Vm>pls@9-mapVQChAHHd-x+OGx)(*Yr zC1qDUTZ6mM(b_hi!TuFF2k#8uI2;kD70AQ&di$L*4P*Y-@p`jdm%_c3f)XhYD^6M8&#Y$ZpzQMcR|6nsH>b=*R_Von!$BTRj7yGCXokoAQ z&ANvx0-Epw`QIEPgI(^cS2f(Y85yV@ygI{ewyv5Frng)e}KCZF7JbR(&W618_dcEh(#+^zZFY;o<815<5sOHQdeax9_!PyM&;{P zkBa5xymca0#)c#tke@3KNEM8a_mT&1gm;p&&JlMGH(cL(b)BckgMQ^9&vRwj!~3@l zY?L5}=Jzr080OGKb|y`ee(+`flQg|!lo6>=H)X4`$Gz~hLmu2a%kYW_Uu8x09Pa0J zKZ`E$BKJ=2GPj_3l*TEcZ*uYRr<*J^#5pILTT;k_cgto1ZL-%slyc16J~OH-(RgDA z%;EjEnoUkZ&acS{Q8`{i6T5^nywgqQI5bDIymoa7CSZG|WWVk>GM9)zy*bNih|QIm z%0+(Nnc*a_xo;$=!HQYaapLms>J1ToyjtFByY`C2H1wT#178#4+|{H0BBqtCdd$L% z_3Hc60j@{t9~MjM@LBalR&6@>B;9?r<7J~F+WXyYu*y3?px*=8MAK@EA+jRX8{CG?GI-< z54?Dc9CAh>QTAvyOEm0^+x;r2BWX|{3$Y7)L5l*qVE*y0`7J>l2wCmW zL1?|a`pJ-l{fb_N;R(Z9UMiSj6pQjOvQ^%DvhIJF!+Th7jO2~1f1N+(-TyCFYQZYw z4)>7caf^Ki_KJ^Zx2JUb z&$3zJy!*+rCV4%jqwyuNY3j1ZEiltS0xTzd+=itTb;IPYpaf?8Y+RSdVdpacB(bVQ zC(JupLfFp8y43%PMj2}T|VS@%LVp>hv4Y!RPMF?pp8U_$xCJ)S zQx!69>bphNTIb9yn*_yfj{N%bY)t{L1cs8<8|!f$;UQ*}IN=2<6lA;x^(`8t?;+ST zh)z4qeYYgZkIy{$4x28O-pugO&gauRh3;lti9)9Pvw+^)0!h~%m&8Q!AKX%urEMnl z?yEz?g#ODn$UM`+Q#$Q!6|zsq_`dLO5YK-6bJM6ya>}H+vnW^h?o$z;V&wvuM$dR& zeEq;uUUh$XR`TWeC$$c&Jjau2it3#%J-y}Qm>nW*s?En?R&6w@sDXMEr#8~$=b(gk zwDC3)NtAP;M2BW_lL^5ShpK$D%@|BnD{=!Tq)o(5@z3i7Z){} zGr}Exom_qDO{kAVkZ*MbLNHE666Kina#D{&>Jy%~w7yX$oj;cYCd^p9zy z8*+wgSEcj$4{WxKmCF(5o7U4jqwEvO&dm1H#7z}%VXAbW&W24v-tS6N3}qrm1OnE)fUkoE8yMMn9S$?IswS88tQWm4#Oid#ckgr6 zRtHm!mfNl-`d>O*1~d7%;~n+{Rph6BBy^95zqI{K((E!iFQ+h*C3EsbxNo_aRm5gj zKYug($r*Q#W9`p%Bf{bi6;IY0v`pB^^qu)gbg9QHQ7 zWBj(a1YSu)~2RK8Pi#C>{DMlrqFb9e_RehEHyI{n?e3vL_}L>kYJC z_ly$$)zFi*SFyNrnOt(B*7E$??s67EO%DgoZL2XNk8iVx~X_)o++4oaK1M|ou73vA0K^503j@uuVmLcHH4ya-kOIDfM%5%(E z+Xpt~#7y2!KB&)PoyCA+$~DXqxPxxALy!g-O?<9+9KTk4Pgq4AIdUkl`1<1#j^cJg zgU3`0hkHj_jxV>`Y~%LAZl^3o0}`Sm@iw7kwff{M%VwtN)|~!p{AsfA6vB5UolF~d zHWS%*uBDt<9y!9v2Xe|au&1j&iR1HXCdyCjxSgG*L{wmTD4(NQ=mFjpa~xooc6kju z`~+d{j7$h-;HAB04H!Zscu^hZffL#9!p$)9>sRI|Yovm)g@F>ZnosF2EgkU3ln0bR zTA}|+E(tt)!SG)-bEJi_0m{l+(cAz^pi}`9=~n?y&;2eG;d9{M6nj>BHGn(KA2n|O zt}$=FPq!j`p&kQ8>cirSzkU0c08%8{^Qyqi-w2LoO8)^E7;;I1;HQ6B$u0nNaX2CY zSmfi)F`m94zL8>#zu;8|{aBui@RzRKBlP1&mfFxEC@%cjl?NBs`cr^nm){>;$g?rhKr$AO&6qV_Wbn^}5tfFBry^e1`%du2~o zs$~dN;S_#%iwwA_QvmMjh%Qo?0?rR~6liyN5Xmej8(*V9ym*T`xAhHih-v$7U}8=dfXi2i*aAB!xM(Xekg*ix@r|ymDw*{*s0?dlVys2e)z62u1 z+k3esbJE=-P5S$&KdFp+2H7_2e=}OKDrf( z9-207?6$@f4m4B+9E*e((Y89!q?zH|mz_vM>kp*HGXldO0Hg#!EtFhRuOm$u8e~a9 z5(roy7m$Kh+zjW6@zw{&20u?1f2uP&boD}$#Zy)4o&T;vyBoqFiF2t;*g=|1=)PxB z8eM3Mp=l_obbc?I^xyLz?4Y1YDWPa+nm;O<$Cn;@ane616`J9OO2r=rZr{I_Kizyc zP#^^WCdIEp*()rRT+*YZK>V@^Zs=ht32x>Kwe zab)@ZEffz;VM4{XA6e421^h~`ji5r%)B{wZu#hD}f3$y@L0JV9f3g{-RK!A?vBUA}${YF(vO4)@`6f1 z-A|}e#LN{)(eXloDnX4Vs7eH|<@{r#LodP@Nz--$Dg_Par%DCpu2>2jUnqy~|J?eZ zBG4FVsz_A+ibdwv>mLp>P!(t}E>$JGaK$R~;fb{O3($y1ssQQo|5M;^JqC?7qe|hg zu0ZOqeFcp?qVn&Qu7FQJ4hcFi&|nR!*j)MF#b}QO^lN%5)4p*D^H+B){n8%VPUzi! zDihoGcP71a6!ab`l^hK&*dYrVYzJ0)#}xVrp!e;lI!+x+bfCN0KXwUAPU9@#l7@0& QuEJmfE|#`Dqx|px0L@K;Y5)KL literal 43453 zcma&N1CXTcmMvW9vTb(Rwr$&4wr$(C?dmSu>@vG-+vuvg^_??!{yS%8zW-#zn-LkA z5&1^$^{lnmUON?}LBF8_K|(?T0Ra(xUH{($5eN!MR#ZihR#HxkUPe+_R8Cn`RRs(P z_^*#_XlXmGv7!4;*Y%p4nw?{bNp@UZHv1?Um8r6)Fei3p@ClJn0ECfg1hkeuUU@Or zDaPa;U3fE=3L}DooL;8f;P0ipPt0Z~9P0)lbStMS)ag54=uL9ia-Lm3nh|@(Y?B`; zx_#arJIpXH!U{fbCbI^17}6Ri*H<>OLR%c|^mh8+)*h~K8Z!9)DPf zR2h?lbDZQ`p9P;&DQ4F0sur@TMa!Y}S8irn(%d-gi0*WxxCSk*A?3lGh=gcYN?FGl z7D=Js!i~0=u3rox^eO3i@$0=n{K1lPNU zwmfjRVmLOCRfe=seV&P*1Iq=^i`502keY8Uy-WNPwVNNtJFx?IwAyRPZo2Wo1+S(xF37LJZ~%i)kpFQ3Fw=mXfd@>%+)RpYQLnr}B~~zoof(JVm^^&f zxKV^+3D3$A1G;qh4gPVjhrC8e(VYUHv#dy^)(RoUFM?o%W-EHxufuWf(l*@-l+7vt z=l`qmR56K~F|v<^Pd*p~1_y^P0P^aPC##d8+HqX4IR1gu+7w#~TBFphJxF)T$2WEa zxa?H&6=Qe7d(#tha?_1uQys2KtHQ{)Qco)qwGjrdNL7thd^G5i8Os)CHqc>iOidS} z%nFEDdm=GXBw=yXe1W-ShHHFb?Cc70+$W~z_+}nAoHFYI1MV1wZegw*0y^tC*s%3h zhD3tN8b=Gv&rj}!SUM6|ajSPp*58KR7MPpI{oAJCtY~JECm)*m_x>AZEu>DFgUcby z1Qaw8lU4jZpQ_$;*7RME+gq1KySGG#Wql>aL~k9tLrSO()LWn*q&YxHEuzmwd1?aAtI zBJ>P=&$=l1efe1CDU;`Fd+_;&wI07?V0aAIgc(!{a z0Jg6Y=inXc3^n!U0Atk`iCFIQooHqcWhO(qrieUOW8X(x?(RD}iYDLMjSwffH2~tB z)oDgNBLB^AJBM1M^c5HdRx6fBfka`(LD-qrlh5jqH~);#nw|iyp)()xVYak3;Ybik z0j`(+69aK*B>)e_p%=wu8XC&9e{AO4c~O1U`5X9}?0mrd*m$_EUek{R?DNSh(=br# z#Q61gBzEpmy`$pA*6!87 zSDD+=@fTY7<4A?GLqpA?Pb2z$pbCc4B4zL{BeZ?F-8`s$?>*lXXtn*NC61>|*w7J* z$?!iB{6R-0=KFmyp1nnEmLsA-H0a6l+1uaH^g%c(p{iT&YFrbQ$&PRb8Up#X3@Zsk zD^^&LK~111%cqlP%!_gFNa^dTYT?rhkGl}5=fL{a`UViaXWI$k-UcHJwmaH1s=S$4 z%4)PdWJX;hh5UoK?6aWoyLxX&NhNRqKam7tcOkLh{%j3K^4Mgx1@i|Pi&}<^5>hs5 zm8?uOS>%)NzT(%PjVPGa?X%`N2TQCKbeH2l;cTnHiHppPSJ<7y-yEIiC!P*ikl&!B z%+?>VttCOQM@ShFguHVjxX^?mHX^hSaO_;pnyh^v9EumqSZTi+#f&_Vaija0Q-e*| z7ulQj6Fs*bbmsWp{`auM04gGwsYYdNNZcg|ph0OgD>7O}Asn7^Z=eI>`$2*v78;sj-}oMoEj&@)9+ycEOo92xSyY344^ z11Hb8^kdOvbf^GNAK++bYioknrpdN>+u8R?JxG=!2Kd9r=YWCOJYXYuM0cOq^FhEd zBg2puKy__7VT3-r*dG4c62Wgxi52EMCQ`bKgf*#*ou(D4-ZN$+mg&7$u!! z-^+Z%;-3IDwqZ|K=ah85OLwkO zKxNBh+4QHh)u9D?MFtpbl)us}9+V!D%w9jfAMYEb>%$A;u)rrI zuBudh;5PN}_6J_}l55P3l_)&RMlH{m!)ai-i$g)&*M`eN$XQMw{v^r@-125^RRCF0 z^2>|DxhQw(mtNEI2Kj(;KblC7x=JlK$@78`O~>V!`|1Lm-^JR$-5pUANAnb(5}B}JGjBsliK4& zk6y(;$e&h)lh2)L=bvZKbvh@>vLlreBdH8No2>$#%_Wp1U0N7Ank!6$dFSi#xzh|( zRi{Uw%-4W!{IXZ)fWx@XX6;&(m_F%c6~X8hx=BN1&q}*( zoaNjWabE{oUPb!Bt$eyd#$5j9rItB-h*5JiNi(v^e|XKAj*8(k<5-2$&ZBR5fF|JA z9&m4fbzNQnAU}r8ab>fFV%J0z5awe#UZ|bz?Ur)U9bCIKWEzi2%A+5CLqh?}K4JHi z4vtM;+uPsVz{Lfr;78W78gC;z*yTch~4YkLr&m-7%-xc ztw6Mh2d>_iO*$Rd8(-Cr1_V8EO1f*^@wRoSozS) zy1UoC@pruAaC8Z_7~_w4Q6n*&B0AjOmMWa;sIav&gu z|J5&|{=a@vR!~k-OjKEgPFCzcJ>#A1uL&7xTDn;{XBdeM}V=l3B8fE1--DHjSaxoSjNKEM9|U9#m2<3>n{Iuo`r3UZp;>GkT2YBNAh|b z^jTq-hJp(ebZh#Lk8hVBP%qXwv-@vbvoREX$TqRGTgEi$%_F9tZES@z8Bx}$#5eeG zk^UsLBH{bc2VBW)*EdS({yw=?qmevwi?BL6*=12k9zM5gJv1>y#ML4!)iiPzVaH9% zgSImetD@dam~e>{LvVh!phhzpW+iFvWpGT#CVE5TQ40n%F|p(sP5mXxna+Ev7PDwA zamaV4m*^~*xV+&p;W749xhb_X=$|LD;FHuB&JL5?*Y2-oIT(wYY2;73<^#46S~Gx| z^cez%V7x$81}UWqS13Gz80379Rj;6~WdiXWOSsdmzY39L;Hg3MH43o*y8ibNBBH`(av4|u;YPq%{R;IuYow<+GEsf@R?=@tT@!}?#>zIIn0CoyV!hq3mw zHj>OOjfJM3F{RG#6ujzo?y32m^tgSXf@v=J$ELdJ+=5j|=F-~hP$G&}tDZsZE?5rX ztGj`!S>)CFmdkccxM9eGIcGnS2AfK#gXwj%esuIBNJQP1WV~b~+D7PJTmWGTSDrR` zEAu4B8l>NPuhsk5a`rReSya2nfV1EK01+G!x8aBdTs3Io$u5!6n6KX%uv@DxAp3F@{4UYg4SWJtQ-W~0MDb|j-$lwVn znAm*Pl!?Ps&3wO=R115RWKb*JKoexo*)uhhHBncEDMSVa_PyA>k{Zm2(wMQ(5NM3# z)jkza|GoWEQo4^s*wE(gHz?Xsg4`}HUAcs42cM1-qq_=+=!Gk^y710j=66(cSWqUe zklbm8+zB_syQv5A2rj!Vbw8;|$@C!vfNmNV!yJIWDQ>{+2x zKjuFX`~~HKG~^6h5FntRpnnHt=D&rq0>IJ9#F0eM)Y-)GpRjiN7gkA8wvnG#K=q{q z9dBn8_~wm4J<3J_vl|9H{7q6u2A!cW{bp#r*-f{gOV^e=8S{nc1DxMHFwuM$;aVI^ zz6A*}m8N-&x8;aunp1w7_vtB*pa+OYBw=TMc6QK=mbA-|Cf* zvyh8D4LRJImooUaSb7t*fVfih<97Gf@VE0|z>NcBwBQze);Rh!k3K_sfunToZY;f2 z^HmC4KjHRVg+eKYj;PRN^|E0>Gj_zagfRbrki68I^#~6-HaHg3BUW%+clM1xQEdPYt_g<2K+z!$>*$9nQ>; zf9Bei{?zY^-e{q_*|W#2rJG`2fy@{%6u0i_VEWTq$*(ZN37|8lFFFt)nCG({r!q#9 z5VK_kkSJ3?zOH)OezMT{!YkCuSSn!K#-Rhl$uUM(bq*jY? zi1xbMVthJ`E>d>(f3)~fozjg^@eheMF6<)I`oeJYx4*+M&%c9VArn(OM-wp%M<-`x z7sLP1&3^%Nld9Dhm@$3f2}87!quhI@nwd@3~fZl_3LYW-B?Ia>ui`ELg z&Qfe!7m6ze=mZ`Ia9$z|ARSw|IdMpooY4YiPN8K z4B(ts3p%2i(Td=tgEHX z0UQ_>URBtG+-?0E;E7Ld^dyZ;jjw0}XZ(}-QzC6+NN=40oDb2^v!L1g9xRvE#@IBR zO!b-2N7wVfLV;mhEaXQ9XAU+>=XVA6f&T4Z-@AX!leJ8obP^P^wP0aICND?~w&NykJ#54x3_@r7IDMdRNy4Hh;h*!u(Ol(#0bJdwEo$5437-UBjQ+j=Ic>Q2z` zJNDf0yO6@mr6y1#n3)s(W|$iE_i8r@Gd@!DWDqZ7J&~gAm1#~maIGJ1sls^gxL9LLG_NhU!pTGty!TbhzQnu)I*S^54U6Yu%ZeCg`R>Q zhBv$n5j0v%O_j{QYWG!R9W?5_b&67KB$t}&e2LdMvd(PxN6Ir!H4>PNlerpBL>Zvyy!yw z-SOo8caEpDt(}|gKPBd$qND5#a5nju^O>V&;f890?yEOfkSG^HQVmEbM3Ugzu+UtH zC(INPDdraBN?P%kE;*Ae%Wto&sgw(crfZ#Qy(<4nk;S|hD3j{IQRI6Yq|f^basLY; z-HB&Je%Gg}Jt@={_C{L$!RM;$$|iD6vu#3w?v?*;&()uB|I-XqEKqZPS!reW9JkLewLb!70T7n`i!gNtb1%vN- zySZj{8-1>6E%H&=V}LM#xmt`J3XQoaD|@XygXjdZ1+P77-=;=eYpoEQ01B@L*a(uW zrZeZz?HJsw_4g0vhUgkg@VF8<-X$B8pOqCuWAl28uB|@r`19DTUQQsb^pfqB6QtiT z*`_UZ`fT}vtUY#%sq2{rchyfu*pCg;uec2$-$N_xgjZcoumE5vSI{+s@iLWoz^Mf; zuI8kDP{!XY6OP~q5}%1&L}CtfH^N<3o4L@J@zg1-mt{9L`s^z$Vgb|mr{@WiwAqKg zp#t-lhrU>F8o0s1q_9y`gQNf~Vb!F%70f}$>i7o4ho$`uciNf=xgJ>&!gSt0g;M>*x4-`U)ysFW&Vs^Vk6m%?iuWU+o&m(2Jm26Y(3%TL; zA7T)BP{WS!&xmxNw%J=$MPfn(9*^*TV;$JwRy8Zl*yUZi8jWYF>==j~&S|Xinsb%c z2?B+kpet*muEW7@AzjBA^wAJBY8i|#C{WtO_or&Nj2{=6JTTX05}|H>N2B|Wf!*3_ z7hW*j6p3TvpghEc6-wufFiY!%-GvOx*bZrhZu+7?iSrZL5q9}igiF^*R3%DE4aCHZ zqu>xS8LkW+Auv%z-<1Xs92u23R$nk@Pk}MU5!gT|c7vGlEA%G^2th&Q*zfg%-D^=f z&J_}jskj|Q;73NP4<4k*Y%pXPU2Thoqr+5uH1yEYM|VtBPW6lXaetokD0u z9qVek6Q&wk)tFbQ8(^HGf3Wp16gKmr>G;#G(HRBx?F`9AIRboK+;OfHaLJ(P>IP0w zyTbTkx_THEOs%Q&aPrxbZrJlio+hCC_HK<4%f3ZoSAyG7Dn`=X=&h@m*|UYO-4Hq0 z-Bq&+Ie!S##4A6OGoC~>ZW`Y5J)*ouaFl_e9GA*VSL!O_@xGiBw!AF}1{tB)z(w%c zS1Hmrb9OC8>0a_$BzeiN?rkPLc9%&;1CZW*4}CDDNr2gcl_3z+WC15&H1Zc2{o~i) z)LLW=WQ{?ricmC`G1GfJ0Yp4Dy~Ba;j6ZV4r{8xRs`13{dD!xXmr^Aga|C=iSmor% z8hi|pTXH)5Yf&v~exp3o+sY4B^^b*eYkkCYl*T{*=-0HniSA_1F53eCb{x~1k3*`W zr~};p1A`k{1DV9=UPnLDgz{aJH=-LQo<5%+Em!DNN252xwIf*wF_zS^!(XSm(9eoj z=*dXG&n0>)_)N5oc6v!>-bd(2ragD8O=M|wGW z!xJQS<)u70m&6OmrF0WSsr@I%T*c#Qo#Ha4d3COcX+9}hM5!7JIGF>7<~C(Ear^Sn zm^ZFkV6~Ula6+8S?oOROOA6$C&q&dp`>oR-2Ym3(HT@O7Sd5c~+kjrmM)YmgPH*tL zX+znN>`tv;5eOfX?h{AuX^LK~V#gPCu=)Tigtq9&?7Xh$qN|%A$?V*v=&-2F$zTUv z`C#WyIrChS5|Kgm_GeudCFf;)!WH7FI60j^0o#65o6`w*S7R@)88n$1nrgU(oU0M9 zx+EuMkC>(4j1;m6NoGqEkpJYJ?vc|B zOlwT3t&UgL!pX_P*6g36`ZXQ; z9~Cv}ANFnJGp(;ZhS(@FT;3e)0)Kp;h^x;$*xZn*k0U6-&FwI=uOGaODdrsp-!K$Ac32^c{+FhI-HkYd5v=`PGsg%6I`4d9Jy)uW0y%) zm&j^9WBAp*P8#kGJUhB!L?a%h$hJgQrx!6KCB_TRo%9{t0J7KW8!o1B!NC)VGLM5! zpZy5Jc{`r{1e(jd%jsG7k%I+m#CGS*BPA65ZVW~fLYw0dA-H_}O zrkGFL&P1PG9p2(%QiEWm6x;U-U&I#;Em$nx-_I^wtgw3xUPVVu zqSuKnx&dIT-XT+T10p;yjo1Y)z(x1fb8Dzfn8e yu?e%!_ptzGB|8GrCfu%p?(_ zQccdaaVK$5bz;*rnyK{_SQYM>;aES6Qs^lj9lEs6_J+%nIiuQC*fN;z8md>r_~Mfl zU%p5Dt_YT>gQqfr@`cR!$NWr~+`CZb%dn;WtzrAOI>P_JtsB76PYe*<%H(y>qx-`Kq!X_; z<{RpAqYhE=L1r*M)gNF3B8r(<%8mo*SR2hu zccLRZwGARt)Hlo1euqTyM>^!HK*!Q2P;4UYrysje@;(<|$&%vQekbn|0Ruu_Io(w4#%p6ld2Yp7tlA`Y$cciThP zKzNGIMPXX%&Ud0uQh!uQZz|FB`4KGD?3!ND?wQt6!n*f4EmCoJUh&b?;B{|lxs#F- z31~HQ`SF4x$&v00@(P+j1pAaj5!s`)b2RDBp*PB=2IB>oBF!*6vwr7Dp%zpAx*dPr zb@Zjq^XjN?O4QcZ*O+8>)|HlrR>oD*?WQl5ri3R#2?*W6iJ>>kH%KnnME&TT@ZzrHS$Q%LC?n|e>V+D+8D zYc4)QddFz7I8#}y#Wj6>4P%34dZH~OUDb?uP%-E zwjXM(?Sg~1!|wI(RVuxbu)-rH+O=igSho_pDCw(c6b=P zKk4ATlB?bj9+HHlh<_!&z0rx13K3ZrAR8W)!@Y}o`?a*JJsD+twZIv`W)@Y?Amu_u zz``@-e2X}27$i(2=9rvIu5uTUOVhzwu%mNazS|lZb&PT;XE2|B&W1>=B58#*!~D&) zfVmJGg8UdP*fx(>Cj^?yS^zH#o-$Q-*$SnK(ZVFkw+er=>N^7!)FtP3y~Xxnu^nzY zikgB>Nj0%;WOltWIob|}%lo?_C7<``a5hEkx&1ku$|)i>Rh6@3h*`slY=9U}(Ql_< zaNG*J8vb&@zpdhAvv`?{=zDedJ23TD&Zg__snRAH4eh~^oawdYi6A3w8<Ozh@Kw)#bdktM^GVb zrG08?0bG?|NG+w^&JvD*7LAbjED{_Zkc`3H!My>0u5Q}m!+6VokMLXxl`Mkd=g&Xx z-a>m*#G3SLlhbKB!)tnzfWOBV;u;ftU}S!NdD5+YtOjLg?X}dl>7m^gOpihrf1;PY zvll&>dIuUGs{Qnd- zwIR3oIrct8Va^Tm0t#(bJD7c$Z7DO9*7NnRZorrSm`b`cxz>OIC;jSE3DO8`hX955ui`s%||YQtt2 z5DNA&pG-V+4oI2s*x^>-$6J?p=I>C|9wZF8z;VjR??Icg?1w2v5Me+FgAeGGa8(3S z4vg*$>zC-WIVZtJ7}o9{D-7d>zCe|z#<9>CFve-OPAYsneTb^JH!Enaza#j}^mXy1 z+ULn^10+rWLF6j2>Ya@@Kq?26>AqK{A_| zQKb*~F1>sE*=d?A?W7N2j?L09_7n+HGi{VY;MoTGr_)G9)ot$p!-UY5zZ2Xtbm=t z@dpPSGwgH=QtIcEulQNI>S-#ifbnO5EWkI;$A|pxJd885oM+ zGZ0_0gDvG8q2xebj+fbCHYfAXuZStH2j~|d^sBAzo46(K8n59+T6rzBwK)^rfPT+B zyIFw)9YC-V^rhtK`!3jrhmW-sTmM+tPH+;nwjL#-SjQPUZ53L@A>y*rt(#M(qsiB2 zx6B)dI}6Wlsw%bJ8h|(lhkJVogQZA&n{?Vgs6gNSXzuZpEyu*xySy8ro07QZ7Vk1!3tJphN_5V7qOiyK8p z#@jcDD8nmtYi1^l8ml;AF<#IPK?!pqf9D4moYk>d99Im}Jtwj6c#+A;f)CQ*f-hZ< z=p_T86jog%!p)D&5g9taSwYi&eP z#JuEK%+NULWus;0w32-SYFku#i}d~+{Pkho&^{;RxzP&0!RCm3-9K6`>KZpnzS6?L z^H^V*s!8<>x8bomvD%rh>Zp3>Db%kyin;qtl+jAv8Oo~1g~mqGAC&Qi_wy|xEt2iz zWAJEfTV%cl2Cs<1L&DLRVVH05EDq`pH7Oh7sR`NNkL%wi}8n>IXcO40hp+J+sC!W?!krJf!GJNE8uj zg-y~Ns-<~D?yqbzVRB}G>0A^f0!^N7l=$m0OdZuqAOQqLc zX?AEGr1Ht+inZ-Qiwnl@Z0qukd__a!C*CKuGdy5#nD7VUBM^6OCpxCa2A(X;e0&V4 zM&WR8+wErQ7UIc6LY~Q9x%Sn*Tn>>P`^t&idaOEnOd(Ufw#>NoR^1QdhJ8s`h^|R_ zXX`c5*O~Xdvh%q;7L!_!ohf$NfEBmCde|#uVZvEo>OfEq%+Ns7&_f$OR9xsihRpBb z+cjk8LyDm@U{YN>+r46?nn{7Gh(;WhFw6GAxtcKD+YWV?uge>;+q#Xx4!GpRkVZYu zzsF}1)7$?%s9g9CH=Zs+B%M_)+~*j3L0&Q9u7!|+T`^O{xE6qvAP?XWv9_MrZKdo& z%IyU)$Q95AB4!#hT!_dA>4e@zjOBD*Y=XjtMm)V|+IXzjuM;(l+8aA5#Kaz_$rR6! zj>#&^DidYD$nUY(D$mH`9eb|dtV0b{S>H6FBfq>t5`;OxA4Nn{J(+XihF(stSche7$es&~N$epi&PDM_N`As;*9D^L==2Q7Z2zD+CiU(|+-kL*VG+&9!Yb3LgPy?A zm7Z&^qRG_JIxK7-FBzZI3Q<;{`DIxtc48k> zc|0dmX;Z=W$+)qE)~`yn6MdoJ4co;%!`ddy+FV538Y)j(vg}5*k(WK)KWZ3WaOG!8 z!syGn=s{H$odtpqFrT#JGM*utN7B((abXnpDM6w56nhw}OY}0TiTG1#f*VFZr+^-g zbP10`$LPq_;PvrA1XXlyx2uM^mrjTzX}w{yuLo-cOClE8MMk47T25G8M!9Z5ypOSV zAJUBGEg5L2fY)ZGJb^E34R2zJ?}Vf>{~gB!8=5Z) z9y$>5c)=;o0HeHHSuE4U)#vG&KF|I%-cF6f$~pdYJWk_dD}iOA>iA$O$+4%@>JU08 zS`ep)$XLPJ+n0_i@PkF#ri6T8?ZeAot$6JIYHm&P6EB=BiaNY|aA$W0I+nz*zkz_z zkEru!tj!QUffq%)8y0y`T&`fuus-1p>=^hnBiBqD^hXrPs`PY9tU3m0np~rISY09> z`P3s=-kt_cYcxWd{de@}TwSqg*xVhp;E9zCsnXo6z z?f&Sv^U7n4`xr=mXle94HzOdN!2kB~4=%)u&N!+2;z6UYKUDqi-s6AZ!haB;@&B`? z_TRX0%@suz^TRdCb?!vNJYPY8L_}&07uySH9%W^Tc&1pia6y1q#?*Drf}GjGbPjBS zbOPcUY#*$3sL2x4v_i*Y=N7E$mR}J%|GUI(>WEr+28+V z%v5{#e!UF*6~G&%;l*q*$V?&r$Pp^sE^i-0$+RH3ERUUdQ0>rAq2(2QAbG}$y{de( z>{qD~GGuOk559Y@%$?N^1ApVL_a704>8OD%8Y%8B;FCt%AoPu8*D1 zLB5X>b}Syz81pn;xnB}%0FnwazlWfUV)Z-~rZg6~b z6!9J$EcE&sEbzcy?CI~=boWA&eeIa%z(7SE^qgVLz??1Vbc1*aRvc%Mri)AJaAG!p z$X!_9Ds;Zz)f+;%s&dRcJt2==P{^j3bf0M=nJd&xwUGlUFn?H=2W(*2I2Gdu zv!gYCwM10aeus)`RIZSrCK=&oKaO_Ry~D1B5!y0R=%!i2*KfXGYX&gNv_u+n9wiR5 z*e$Zjju&ODRW3phN925%S(jL+bCHv6rZtc?!*`1TyYXT6%Ju=|X;6D@lq$8T zW{Y|e39ioPez(pBH%k)HzFITXHvnD6hw^lIoUMA;qAJ^CU?top1fo@s7xT13Fvn1H z6JWa-6+FJF#x>~+A;D~;VDs26>^oH0EI`IYT2iagy23?nyJ==i{g4%HrAf1-*v zK1)~@&(KkwR7TL}L(A@C_S0G;-GMDy=MJn2$FP5s<%wC)4jC5PXoxrQBFZ_k0P{{s@sz+gX`-!=T8rcB(=7vW}^K6oLWMmp(rwDh}b zwaGGd>yEy6fHv%jM$yJXo5oMAQ>c9j`**}F?MCry;T@47@r?&sKHgVe$MCqk#Z_3S z1GZI~nOEN*P~+UaFGnj{{Jo@16`(qVNtbU>O0Hf57-P>x8Jikp=`s8xWs^dAJ9lCQ z)GFm+=OV%AMVqVATtN@|vp61VVAHRn87}%PC^RAzJ%JngmZTasWBAWsoAqBU+8L8u z4A&Pe?fmTm0?mK-BL9t+{y7o(7jm+RpOhL9KnY#E&qu^}B6=K_dB}*VlSEiC9fn)+V=J;OnN)Ta5v66ic1rG+dGAJ1 z1%Zb_+!$=tQ~lxQrzv3x#CPb?CekEkA}0MYSgx$Jdd}q8+R=ma$|&1a#)TQ=l$1tQ z=tL9&_^vJ)Pk}EDO-va`UCT1m#Uty1{v^A3P~83_#v^ozH}6*9mIjIr;t3Uv%@VeW zGL6(CwCUp)Jq%G0bIG%?{_*Y#5IHf*5M@wPo6A{$Um++Co$wLC=J1aoG93&T7Ho}P z=mGEPP7GbvoG!uD$k(H3A$Z))+i{Hy?QHdk>3xSBXR0j!11O^mEe9RHmw!pvzv?Ua~2_l2Yh~_!s1qS`|0~0)YsbHSz8!mG)WiJE| z2f($6TQtt6L_f~ApQYQKSb=`053LgrQq7G@98#igV>y#i==-nEjQ!XNu9 z~;mE+gtj4IDDNQJ~JVk5Ux6&LCSFL!y=>79kE9=V}J7tD==Ga+IW zX)r7>VZ9dY=V&}DR))xUoV!u(Z|%3ciQi_2jl}3=$Agc(`RPb z8kEBpvY>1FGQ9W$n>Cq=DIpski};nE)`p3IUw1Oz0|wxll^)4dq3;CCY@RyJgFgc# zKouFh!`?Xuo{IMz^xi-h=StCis_M7yq$u) z?XHvw*HP0VgR+KR6wI)jEMX|ssqYvSf*_3W8zVTQzD?3>H!#>InzpSO)@SC8q*ii- z%%h}_#0{4JG;Jm`4zg};BPTGkYamx$Xo#O~lBirRY)q=5M45n{GCfV7h9qwyu1NxOMoP4)jjZMxmT|IQQh0U7C$EbnMN<3)Kk?fFHYq$d|ICu>KbY_hO zTZM+uKHe(cIZfEqyzyYSUBZa8;Fcut-GN!HSA9ius`ltNebF46ZX_BbZNU}}ZOm{M2&nANL9@0qvih15(|`S~z}m&h!u4x~(%MAO$jHRWNfuxWF#B)E&g3ghSQ9|> z(MFaLQj)NE0lowyjvg8z0#m6FIuKE9lDO~Glg}nSb7`~^&#(Lw{}GVOS>U)m8bF}x zVjbXljBm34Cs-yM6TVusr+3kYFjr28STT3g056y3cH5Tmge~ASxBj z%|yb>$eF;WgrcOZf569sDZOVwoo%8>XO>XQOX1OyN9I-SQgrm;U;+#3OI(zrWyow3 zk==|{lt2xrQ%FIXOTejR>;wv(Pb8u8}BUpx?yd(Abh6? zsoO3VYWkeLnF43&@*#MQ9-i-d0t*xN-UEyNKeyNMHw|A(k(_6QKO=nKMCxD(W(Yop zsRQ)QeL4X3Lxp^L%wzi2-WVSsf61dqliPUM7srDB?Wm6Lzn0&{*}|IsKQW;02(Y&| zaTKv|`U(pSzuvR6Rduu$wzK_W-Y-7>7s?G$)U}&uK;<>vU}^^ns@Z!p+9?St1s)dG zK%y6xkPyyS1$~&6v{kl?Md6gwM|>mt6Upm>oa8RLD^8T{0?HC!Z>;(Bob7el(DV6x zi`I)$&E&ngwFS@bi4^xFLAn`=fzTC;aimE^!cMI2n@Vo%Ae-ne`RF((&5y6xsjjAZ zVguVoQ?Z9uk$2ON;ersE%PU*xGO@T*;j1BO5#TuZKEf(mB7|g7pcEA=nYJ{s3vlbg zd4-DUlD{*6o%Gc^N!Nptgay>j6E5;3psI+C3Q!1ZIbeCubW%w4pq9)MSDyB{HLm|k zxv-{$$A*pS@csolri$Ge<4VZ}e~78JOL-EVyrbxKra^d{?|NnPp86!q>t<&IP07?Z z^>~IK^k#OEKgRH+LjllZXk7iA>2cfH6+(e&9ku5poo~6y{GC5>(bRK7hwjiurqAiZ zg*DmtgY}v83IjE&AbiWgMyFbaRUPZ{lYiz$U^&Zt2YjG<%m((&_JUbZcfJ22(>bi5 z!J?<7AySj0JZ&<-qXX;mcV!f~>G=sB0KnjWca4}vrtunD^1TrpfeS^4dvFr!65knK zZh`d;*VOkPs4*-9kL>$GP0`(M!j~B;#x?Ba~&s6CopvO86oM?-? zOw#dIRc;6A6T?B`Qp%^<U5 z19x(ywSH$_N+Io!6;e?`tWaM$`=Db!gzx|lQ${DG!zb1Zl&|{kX0y6xvO1o z220r<-oaS^^R2pEyY;=Qllqpmue|5yI~D|iI!IGt@iod{Opz@*ml^w2bNs)p`M(Io z|E;;m*Xpjd9l)4G#KaWfV(t8YUn@A;nK^#xgv=LtnArX|vWQVuw3}B${h+frU2>9^ z!l6)!Uo4`5k`<<;E(ido7M6lKTgWezNLq>U*=uz&s=cc$1%>VrAeOoUtA|T6gO4>UNqsdK=NF*8|~*sl&wI=x9-EGiq*aqV!(VVXA57 zw9*o6Ir8Lj1npUXvlevtn(_+^X5rzdR>#(}4YcB9O50q97%rW2me5_L=%ffYPUSRc z!vv?Kv>dH994Qi>U(a<0KF6NH5b16enCp+mw^Hb3Xs1^tThFpz!3QuN#}KBbww`(h z7GO)1olDqy6?T$()R7y%NYx*B0k_2IBiZ14&8|JPFxeMF{vSTxF-Vi3+ZOI=Thq2} zyQgjYY1_7^ZQHh{?P))4+qUiQJLi1&{yE>h?~jU%tjdV0h|FENbM3X(KnJdPKc?~k zh=^Ixv*+smUll!DTWH!jrV*wSh*(mx0o6}1@JExzF(#9FXgmTXVoU+>kDe68N)dkQ zH#_98Zv$}lQwjKL@yBd;U(UD0UCl322=pav<=6g>03{O_3oKTq;9bLFX1ia*lw;#K zOiYDcBJf)82->83N_Y(J7Kr_3lE)hAu;)Q(nUVydv+l+nQ$?|%MWTy`t>{havFSQloHwiIkGK9YZ79^9?AZo0ZyQlVR#}lF%dn5n%xYksXf8gnBm=wO7g_^! zauQ-bH1Dc@3ItZ-9D_*pH}p!IG7j8A_o94#~>$LR|TFq zZ-b00*nuw|-5C2lJDCw&8p5N~Z1J&TrcyErds&!l3$eSz%`(*izc;-?HAFD9AHb-| z>)id`QCrzRws^9(#&=pIx9OEf2rmlob8sK&xPCWS+nD~qzU|qG6KwA{zbikcfQrdH z+ zQg>O<`K4L8rN7`GJB0*3<3`z({lWe#K!4AZLsI{%z#ja^OpfjU{!{)x0ZH~RB0W5X zTwN^w=|nA!4PEU2=LR05x~}|B&ZP?#pNgDMwD*ajI6oJqv!L81gu=KpqH22avXf0w zX3HjbCI!n9>l046)5rr5&v5ja!xkKK42zmqHzPx$9Nn_MZk`gLeSLgC=LFf;H1O#B zn=8|^1iRrujHfbgA+8i<9jaXc;CQBAmQvMGQPhFec2H1knCK2x!T`e6soyrqCamX% zTQ4dX_E*8so)E*TB$*io{$c6X)~{aWfaqdTh=xEeGvOAN9H&-t5tEE-qso<+C!2>+ zskX51H-H}#X{A75wqFe-J{?o8Bx|>fTBtl&tcbdR|132Ztqu5X0i-pisB-z8n71%q%>EF}yy5?z=Ve`}hVh{Drv1YWL zW=%ug_&chF11gDv3D6B)Tz5g54H0mDHNjuKZ+)CKFk4Z|$RD zfRuKLW`1B>B?*RUfVd0+u8h3r-{@fZ{k)c!93t1b0+Q9vOaRnEn1*IL>5Z4E4dZ!7 ztp4GP-^1d>8~LMeb}bW!(aAnB1tM_*la=Xx)q(I0Y@__Zd$!KYb8T2VBRw%e$iSdZ zkwdMwd}eV9q*;YvrBFTv1>1+}{H!JK2M*C|TNe$ZSA>UHKk);wz$(F$rXVc|sI^lD zV^?_J!3cLM;GJuBMbftbaRUs$;F}HDEDtIeHQ)^EJJ1F9FKJTGH<(Jj`phE6OuvE) zqK^K`;3S{Y#1M@8yRQwH`?kHMq4tHX#rJ>5lY3DM#o@or4&^_xtBC(|JpGTfrbGkA z2Tu+AyT^pHannww!4^!$5?@5v`LYy~T`qs7SYt$JgrY(w%C+IWA;ZkwEF)u5sDvOK zGk;G>Mh&elvXDcV69J_h02l&O;!{$({fng9Rlc3ID#tmB^FIG^w{HLUpF+iB`|
NnX)EH+Nua)3Y(c z&{(nX_ht=QbJ%DzAya}!&uNu!4V0xI)QE$SY__m)SAKcN0P(&JcoK*Lxr@P zY&P=}&B3*UWNlc|&$Oh{BEqwK2+N2U$4WB7Fd|aIal`FGANUa9E-O)!gV`((ZGCc$ zBJA|FFrlg~9OBp#f7aHodCe{6= zay$6vN~zj1ddMZ9gQ4p32(7wD?(dE>KA2;SOzXRmPBiBc6g`eOsy+pVcHu=;Yd8@{ zSGgXf@%sKKQz~;!J;|2fC@emm#^_rnO0esEn^QxXgJYd`#FPWOUU5b;9eMAF zZhfiZb|gk8aJIw*YLp4!*(=3l8Cp{(%p?ho22*vN9+5NLV0TTazNY$B5L6UKUrd$n zjbX%#m7&F#U?QNOBXkiiWB*_tk+H?N3`vg;1F-I+83{M2!8<^nydGr5XX}tC!10&e z7D36bLaB56WrjL&HiiMVtpff|K%|*{t*ltt^5ood{FOG0<>k&1h95qPio)2`eL${YAGIx(b4VN*~nKn6E~SIQUuRH zQ+5zP6jfnP$S0iJ@~t!Ai3o`X7biohli;E zT#yXyl{bojG@-TGZzpdVDXhbmF%F9+-^YSIv|MT1l3j zrxOFq>gd2%U}?6}8mIj?M zc077Zc9fq(-)4+gXv?Az26IO6eV`RAJz8e3)SC7~>%rlzDwySVx*q$ygTR5kW2ds- z!HBgcq0KON9*8Ff$X0wOq$`T7ml(@TF)VeoF}x1OttjuVHn3~sHrMB++}f7f9H%@f z=|kP_?#+fve@{0MlbkC9tyvQ_R?lRdRJ@$qcB(8*jyMyeME5ns6ypVI1Xm*Zr{DuS zZ!1)rQfa89c~;l~VkCiHI|PCBd`S*2RLNQM8!g9L6?n`^evQNEwfO@&JJRme+uopQX0%Jo zgd5G&#&{nX{o?TQwQvF1<^Cg3?2co;_06=~Hcb6~4XWpNFL!WU{+CK;>gH%|BLOh7@!hsa(>pNDAmpcuVO-?;Bic17R}^|6@8DahH)G z!EmhsfunLL|3b=M0MeK2vqZ|OqUqS8npxwge$w-4pFVXFq$_EKrZY?BuP@Az@(k`L z`ViQBSk`y+YwRT;&W| z2e3UfkCo^uTA4}Qmmtqs+nk#gNr2W4 zTH%hhErhB)pkXR{B!q5P3-OM+M;qu~f>}IjtF%>w{~K-0*jPVLl?Chz&zIdxp}bjx zStp&Iufr58FTQ36AHU)0+CmvaOpKF;W@sMTFpJ`j;3d)J_$tNQI^c<^1o<49Z(~K> z;EZTBaVT%14(bFw2ob@?JLQ2@(1pCdg3S%E4*dJ}dA*v}_a4_P(a`cHnBFJxNobAv zf&Zl-Yt*lhn-wjZsq<9v-IsXxAxMZ58C@e0!rzhJ+D@9^3~?~yllY^s$?&oNwyH!#~6x4gUrfxplCvK#!f z$viuszW>MFEcFL?>ux*((!L$;R?xc*myjRIjgnQX79@UPD$6Dz0jutM@7h_pq z0Zr)#O<^y_K6jfY^X%A-ip>P%3saX{!v;fxT-*0C_j4=UMH+Xth(XVkVGiiKE#f)q z%Jp=JT)uy{&}Iq2E*xr4YsJ5>w^=#-mRZ4vPXpI6q~1aFwi+lQcimO45V-JXP;>(Q zo={U`{=_JF`EQj87Wf}{Qy35s8r1*9Mxg({CvOt}?Vh9d&(}iI-quvs-rm~P;eRA@ zG5?1HO}puruc@S{YNAF3vmUc2B4!k*yi))<5BQmvd3tr}cIs#9)*AX>t`=~{f#Uz0 z0&Nk!7sSZwJe}=)-R^$0{yeS!V`Dh7w{w5rZ9ir!Z7Cd7dwZcK;BT#V0bzTt>;@Cl z#|#A!-IL6CZ@eHH!CG>OO8!%G8&8t4)Ro@}USB*k>oEUo0LsljsJ-%5Mo^MJF2I8- z#v7a5VdJ-Cd%(a+y6QwTmi+?f8Nxtm{g-+WGL>t;s#epv7ug>inqimZCVm!uT5Pf6 ziEgQt7^%xJf#!aPWbuC_3Nxfb&CFbQy!(8ANpkWLI4oSnH?Q3f?0k1t$3d+lkQs{~(>06l&v|MpcFsyAv zin6N!-;pggosR*vV=DO(#+}4ps|5$`udE%Kdmp?G7B#y%H`R|i8skKOd9Xzx8xgR$>Zo2R2Ytktq^w#ul4uicxW#{ zFjG_RNlBroV_n;a7U(KIpcp*{M~e~@>Q#Av90Jc5v%0c>egEdY4v3%|K1XvB{O_8G zkTWLC>OZKf;XguMH2-Pw{BKbFzaY;4v2seZV0>^7Q~d4O=AwaPhP3h|!hw5aqOtT@ z!SNz}$of**Bl3TK209@F=Tn1+mgZa8yh(Png%Zd6Mt}^NSjy)etQrF zme*llAW=N_8R*O~d2!apJnF%(JcN??=`$qs3Y+~xs>L9x`0^NIn!8mMRFA_tg`etw z3k{9JAjnl@ygIiJcNHTy02GMAvBVqEss&t2<2mnw!; zU`J)0>lWiqVqo|ex7!+@0i>B~BSU1A_0w#Ee+2pJx0BFiZ7RDHEvE*ptc9md(B{&+ zKE>TM)+Pd>HEmdJao7U@S>nL(qq*A)#eLOuIfAS@j`_sK0UEY6OAJJ-kOrHG zjHx`g!9j*_jRcJ%>CE9K2MVf?BUZKFHY?EpV6ai7sET-tqk=nDFh-(65rhjtlKEY% z@G&cQ<5BKatfdA1FKuB=i>CCC5(|9TMW%K~GbA4}80I5%B}(gck#Wlq@$nO3%@QP_ z8nvPkJFa|znk>V92cA!K1rKtr)skHEJD;k8P|R8RkCq1Rh^&}Evwa4BUJz2f!2=MH zo4j8Y$YL2313}H~F7@J7mh>u%556Hw0VUOz-Un@ZASCL)y8}4XXS`t1AC*^>PLwIc zUQok5PFS=*#)Z!3JZN&eZ6ZDP^-c@StY*t20JhCnbMxXf=LK#;`4KHEqMZ-Ly9KsS zI2VUJGY&PmdbM+iT)zek)#Qc#_i4uH43 z@T5SZBrhNCiK~~esjsO9!qBpaWK<`>!-`b71Y5ReXQ4AJU~T2Njri1CEp5oKw;Lnm)-Y@Z3sEY}XIgSy%xo=uek(kAAH5MsV$V3uTUsoTzxp_rF=tx zV07vlJNKtJhCu`b}*#m&5LV4TAE&%KtHViDAdv#c^x`J7bg z&N;#I2GkF@SIGht6p-V}`!F_~lCXjl1BdTLIjD2hH$J^YFN`7f{Q?OHPFEM$65^!u zNwkelo*5+$ZT|oQ%o%;rBX$+?xhvjb)SHgNHE_yP%wYkkvXHS{Bf$OiKJ5d1gI0j< zF6N}Aq=(WDo(J{e-uOecxPD>XZ@|u-tgTR<972`q8;&ZD!cep^@B5CaqFz|oU!iFj zU0;6fQX&~15E53EW&w1s9gQQ~Zk16X%6 zjG`j0yq}4deX2?Tr(03kg>C(!7a|b9qFI?jcE^Y>-VhudI@&LI6Qa}WQ>4H_!UVyF z((cm&!3gmq@;BD#5P~0;_2qgZhtJS|>WdtjY=q zLnHH~Fm!cxw|Z?Vw8*~?I$g#9j&uvgm7vPr#&iZgPP~v~BI4jOv;*OQ?jYJtzO<^y z7-#C={r7CO810!^s(MT!@@Vz_SVU)7VBi(e1%1rvS!?PTa}Uv`J!EP3s6Y!xUgM^8 z4f!fq<3Wer_#;u!5ECZ|^c1{|q_lh3m^9|nsMR1#Qm|?4Yp5~|er2?W^7~cl;_r4WSme_o68J9p03~Hc%X#VcX!xAu%1`R!dfGJCp zV*&m47>s^%Ib0~-2f$6oSgn3jg8m%UA;ArcdcRyM5;}|r;)?a^D*lel5C`V5G=c~k zy*w_&BfySOxE!(~PI$*dwG><+-%KT5p?whOUMA*k<9*gi#T{h3DAxzAPxN&Xws8o9Cp*`PA5>d9*Z-ynV# z9yY*1WR^D8|C%I@vo+d8r^pjJ$>eo|j>XiLWvTWLl(^;JHCsoPgem6PvegHb-OTf| zvTgsHSa;BkbG=(NgPO|CZu9gUCGr$8*EoH2_Z#^BnxF0yM~t`|9ws_xZ8X8iZYqh! zAh;HXJ)3P&)Q0(&F>!LN0g#bdbis-cQxyGn9Qgh`q+~49Fqd2epikEUw9caM%V6WgP)532RMRW}8gNS%V%Hx7apSz}tn@bQy!<=lbhmAH=FsMD?leawbnP5BWM0 z5{)@EEIYMu5;u)!+HQWhQ;D3_Cm_NADNeb-f56}<{41aYq8p4=93d=-=q0Yx#knGYfXVt z+kMxlus}t2T5FEyCN~!}90O_X@@PQpuy;kuGz@bWft%diBTx?d)_xWd_-(!LmVrh**oKg!1CNF&LX4{*j|) zIvjCR0I2UUuuEXh<9}oT_zT#jOrJAHNLFT~Ilh9hGJPI1<5`C-WA{tUYlyMeoy!+U zhA#=p!u1R7DNg9u4|QfED-2TuKI}>p#2P9--z;Bbf4Op*;Q9LCbO&aL2i<0O$ByoI z!9;Ght733FC>Pz>$_mw(F`zU?`m@>gE`9_p*=7o=7av`-&ifU(^)UU`Kg3Kw`h9-1 z6`e6+im=|m2v`pN(2dE%%n8YyQz;#3Q-|x`91z?gj68cMrHl}C25|6(_dIGk*8cA3 zRHB|Nwv{@sP4W+YZM)VKI>RlB`n=Oj~Rzx~M+Khz$N$45rLn6k1nvvD^&HtsMA4`s=MmuOJID@$s8Ph4E zAmSV^+s-z8cfv~Yd(40Sh4JG#F~aB>WFoX7ykaOr3JaJ&Lb49=B8Vk-SQT9%7TYhv z?-Pprt{|=Y5ZQ1?od|A<_IJU93|l4oAfBm?3-wk{O<8ea+`}u%(kub(LFo2zFtd?4 zwpN|2mBNywv+d^y_8#<$r>*5+$wRTCygFLcrwT(qc^n&@9r+}Kd_u@Ithz(6Qb4}A zWo_HdBj#V$VE#l6pD0a=NfB0l^6W^g`vm^sta>Tly?$E&{F?TTX~DsKF~poFfmN%2 z4x`Dc{u{Lkqz&y!33;X}weD}&;7p>xiI&ZUb1H9iD25a(gI|`|;G^NwJPv=1S5e)j z;U;`?n}jnY6rA{V^ zxTd{bK)Gi^odL3l989DQlN+Zs39Xe&otGeY(b5>rlIqfc7Ap4}EC?j<{M=hlH{1+d zw|c}}yx88_xQr`{98Z!d^FNH77=u(p-L{W6RvIn40f-BldeF-YD>p6#)(Qzf)lfZj z?3wAMtPPp>vMehkT`3gToPd%|D8~4`5WK{`#+}{L{jRUMt zrFz+O$C7y8$M&E4@+p+oV5c%uYzbqd2Y%SSgYy#xh4G3hQv>V*BnuKQhBa#=oZB~w{azUB+q%bRe_R^ z>fHBilnRTUfaJ201czL8^~Ix#+qOHSO)A|xWLqOxB$dT2W~)e-r9;bm=;p;RjYahB z*1hegN(VKK+ztr~h1}YP@6cfj{e#|sS`;3tJhIJK=tVJ-*h-5y9n*&cYCSdg#EHE# zSIx=r#qOaLJoVVf6v;(okg6?*L_55atl^W(gm^yjR?$GplNP>BZsBYEf_>wM0Lc;T zhf&gpzOWNxS>m+mN92N0{;4uw`P+9^*|-1~$uXpggj4- z^SFc4`uzj2OwdEVT@}Q`(^EcQ_5(ZtXTql*yGzdS&vrS_w>~~ra|Nb5abwf}Y!uq6R5f&6g2ge~2p(%c< z@O)cz%%rr4*cRJ5f`n@lvHNk@lE1a*96Kw6lJ~B-XfJW%?&-y?;E&?1AacU@`N`!O z6}V>8^%RZ7SQnZ-z$(jsX`amu*5Fj8g!3RTRwK^`2_QHe;_2y_n|6gSaGyPmI#kA0sYV<_qOZc#-2BO%hX)f$s-Z3xlI!ub z^;3ru11DA`4heAu%}HIXo&ctujzE2!6DIGE{?Zs>2}J+p&C$rc7gJC35gxhflorvsb%sGOxpuWhF)dL_&7&Z99=5M0b~Qa;Mo!j&Ti_kXW!86N%n= zSC@6Lw>UQ__F&+&Rzv?gscwAz8IP!n63>SP)^62(HK98nGjLY2*e^OwOq`3O|C92? z;TVhZ2SK%9AGW4ZavTB9?)mUbOoF`V7S=XM;#3EUpR+^oHtdV!GK^nXzCu>tpR|89 zdD{fnvCaN^^LL%amZ^}-E+214g&^56rpdc@yv0b<3}Ys?)f|fXN4oHf$six)-@<;W&&_kj z-B}M5U*1sb4)77aR=@%I?|Wkn-QJVuA96an25;~!gq(g1@O-5VGo7y&E_srxL6ZfS z*R%$gR}dyONgju*D&?geiSj7SZ@ftyA|}(*Y4KbvU!YLsi1EDQQCnb+-cM=K1io78o!v*);o<XwjaQH%)uIP&Zm?)Nfbfn;jIr z)d#!$gOe3QHp}2NBak@yYv3m(CPKkwI|{;d=gi552u?xj9ObCU^DJFQp4t4e1tPzM zvsRIGZ6VF+{6PvqsplMZWhz10YwS={?`~O0Ec$`-!klNUYtzWA^f9m7tkEzCy<_nS z=&<(awFeZvt51>@o_~>PLs05CY)$;}Oo$VDO)?l-{CS1Co=nxjqben*O1BR>#9`0^ zkwk^k-wcLCLGh|XLjdWv0_Hg54B&OzCE^3NCP}~OajK-LuRW53CkV~Su0U>zN%yQP zH8UH#W5P3-!ToO-2k&)}nFe`t+mdqCxxAHgcifup^gKpMObbox9LFK;LP3}0dP-UW z?Zo*^nrQ6*$FtZ(>kLCc2LY*|{!dUn$^RW~m9leoF|@Jy|M5p-G~j%+P0_#orRKf8 zvuu5<*XO!B?1E}-*SY~MOa$6c%2cM+xa8}_8x*aVn~57v&W(0mqN1W`5a7*VN{SUH zXz98DDyCnX2EPl-`Lesf`=AQT%YSDb`$%;(jUTrNen$NPJrlpPDP}prI>Ml!r6bCT;mjsg@X^#&<}CGf0JtR{Ecwd&)2zuhr#nqdgHj+g2n}GK9CHuwO zk>oZxy{vcOL)$8-}L^iVfJHAGfwN$prHjYV0ju}8%jWquw>}_W6j~m<}Jf!G?~r5&Rx)!9JNX!ts#SGe2HzobV5); zpj@&`cNcO&q+%*<%D7za|?m5qlmFK$=MJ_iv{aRs+BGVrs)98BlN^nMr{V_fcl_;jkzRju+c-y?gqBC_@J0dFLq-D9@VN&-`R9U;nv$Hg?>$oe4N&Ht$V_(JR3TG^! zzJsbQbi zFE6-{#9{G{+Z}ww!ycl*7rRdmU#_&|DqPfX3CR1I{Kk;bHwF6jh0opI`UV2W{*|nn zf_Y@%wW6APb&9RrbEN=PQRBEpM(N1w`81s=(xQj6 z-eO0k9=Al|>Ej|Mw&G`%q8e$2xVz1v4DXAi8G};R$y)ww638Y=9y$ZYFDM$}vzusg zUf+~BPX>(SjA|tgaFZr_e0{)+z9i6G#lgt=F_n$d=beAt0Sa0a7>z-?vcjl3e+W}+ z1&9=|vC=$co}-Zh*%3588G?v&U7%N1Qf-wNWJ)(v`iO5KHSkC5&g7CrKu8V}uQGcfcz zmBz#Lbqwqy#Z~UzHgOQ;Q-rPxrRNvl(&u6ts4~0=KkeS;zqURz%!-ERppmd%0v>iRlEf+H$yl{_8TMJzo0 z>n)`On|7=WQdsqhXI?#V{>+~}qt-cQbokEbgwV3QvSP7&hK4R{Z{aGHVS3;+h{|Hz z6$Js}_AJr383c_+6sNR|$qu6dqHXQTc6?(XWPCVZv=)D#6_;D_8P-=zOGEN5&?~8S zl5jQ?NL$c%O)*bOohdNwGIKM#jSAC?BVY={@A#c9GmX0=T(0G}xs`-%f3r=m6-cpK z!%waekyAvm9C3%>sixdZj+I(wQlbB4wv9xKI*T13DYG^T%}zZYJ|0$Oj^YtY+d$V$ zAVudSc-)FMl|54n=N{BnZTM|!>=bhaja?o7s+v1*U$!v!qQ%`T-6fBvmdPbVmro&d zk07TOp*KuxRUSTLRrBj{mjsnF8`d}rMViY8j`jo~Hp$fkv9F_g(jUo#Arp;Xw0M$~ zRIN!B22~$kx;QYmOkos@%|5k)!QypDMVe}1M9tZfkpXKGOxvKXB!=lo`p?|R1l=tA zp(1}c6T3Fwj_CPJwVsYtgeRKg?9?}%oRq0F+r+kdB=bFUdVDRPa;E~~>2$w}>O>v=?|e>#(-Lyx?nbg=ckJ#5U6;RT zNvHhXk$P}m9wSvFyU3}=7!y?Y z=fg$PbV8d7g25&-jOcs{%}wTDKm>!Vk);&rr;O1nvO0VrU&Q?TtYVU=ir`te8SLlS zKSNmV=+vF|ATGg`4$N1uS|n??f}C_4Sz!f|4Ly8#yTW-FBfvS48Tef|-46C(wEO_%pPhUC5$-~Y?!0vFZ^Gu`x=m7X99_?C-`|h zfmMM&Y@zdfitA@KPw4Mc(YHcY1)3*1xvW9V-r4n-9ZuBpFcf{yz+SR{ zo$ZSU_|fgwF~aakGr(9Be`~A|3)B=9`$M-TWKipq-NqRDRQc}ABo*s_5kV%doIX7LRLRau_gd@Rd_aLFXGSU+U?uAqh z8qusWWcvgQ&wu{|sRXmv?sl=xc<$6AR$+cl& zFNh5q1~kffG{3lDUdvEZu5c(aAG~+64FxdlfwY^*;JSS|m~CJusvi-!$XR`6@XtY2 znDHSz7}_Bx7zGq-^5{stTRy|I@N=>*y$zz>m^}^{d&~h;0kYiq8<^Wq7Dz0w31ShO^~LUfW6rfitR0(=3;Uue`Y%y@ex#eKPOW zO~V?)M#AeHB2kovn1v=n^D?2{2jhIQd9t|_Q+c|ZFaWt+r&#yrOu-!4pXAJuxM+Cx z*H&>eZ0v8Y`t}8{TV6smOj=__gFC=eah)mZt9gwz>>W$!>b3O;Rm^Ig*POZP8Rl0f zT~o=Nu1J|lO>}xX&#P58%Yl z83`HRs5#32Qm9mdCrMlV|NKNC+Z~ z9OB8xk5HJ>gBLi+m@(pvpw)1(OaVJKs*$Ou#@Knd#bk+V@y;YXT?)4eP9E5{J%KGtYinNYJUH9PU3A}66c>Xn zZ{Bn0<;8$WCOAL$^NqTjwM?5d=RHgw3!72WRo0c;+houoUA@HWLZM;^U$&sycWrFd zE7ekt9;kb0`lps{>R(}YnXlyGY}5pPd9zBpgXeJTY_jwaJGSJQC#-KJqmh-;ad&F- z-Y)E>!&`Rz!HtCz>%yOJ|v(u7P*I$jqEY3}(Z-orn4 zlI?CYKNl`6I){#2P1h)y(6?i;^z`N3bxTV%wNvQW+eu|x=kbj~s8rhCR*0H=iGkSj zk23lr9kr|p7#qKL=UjgO`@UnvzU)`&fI>1Qs7ubq{@+lK{hH* zvl6eSb9%yngRn^T<;jG1SVa)eA>T^XX=yUS@NCKpk?ovCW1D@!=@kn;l_BrG;hOTC z6K&H{<8K#dI(A+zw-MWxS+~{g$tI7|SfP$EYKxA}LlVO^sT#Oby^grkdZ^^lA}uEF zBSj$weBJG{+Bh@Yffzsw=HyChS(dtLE3i*}Zj@~!_T-Ay7z=B)+*~3|?w`Zd)Co2t zC&4DyB!o&YgSw+fJn6`sn$e)29`kUwAc+1MND7YjV%lO;H2}fNy>hD#=gT ze+-aFNpyKIoXY~Vq-}OWPBe?Rfu^{ps8>Xy%42r@RV#*QV~P83jdlFNgkPN=T|Kt7 zV*M`Rh*30&AWlb$;ae130e@}Tqi3zx2^JQHpM>j$6x`#{mu%tZlwx9Gj@Hc92IuY* zarmT|*d0E~vt6<+r?W^UW0&#U&)8B6+1+;k^2|FWBRP9?C4Rk)HAh&=AS8FS|NQaZ z2j!iZ)nbEyg4ZTp-zHwVlfLC~tXIrv(xrP8PAtR{*c;T24ycA-;auWsya-!kF~CWZ zw_uZ|%urXgUbc@x=L=_g@QJ@m#5beS@6W195Hn7>_}z@Xt{DIEA`A&V82bc^#!q8$ zFh?z_Vn|ozJ;NPd^5uu(9tspo8t%&-U9Ckay-s@DnM*R5rtu|4)~e)`z0P-sy?)kc zs_k&J@0&0!q4~%cKL)2l;N*T&0;mqX5T{Qy60%JtKTQZ-xb%KOcgqwJmb%MOOKk7N zgq})R_6**{8A|6H?fO+2`#QU)p$Ei2&nbj6TpLSIT^D$|`TcSeh+)}VMb}LmvZ{O| ze*1IdCt3+yhdYVxcM)Q_V0bIXLgr6~%JS<<&dxIgfL=Vnx4YHuU@I34JXA|+$_S3~ zy~X#gO_X!cSs^XM{yzDGNM>?v(+sF#<0;AH^YrE8smx<36bUsHbN#y57K8WEu(`qHvQ6cAZPo=J5C(lSmUCZ57Rj6cx!e^rfaI5%w}unz}4 zoX=nt)FVNV%QDJH`o!u9olLD4O5fl)xp+#RloZlaA92o3x4->?rB4`gS$;WO{R;Z3>cG3IgFX2EA?PK^M}@%1%A;?f6}s&CV$cIyEr#q5;yHdNZ9h{| z-=dX+a5elJoDo?Eq&Og!nN6A)5yYpnGEp}?=!C-V)(*~z-+?kY1Q7qs#Rsy%hu_60rdbB+QQNr?S1 z?;xtjUv|*E3}HmuNyB9aFL5H~3Ho0UsmuMZELp1a#CA1g`P{-mT?BchuLEtK}!QZ=3AWakRu~?f9V~3F;TV`5%9Pcs_$gq&CcU}r8gOO zC2&SWPsSG{&o-LIGTBqp6SLQZPvYKp$$7L4WRRZ0BR$Kf0I0SCFkqveCp@f)o8W)! z$%7D1R`&j7W9Q9CGus_)b%+B#J2G;l*FLz#s$hw{BHS~WNLODV#(!u_2Pe&tMsq={ zdm7>_WecWF#D=?eMjLj=-_z`aHMZ=3_-&E8;ibPmM}61i6J3is*=dKf%HC>=xbj4$ zS|Q-hWQ8T5mWde6h@;mS+?k=89?1FU<%qH9B(l&O>k|u_aD|DY*@~(`_pb|B#rJ&g zR0(~(68fpUPz6TdS@4JT5MOPrqDh5_H(eX1$P2SQrkvN8sTxwV>l0)Qq z0pzTuvtEAKRDkKGhhv^jk%|HQ1DdF%5oKq5BS>szk-CIke{%js?~%@$uaN3^Uz6Wf z_iyx{bZ(;9y4X&>LPV=L=d+A}7I4GkK0c1Xts{rrW1Q7apHf-))`BgC^0^F(>At1* za@e7{lq%yAkn*NH8Q1{@{lKhRg*^TfGvv!Sn*ed*x@6>M%aaqySxR|oNadYt1mpUZ z6H(rupHYf&Z z29$5g#|0MX#aR6TZ$@eGxxABRKakDYtD%5BmKp;HbG_ZbT+=81E&=XRk6m_3t9PvD zr5Cqy(v?gHcYvYvXkNH@S#Po~q(_7MOuCAB8G$a9BC##gw^5mW16cML=T=ERL7wsk zzNEayTG?mtB=x*wc@ifBCJ|irFVMOvH)AFRW8WE~U()QT=HBCe@s$dA9O!@`zAAT) zaOZ7l6vyR+Nk_OOF!ZlZmjoImKh)dxFbbR~z(cMhfeX1l7S_`;h|v3gI}n9$sSQ>+3@AFAy9=B_y$)q;Wdl|C-X|VV3w8 z2S#>|5dGA8^9%Bu&fhmVRrTX>Z7{~3V&0UpJNEl0=N32euvDGCJ>#6dUSi&PxFW*s zS`}TB>?}H(T2lxBJ!V#2taV;q%zd6fOr=SGHpoSG*4PDaiG0pdb5`jelVipkEk%FV zThLc@Hc_AL1#D&T4D=w@UezYNJ%0=f3iVRuVL5H?eeZM}4W*bomebEU@e2d`M<~uW zf#Bugwf`VezG|^Qbt6R_=U0}|=k;mIIakz99*>FrsQR{0aQRP6ko?5<7bkDN8evZ& zB@_KqQG?ErKL=1*ZM9_5?Pq%lcS4uLSzN(Mr5=t6xHLS~Ym`UgM@D&VNu8e?_=nSFtF$u@hpPSmI4Vo_t&v?>$~K4y(O~Rb*(MFy_igM7 z*~yYUyR6yQgzWnWMUgDov!!g=lInM+=lOmOk4L`O?{i&qxy&D*_qorRbDwj6?)!ef z#JLd7F6Z2I$S0iYI={rZNk*<{HtIl^mx=h>Cim*04K4+Z4IJtd*-)%6XV2(MCscPiw_a+y*?BKbTS@BZ3AUao^%Zi#PhoY9Vib4N>SE%4>=Jco0v zH_Miey{E;FkdlZSq)e<{`+S3W=*ttvD#hB8w=|2aV*D=yOV}(&p%0LbEWH$&@$X3x~CiF-?ejQ*N+-M zc8zT@3iwkdRT2t(XS`d7`tJQAjRmKAhiw{WOqpuvFp`i@Q@!KMhwKgsA}%@sw8Xo5Y=F zhRJZg)O4uqNWj?V&&vth*H#je6T}}p_<>!Dr#89q@uSjWv~JuW(>FqoJ5^ho0%K?E z9?x_Q;kmcsQ@5=}z@tdljMSt9-Z3xn$k)kEjK|qXS>EfuDmu(Z8|(W?gY6-l z@R_#M8=vxKMAoi&PwnaIYw2COJM@atcgfr=zK1bvjW?9B`-+Voe$Q+H$j!1$Tjn+* z&LY<%)L@;zhnJlB^Og6I&BOR-m?{IW;tyYC%FZ!&Z>kGjHJ6cqM-F z&19n+e1=9AH1VrVeHrIzqlC`w9=*zfmrerF?JMzO&|Mmv;!4DKc(sp+jy^Dx?(8>1 zH&yS_4yL7m&GWX~mdfgH*AB4{CKo;+egw=PrvkTaoBU+P-4u?E|&!c z)DKc;>$$B6u*Zr1SjUh2)FeuWLWHl5TH(UHWkf zLs>7px!c5n;rbe^lO@qlYLzlDVp(z?6rPZel=YB)Uv&n!2{+Mb$-vQl=xKw( zve&>xYx+jW_NJh!FV||r?;hdP*jOXYcLCp>DOtJ?2S^)DkM{{Eb zS$!L$e_o0(^}n3tA1R3-$SNvgBq;DOEo}fNc|tB%%#g4RA3{|euq)p+xd3I8^4E&m zFrD%}nvG^HUAIKe9_{tXB;tl|G<%>yk6R;8L2)KUJw4yHJXUOPM>(-+jxq4R;z8H#>rnJy*)8N+$wA$^F zN+H*3t)eFEgxLw+Nw3};4WV$qj&_D`%ADV2%r zJCPCo%{=z7;`F98(us5JnT(G@sKTZ^;2FVitXyLe-S5(hV&Ium+1pIUB(CZ#h|g)u zSLJJ<@HgrDiA-}V_6B^x1>c9B6%~847JkQ!^KLZ2skm;q*edo;UA)~?SghG8;QbHh z_6M;ouo_1rq9=x$<`Y@EA{C%6-pEV}B(1#sDoe_e1s3^Y>n#1Sw;N|}8D|s|VPd+g z-_$QhCz`vLxxrVMx3ape1xu3*wjx=yKSlM~nFgkNWb4?DDr*!?U)L_VeffF<+!j|b zZ$Wn2$TDv3C3V@BHpSgv3JUif8%hk%OsGZ=OxH@8&4`bbf$`aAMchl^qN>Eyu3JH} z9-S!x8-s4fE=lad%Pkp8hAs~u?|uRnL48O|;*DEU! zuS0{cpk%1E0nc__2%;apFsTm0bKtd&A0~S3Cj^?72-*Owk3V!ZG*PswDfS~}2<8le z5+W^`Y(&R)yVF*tU_s!XMcJS`;(Tr`J0%>p=Z&InR%D3@KEzzI+-2)HK zuoNZ&o=wUC&+*?ofPb0a(E6(<2Amd6%uSu_^-<1?hsxs~0K5^f(LsGqgEF^+0_H=uNk9S0bb!|O8d?m5gQjUKevPaO+*VfSn^2892K~%crWM8+6 z25@V?Y@J<9w%@NXh-2!}SK_(X)O4AM1-WTg>sj1{lj5@=q&dxE^9xng1_z9w9DK>| z6Iybcd0e zyi;Ew!KBRIfGPGytQ6}z}MeXCfLY0?9%RiyagSp_D1?N&c{ zyo>VbJ4Gy`@Fv+5cKgUgs~na$>BV{*em7PU3%lloy_aEovR+J7TfQKh8BJXyL6|P8un-Jnq(ghd!_HEOh$zlv2$~y3krgeH;9zC}V3f`uDtW(%mT#944DQa~^8ZI+zAUu4U(j0YcDfKR$bK#gvn_{JZ>|gZ5+)u?T$w7Q%F^;!Wk?G z(le7r!ufT*cxS}PR6hIVtXa)i`d$-_1KkyBU>qmgz-=T};uxx&sKgv48akIWQ89F{ z0XiY?WM^~;|T8zBOr zs#zuOONzH?svv*jokd5SK8wG>+yMC)LYL|vLqm^PMHcT=`}V$=nIRHe2?h)8WQa6O zPAU}d`1y(>kZiP~Gr=mtJLMu`i<2CspL|q2DqAgAD^7*$xzM`PU4^ga`ilE134XBQ z99P(LhHU@7qvl9Yzg$M`+dlS=x^(m-_3t|h>S}E0bcFMn=C|KamQ)=w2^e)35p`zY zRV8X?d;s^>Cof2SPR&nP3E+-LCkS0J$H!eh8~k0qo$}00b=7!H_I2O+Ro@3O$nPdm ztmbOO^B+IHzQ5w>@@@J4cKw5&^_w6s!s=H%&byAbUtczPQ7}wfTqxxtQNfn*u73Qw zGuWsrky_ajPx-5`R<)6xHf>C(oqGf_Fw|-U*GfS?xLML$kv;h_pZ@Kk$y0X(S+K80 z6^|z)*`5VUkawg}=z`S;VhZhxyDfrE0$(PMurAxl~<>lfZa>JZ288ULK7D` zl9|#L^JL}Y$j*j`0-K6kH#?bRmg#5L3iB4Z)%iF@SqT+Lp|{i`m%R-|ZE94Np7Pa5 zCqC^V3}B(FR340pmF*qaa}M}+h6}mqE~7Sh!9bDv9YRT|>vBNAqv09zXHMlcuhKD| zcjjA(b*XCIwJ33?CB!+;{)vX@9xns_b-VO{i0y?}{!sdXj1GM8+$#v>W7nw;+O_9B z_{4L;C6ol?(?W0<6taGEn1^uG=?Q3i29sE`RfYCaV$3DKc_;?HsL?D_fSYg}SuO5U zOB_f4^vZ_x%o`5|C@9C5+o=mFy@au{s)sKw!UgC&L35aH(sgDxRE2De%(%OT=VUdN ziVLEmdOvJ&5*tCMKRyXctCwQu_RH%;m*$YK&m;jtbdH#Ak~13T1^f89tn`A%QEHWs~jnY~E}p_Z$XC z=?YXLCkzVSK+Id`xZYTegb@W8_baLt-Fq`Tv|=)JPbFsKRm)4UW;yT+J`<)%#ue9DPOkje)YF2fsCilK9MIIK>p*`fkoD5nGfmLwt)!KOT+> zOFq*VZktDDyM3P5UOg`~XL#cbzC}eL%qMB=Q5$d89MKuN#$6|4gx_Jt0Gfn8w&q}%lq4QU%6#jT*MRT% zrLz~C8FYKHawn-EQWN1B75O&quS+Z81(zN)G>~vN8VwC+e+y(`>HcxC{MrJ;H1Z4k zZWuv$w_F0-Ub%MVcpIc){4PGL^I7M{>;hS?;eH!;gmcOE66z3;Z1Phqo(t zVP(Hg6q#0gIKgsg7L7WE!{Y#1nI(45tx2{$34dDd#!Z0NIyrm)HOn5W#7;f4pQci# zDW!FI(g4e668kI9{2+mLwB+=#9bfqgX%!B34V-$wwSN(_cm*^{y0jQtv*4}eO^sOV z*9xoNvX)c9isB}Tgx&ZRjp3kwhTVK?r9;n!x>^XYT z@Q^7zp{rkIs{2mUSE^2!Gf6$6;j~&4=-0cSJJDizZp6LTe8b45;{AKM%v99}{{FfC zz709%u0mC=1KXTo(=TqmZQ;c?$M3z(!xah>aywrj40sc2y3rKFw4jCq+Y+u=CH@_V zxz|qeTwa>+<|H%8Dz5u>ZI5MmjTFwXS-Fv!TDd*`>3{krWoNVx$<133`(ftS?ZPyY z&4@ah^3^i`vL$BZa>O|Nt?ucewzsF)0zX3qmM^|waXr=T0pfIb0*$AwU=?Ipl|1Y; z*Pk6{C-p4MY;j@IJ|DW>QHZQJcp;Z~?8(Q+Kk3^0qJ}SCk^*n4W zu9ZFwLHUx-$6xvaQ)SUQcYd6fF8&x)V`1bIuX@>{mE$b|Yd(qomn3;bPwnDUc0F=; zh*6_((%bqAYQWQ~odER?h>1mkL4kpb3s7`0m@rDKGU*oyF)$j~Ffd4fXV$?`f~rHf zB%Y)@5SXZvfwm10RY5X?TEo)PK_`L6qgBp=#>fO49$D zDq8Ozj0q6213tV5Qq=;fZ0$|KroY{Dz=l@lU^J)?Ko@ti20TRplXzphBi>XGx4bou zEWrkNjz0t5j!_ke{g5I#PUlEU$Km8g8TE|XK=MkU@PT4T><2OVamoK;wJ}3X0L$vX zgd7gNa359*nc)R-0!`2X@FOTB`+oETOPc=ubp5R)VQgY+5BTZZJ2?9QwnO=dnulIUF3gFn;BODC2)65)HeVd%t86sL7Rv^Y+nbn+&l z6BAJY(ETvwI)Ts$aiE8rht4KD*qNyE{8{x6R|%akbTBzw;2+6Echkt+W+`u^XX z_z&x%n '} -case $link in #( -/*) app_path=$link ;; #( -*) app_path=$APP_HOME$link ;; -esac + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -# This is normally unused -# shellcheck disable=SC2034 +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" APP_BASE_NAME=${0##*/} -# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum warn () { -echo "$*" + echo "$*" } >&2 die () { -echo -echo "$*" -echo -exit 1 + echo + echo "$*" + echo + exit 1 } >&2 # OS specific support (must be 'true' or 'false'). @@ -106,10 +108,10 @@ msys=false darwin=false nonstop=false case "$( uname )" in #( -CYGWIN* ) cygwin=true ;; #( -Darwin* ) darwin=true ;; #( -MSYS* | MINGW* ) msys=true ;; #( -NONSTOP* ) nonstop=true ;; + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar @@ -117,46 +119,39 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then -if [ -x "$JAVA_HOME/jre/sh/java" ] ; then -# IBM's JDK on AIX uses strange locations for the executables -JAVACMD=$JAVA_HOME/jre/sh/java -else -JAVACMD=$JAVA_HOME/bin/java -fi -if [ ! -x "$JAVACMD" ] ; then -die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME Please set the JAVA_HOME variable in your environment to match the location of your Java installation." -fi + fi else -JAVACMD=java -if ! command -v java >/dev/null 2>&1 -then -die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi -fi # Increase the maximum file descriptors if we can. if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then -case $MAX_FD in #( -max*) -# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. -# shellcheck disable=SC2039,SC3045 -MAX_FD=$( ulimit -H -n ) || -warn "Could not query maximum file descriptor limit" -esac -case $MAX_FD in #( -'' | soft) :;; #( -*) -# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. -# shellcheck disable=SC2039,SC3045 -ulimit -n "$MAX_FD" || -warn "Could not set maximum file descriptor limit to $MAX_FD" -esac + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi # Collect all arguments for the java command, stacking in reverse order: @@ -169,56 +164,46 @@ fi # For Cygwin or MSYS, switch paths to Windows format before running java if "$cygwin" || "$msys" ; then -APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) -CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - -JAVACMD=$( cygpath --unix "$JAVACMD" ) - -# Now convert the arguments - kludge to limit ourselves to /bin/sh -for arg do -if -case $arg in #( --*) false ;; # don't mess with options #( -/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath -[ -e "$t" ] ;; #( -*) false ;; -esac -then -arg=$( cygpath --path --ignore --mixed "$arg" ) -fi -# Roll the args list around exactly as many times as the number of -# args, so each arg winds up back in the position where it started, but -# possibly modified. -# -# NB: a `for` loop captures its iteration list before it begins, so -# changing the positional parameters here affects neither the number of -# iterations, nor the values presented in `arg`. -shift # remove old arg -set -- "$@" "$arg" # push replacement arg -done + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done fi - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, -# and any embedded shellness will be escaped. -# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be -# treated as '${Hostname}' itself on the command line. +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. set -- \ -"-Dorg.gradle.appname=$APP_BASE_NAME" \ --classpath "$CLASSPATH" \ -org.gradle.wrapper.GradleWrapperMain \ -"$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then -die "xargs is not available" -fi + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" # Use "xargs" to parse quoted args. # @@ -240,10 +225,10 @@ fi # eval "set -- $( -printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | -xargs -n1 | -sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | -tr '\n' ' ' -)" '"$@"' + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' exec "$JAVACMD" "$@" diff --git a/java-client/gradlew.bat b/java-client/gradlew.bat index 25da30db..6a68175e 100644 --- a/java-client/gradlew.bat +++ b/java-client/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%"=="" @echo off +@if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,8 +25,7 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused +if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -34,20 +33,20 @@ set APP_HOME=%DIRNAME% for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" +set DEFAULT_JVM_OPTS=-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute +if "%ERRORLEVEL%" == "0" goto execute -echo. 1>&2 -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. goto fail @@ -57,11 +56,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. 1>&2 -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. goto fail @@ -76,15 +75,13 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd +if "%ERRORLEVEL%"=="0" goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/java-client/pom.xml b/java-client/pom.xml index daff9e37..dbbee17e 100644 --- a/java-client/pom.xml +++ b/java-client/pom.xml @@ -50,7 +50,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.4.1 + 3.1.0 enforce-maven @@ -72,12 +72,12 @@ maven-surefire-plugin 2.22.2 - + loggerPath conf/log4j.properties - + -Xms512m -Xmx1500m methods 10 @@ -93,7 +93,7 @@ maven-dependency-plugin - 3.6.1 + 3.3.0 package @@ -124,7 +124,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.5.0 + 3.3.0 add_sources @@ -155,7 +155,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.6.3 + 3.4.1 attach-javadocs @@ -178,7 +178,7 @@ org.apache.maven.plugins maven-source-plugin - 3.3.0 + 3.2.1 attach-sources @@ -241,7 +241,7 @@ org.apache.maven.plugins maven-gpg-plugin - 3.2.1 + 3.0.1 sign-artifacts @@ -300,10 +300,16 @@ jackson-databind-nullable ${jackson-databind-nullable-version} + - jakarta.ws.rs - jakarta.ws.rs-api - ${jakarta.ws.rs-api-version} + javax.ws.rs + jsr311-api + ${jsr311-api-version} + + + javax.ws.rs + javax.ws.rs-api + ${javax.ws.rs-api-version} @@ -318,23 +324,30 @@ ${junit-platform-runner.version} test + + org.mockito + mockito-core + ${mockito-core-version} + test + 1.8 ${java.version} ${java.version} - 1.9.0 - 4.12.0 - 2.10.1 - 3.18.0 + 1.8.5 + 1.6.6 + 4.10.0 + 2.9.1 + 3.12.0 0.2.6 1.3.5 - 2.0.2 - 5.10.3 - 1.10.0 - 2.1.6 + 5.9.1 + 1.9.1 + 3.12.4 + 2.1.1 1.1.1 UTF-8 - 2.43.0 + 2.27.2 diff --git a/java-client/settings.gradle b/java-client/settings.gradle index 22c89423..c6fad06e 100644 --- a/java-client/settings.gradle +++ b/java-client/settings.gradle @@ -1 +1 @@ -rootProject.name = "apollo-openapi-client" \ No newline at end of file +rootProject.name = "apollo-openapi-client" diff --git a/java-client/src/main/java/org/openapitools/client/ApiCallback.java b/java-client/src/main/java/org/openapitools/client/ApiCallback.java index 0dbf42f3..d6ab02f5 100644 --- a/java-client/src/main/java/org/openapitools/client/ApiCallback.java +++ b/java-client/src/main/java/org/openapitools/client/ApiCallback.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 diff --git a/java-client/src/main/java/org/openapitools/client/ApiClient.java b/java-client/src/main/java/org/openapitools/client/ApiClient.java index 78980943..f5f8e273 100644 --- a/java-client/src/main/java/org/openapitools/client/ApiClient.java +++ b/java-client/src/main/java/org/openapitools/client/ApiClient.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -47,7 +47,6 @@ import java.util.*; import java.util.Map.Entry; import java.util.concurrent.TimeUnit; -import java.util.function.Supplier; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -61,7 +60,7 @@ */ public class ApiClient { - protected String basePath = "http://localhost"; + private String basePath = "http://localhost"; protected List servers = new ArrayList(Arrays.asList( new ServerConfiguration( "", @@ -71,26 +70,26 @@ public class ApiClient { )); protected Integer serverIndex = 0; protected Map serverVariables = null; - protected boolean debugging = false; - protected Map defaultHeaderMap = new HashMap(); - protected Map defaultCookieMap = new HashMap(); - protected String tempFolderPath = null; + private boolean debugging = false; + private Map defaultHeaderMap = new HashMap(); + private Map defaultCookieMap = new HashMap(); + private String tempFolderPath = null; - protected Map authentications; + private Map authentications; - protected DateFormat dateFormat; - protected DateFormat datetimeFormat; - protected boolean lenientDatetimeFormat; - protected int dateLength; + private DateFormat dateFormat; + private DateFormat datetimeFormat; + private boolean lenientDatetimeFormat; + private int dateLength; - protected InputStream sslCaCert; - protected boolean verifyingSsl; - protected KeyManager[] keyManagers; + private InputStream sslCaCert; + private boolean verifyingSsl; + private KeyManager[] keyManagers; - protected OkHttpClient httpClient; - protected JSON json; + private OkHttpClient httpClient; + private JSON json; - protected HttpLoggingInterceptor loggingInterceptor; + private HttpLoggingInterceptor loggingInterceptor; /** * Basic constructor for ApiClient @@ -121,11 +120,11 @@ public ApiClient(OkHttpClient client) { authentications = Collections.unmodifiableMap(authentications); } - protected void initHttpClient() { + private void initHttpClient() { initHttpClient(Collections.emptyList()); } - protected void initHttpClient(List interceptors) { + private void initHttpClient(List interceptors) { OkHttpClient.Builder builder = new OkHttpClient.Builder(); builder.addNetworkInterceptor(getProgressInterceptor()); for (Interceptor interceptor: interceptors) { @@ -135,7 +134,7 @@ protected void initHttpClient(List interceptors) { httpClient = builder.build(); } - protected void init() { + private void init() { verifyingSsl = true; json = new JSON(); @@ -467,19 +466,6 @@ public void setAWS4Configuration(String accessKey, String secretKey, String regi throw new RuntimeException("No AWS4 authentication configured!"); } - /** - * Helper method to set credentials for AWSV4 Signature - * - * @param accessKey Access Key - * @param secretKey Secret Key - * @param sessionToken Session Token - * @param region Region - * @param service Service to access to - */ - public void setAWS4Configuration(String accessKey, String secretKey, String sessionToken, String region, String service) { - throw new RuntimeException("No AWS4 authentication configured!"); - } - /** * Set the User-Agent header's value (by adding to the default header map). * @@ -695,7 +681,7 @@ public List parameterToPair(String name, Object value) { * @param value The value of the parameter. * @return A list of {@code Pair} objects. */ - public List parameterToPairs(String collectionFormat, String name, Collection value) { + public List parameterToPairs(String collectionFormat, String name, Collection value) { List params = new ArrayList(); // preconditions @@ -735,31 +721,6 @@ public List parameterToPairs(String collectionFormat, String name, Collect return params; } - /** - * Formats the specified free-form query parameters to a list of {@code Pair} objects. - * - * @param value The free-form query parameters. - * @return A list of {@code Pair} objects. - */ - public List freeFormParameterToPairs(Object value) { - List params = new ArrayList<>(); - - // preconditions - if (value == null || !(value instanceof Map )) { - return params; - } - - @SuppressWarnings("unchecked") - final Map valuesMap = (Map) value; - - for (Map.Entry entry : valuesMap.entrySet()) { - params.add(new Pair(entry.getKey(), parameterToString(entry.getValue()))); - } - - return params; - } - - /** * Formats the specified collection path parameter to a string value. * @@ -802,7 +763,7 @@ public String collectionPathParameterToString(String collectionFormat, Collectio * @return The sanitized filename */ public String sanitizeFilename(String filename) { - return filename.replaceFirst("^.*[/\\\\]", ""); + return filename.replaceAll(".*[/\\\\]", ""); } /** @@ -912,8 +873,17 @@ public T deserialize(Response response, Type returnType) throws ApiException return (T) downloadFileFromResponse(response); } - ResponseBody respBody = response.body(); - if (respBody == null) { + String respBody; + try { + if (response.body() != null) + respBody = response.body().string(); + else + respBody = null; + } catch (IOException e) { + throw new ApiException(e); + } + + if (respBody == null || "".equals(respBody)) { return null; } @@ -922,25 +892,17 @@ public T deserialize(Response response, Type returnType) throws ApiException // ensuring a default content type contentType = "application/json"; } - try { - if (isJsonMime(contentType)) { - return JSON.deserialize(respBody.byteStream(), returnType); - } else if (returnType.equals(String.class)) { - String respBodyString = respBody.string(); - if (respBodyString.isEmpty()) { - return null; - } - // Expecting string, return the raw response body. - return (T) respBodyString; - } else { - throw new ApiException( + if (isJsonMime(contentType)) { + return JSON.deserialize(respBody, returnType); + } else if (returnType.equals(String.class)) { + // Expecting string, return the raw response body. + return (T) respBody; + } else { + throw new ApiException( "Content type \"" + contentType + "\" is not supported for type: " + returnType, response.code(), response.headers().toMultimap(), - response.body().string()); - } - } catch (IOException e) { - throw new ApiException(e); + respBody); } } @@ -1197,20 +1159,21 @@ public Call buildCall(String baseUrl, String path, String method, List que * @throws org.openapitools.client.ApiException If fail to serialize the request body object */ public Request buildRequest(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { + // aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams + List allQueryParams = new ArrayList(queryParams); + allQueryParams.addAll(collectionQueryParams); + final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams); // prepare HTTP request body RequestBody reqBody; String contentType = headerParams.get("Content-Type"); - String contentTypePure = contentType; - if (contentTypePure != null && contentTypePure.contains(";")) { - contentTypePure = contentType.substring(0, contentType.indexOf(";")); - } + if (!HttpMethod.permitsRequestBody(method)) { reqBody = null; - } else if ("application/x-www-form-urlencoded".equals(contentTypePure)) { + } else if ("application/x-www-form-urlencoded".equals(contentType)) { reqBody = buildRequestBodyFormEncoding(formParams); - } else if ("multipart/form-data".equals(contentTypePure)) { + } else if ("multipart/form-data".equals(contentType)) { reqBody = buildRequestBodyMultipart(formParams); } else if (body == null) { if ("DELETE".equals(method)) { @@ -1224,12 +1187,10 @@ public Request buildRequest(String baseUrl, String path, String method, List updatedQueryParams = new ArrayList<>(queryParams); - // update parameters with authentication settings - updateParamsForAuth(authNames, updatedQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url)); + updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url)); - final Request.Builder reqBuilder = new Request.Builder().url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams)); + final Request.Builder reqBuilder = new Request.Builder().url(url); processHeaderParams(headerParams, reqBuilder); processCookieParams(cookieParams, reqBuilder); @@ -1432,11 +1393,11 @@ public String guessContentTypeFromFile(File file) { /** * Add a Content-Disposition Header for the given key and file to the MultipartBody Builder. * - * @param mpBuilder MultipartBody.Builder + * @param mpBuilder MultipartBody.Builder * @param key The key of the Header element * @param file The file to add to the Header - */ - protected void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, File file) { + */ + private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, File file) { Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\"; filename=\"" + file.getName() + "\""); MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType)); @@ -1449,7 +1410,7 @@ protected void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String * @param key The key of the Header element * @param obj The complex object to add to the Header */ - protected void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, Object obj) { + private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, Object obj) { RequestBody requestBody; if (obj instanceof String) { requestBody = RequestBody.create((String) obj, MediaType.parse("text/plain")); @@ -1471,7 +1432,7 @@ protected void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String * Get network interceptor to add it to the httpClient to track download progress for * async requests. */ - protected Interceptor getProgressInterceptor() { + private Interceptor getProgressInterceptor() { return new Interceptor() { @Override public Response intercept(Interceptor.Chain chain) throws IOException { @@ -1492,7 +1453,7 @@ public Response intercept(Interceptor.Chain chain) throws IOException { * Apply SSL related settings to httpClient according to the current values of * verifyingSsl and sslCaCert. */ - protected void applySslSettings() { + private void applySslSettings() { try { TrustManager[] trustManagers; HostnameVerifier hostnameVerifier; @@ -1554,7 +1515,7 @@ public boolean verify(String hostname, SSLSession session) { } } - protected KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { + private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { try { KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); keyStore.load(null, password); @@ -1571,7 +1532,7 @@ protected KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityExcep * @return The string representation of the HTTP request body * @throws org.openapitools.client.ApiException If fail to serialize the request body object into a string */ - protected String requestBodyToString(RequestBody requestBody) throws ApiException { + private String requestBodyToString(RequestBody requestBody) throws ApiException { if (requestBody != null) { try { final Buffer buffer = new Buffer(); diff --git a/java-client/src/main/java/org/openapitools/client/ApiException.java b/java-client/src/main/java/org/openapitools/client/ApiException.java index a6ce6767..0b80bebf 100644 --- a/java-client/src/main/java/org/openapitools/client/ApiException.java +++ b/java-client/src/main/java/org/openapitools/client/ApiException.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -16,15 +16,14 @@ import java.util.Map; import java.util.List; +import javax.ws.rs.core.GenericType; /** *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") public class ApiException extends Exception { - private static final long serialVersionUID = 1L; - private int code = 0; private Map> responseHeaders = null; private String responseBody = null; diff --git a/java-client/src/main/java/org/openapitools/client/ApiResponse.java b/java-client/src/main/java/org/openapitools/client/ApiResponse.java index 6309771c..06253cc4 100644 --- a/java-client/src/main/java/org/openapitools/client/ApiResponse.java +++ b/java-client/src/main/java/org/openapitools/client/ApiResponse.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -59,7 +59,7 @@ public int getStatusCode() { /** *

Get the headers.

* - * @return a {@link java.util.Map} of headers + * @return a {@link java.util.Map} of headers */ public Map> getHeaders() { return headers; diff --git a/java-client/src/main/java/org/openapitools/client/Configuration.java b/java-client/src/main/java/org/openapitools/client/Configuration.java index e8861029..63f0475b 100644 --- a/java-client/src/main/java/org/openapitools/client/Configuration.java +++ b/java-client/src/main/java/org/openapitools/client/Configuration.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -13,51 +13,29 @@ package org.openapitools.client; -import java.util.Objects; -import java.util.concurrent.atomic.AtomicReference; -import java.util.function.Supplier; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") public class Configuration { - public static final String VERSION = "0.0.1"; - - private static final AtomicReference defaultApiClient = new AtomicReference<>(); - private static volatile Supplier apiClientFactory = ApiClient::new; - - /** - * Get the default API client, which would be used when creating API instances without providing an API client. - * - * @return Default API client - */ - public static ApiClient getDefaultApiClient() { - ApiClient client = defaultApiClient.get(); - if (client == null) { - client = defaultApiClient.updateAndGet(val -> { - if (val != null) { // changed by another thread - return val; - } - return apiClientFactory.get(); - }); + public static final String VERSION = "0.0.1"; + + private static ApiClient defaultApiClient = new ApiClient(); + + /** + * Get the default API client, which would be used when creating API + * instances without providing an API client. + * + * @return Default API client + */ + public static ApiClient getDefaultApiClient() { + return defaultApiClient; } - return client; - } - /** - * Set the default API client, which would be used when creating API instances without providing an API client. - * - * @param apiClient API client - */ - public static void setDefaultApiClient(ApiClient apiClient) { - defaultApiClient.set(apiClient); - } - - /** - * set the callback used to create new ApiClient objects - */ - public static void setApiClientFactory(Supplier factory) { - apiClientFactory = Objects.requireNonNull(factory); - } - - private Configuration() { - } -} \ No newline at end of file + /** + * Set the default API client, which would be used when creating API + * instances without providing an API client. + * + * @param apiClient API client + */ + public static void setDefaultApiClient(ApiClient apiClient) { + defaultApiClient = apiClient; + } +} diff --git a/java-client/src/main/java/org/openapitools/client/GzipRequestInterceptor.java b/java-client/src/main/java/org/openapitools/client/GzipRequestInterceptor.java index 2495b274..c92c7486 100644 --- a/java-client/src/main/java/org/openapitools/client/GzipRequestInterceptor.java +++ b/java-client/src/main/java/org/openapitools/client/GzipRequestInterceptor.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 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 a1179311..4c2d7301 100644 --- a/java-client/src/main/java/org/openapitools/client/JSON.java +++ b/java-client/src/main/java/org/openapitools/client/JSON.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -27,11 +27,8 @@ import okio.ByteString; import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; import java.io.StringReader; import java.lang.reflect.Type; -import java.nio.charset.StandardCharsets; import java.text.DateFormat; import java.text.ParseException; import java.text.ParsePosition; @@ -89,51 +86,41 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri return clazz; } - static { + { GsonBuilder gsonBuilder = createGson(); gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter); gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter); gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Change.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ClusterDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.EntityPairKVEntity.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.EnvClusterInfo.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ItemChangeSets.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ItemDTO.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.KVEntity.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ListItemDiffs.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ListReleaseBO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.MapString.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.MultiResponseEntity.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NamespaceGrayDelReleaseDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NamespaceIdentifier.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NamespaceReleaseDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NamespaceSyncModel.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NamespaceTextModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenAppDTO.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenAppNamespaceDTO.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenClusterDTO.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenCreateAppDTO.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenEnvClusterDTO.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenEnvClusterInfo.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenGrayReleaseRuleDTO.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenGrayReleaseRuleItemDTO.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenInstanceConfigDTO.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenInstanceDTO.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.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.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.OpenapiV1AppsGet401Response.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenapiV1AppsPost400Response.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenapiV1AppsPostRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenapiV1EnvsEnvReleasesCompareGet200Response.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReleaseDTO.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RichResponseEntity.CustomTypeAdapterFactory()); gson = gsonBuilder.create(); } @@ -199,28 +186,6 @@ public static T deserialize(String body, Type returnType) { } } - /** - * Deserialize the given JSON InputStream to a Java object. - * - * @param Type - * @param inputStream The JSON InputStream - * @param returnType The type to deserialize into - * @return The deserialized Java object - */ - @SuppressWarnings("unchecked") - public static T deserialize(InputStream inputStream, Type returnType) throws IOException { - try (InputStreamReader reader = new InputStreamReader(inputStream, StandardCharsets.UTF_8)) { - if (isLenientOnJson) { - // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) - JsonReader jsonReader = new JsonReader(reader); - jsonReader.setLenient(true); - return gson.fromJson(jsonReader, returnType); - } else { - return gson.fromJson(reader, returnType); - } - } - } - /** * Gson TypeAdapter for Byte Array type */ diff --git a/java-client/src/main/java/org/openapitools/client/Pair.java b/java-client/src/main/java/org/openapitools/client/Pair.java index 800eebb7..925570cb 100644 --- a/java-client/src/main/java/org/openapitools/client/Pair.java +++ b/java-client/src/main/java/org/openapitools/client/Pair.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -13,25 +13,45 @@ package org.openapitools.client; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") public class Pair { - private final String name; - private final String value; + private String name = ""; + private String value = ""; + + public Pair (String name, String value) { + setName(name); + setValue(value); + } + + private void setName(String name) { + if (!isValidString(name)) { + return; + } + + this.name = name; + } + + private void setValue(String value) { + if (!isValidString(value)) { + return; + } + + this.value = value; + } - public Pair(String name, String value) { - this.name = isValidString(name) ? name : ""; - this.value = isValidString(value) ? value : ""; - } + public String getName() { + return this.name; + } - public String getName() { - return this.name; - } + public String getValue() { + return this.value; + } - public String getValue() { - return this.value; - } + private boolean isValidString(String arg) { + if (arg == null) { + return false; + } - private static boolean isValidString(String arg) { - return arg != null; - } + return true; + } } diff --git a/java-client/src/main/java/org/openapitools/client/ProgressRequestBody.java b/java-client/src/main/java/org/openapitools/client/ProgressRequestBody.java index 98e80f8f..66b13dda 100644 --- a/java-client/src/main/java/org/openapitools/client/ProgressRequestBody.java +++ b/java-client/src/main/java/org/openapitools/client/ProgressRequestBody.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 diff --git a/java-client/src/main/java/org/openapitools/client/ProgressResponseBody.java b/java-client/src/main/java/org/openapitools/client/ProgressResponseBody.java index e71da885..558e9f11 100644 --- a/java-client/src/main/java/org/openapitools/client/ProgressResponseBody.java +++ b/java-client/src/main/java/org/openapitools/client/ProgressResponseBody.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 diff --git a/java-client/src/main/java/org/openapitools/client/ServerConfiguration.java b/java-client/src/main/java/org/openapitools/client/ServerConfiguration.java index 6822d841..59edc528 100644 --- a/java-client/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/java-client/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -1,16 +1,3 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - package org.openapitools.client; import java.util.Map; @@ -18,7 +5,6 @@ /** * Representing a Server configuration. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public class ServerConfiguration { public String URL; public String description; diff --git a/java-client/src/main/java/org/openapitools/client/ServerVariable.java b/java-client/src/main/java/org/openapitools/client/ServerVariable.java index dc422ff8..c2f13e21 100644 --- a/java-client/src/main/java/org/openapitools/client/ServerVariable.java +++ b/java-client/src/main/java/org/openapitools/client/ServerVariable.java @@ -1,16 +1,3 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - package org.openapitools.client; import java.util.HashSet; @@ -18,7 +5,6 @@ /** * Representing a Server Variable for server URL template substitution. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public class ServerVariable { public String description; public String defaultValue; diff --git a/java-client/src/main/java/org/openapitools/client/StringUtil.java b/java-client/src/main/java/org/openapitools/client/StringUtil.java index d6ae01f1..9f539266 100644 --- a/java-client/src/main/java/org/openapitools/client/StringUtil.java +++ b/java-client/src/main/java/org/openapitools/client/StringUtil.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). 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 7b82579c..3a2081be 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 @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -27,18 +27,17 @@ import java.io.IOException; -import org.openapitools.client.model.EnvClusterInfo; +import org.openapitools.client.model.MultiResponseEntity; import org.openapitools.client.model.OpenAppDTO; +import org.openapitools.client.model.OpenCreateAppDTO; import org.openapitools.client.model.OpenEnvClusterDTO; -import org.openapitools.client.model.OpenapiV1AppsGet401Response; -import org.openapitools.client.model.OpenapiV1AppsPost400Response; -import org.openapitools.client.model.OpenapiV1AppsPostRequest; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.ws.rs.core.GenericType; public class AppManagementApi { private ApiClient localVarApiClient; @@ -78,20 +77,20 @@ public void setCustomBaseUrl(String customBaseUrl) { } /** - * Build call for openapiV1AppsAppIdAppnamespacesNamespaceNameDelete - * @param appId (required) - * @param namespaceName (required) + * Build call for createApp + * @param openCreateAppDTO (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- + + +
Status Code Description Response Headers
200 -
200 应用创建成功 -
400 请求参数错误 -
403 权限不足 -
*/ - public okhttp3.Call openapiV1AppsAppIdAppnamespacesNamespaceNameDeleteCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createAppCall(OpenCreateAppDTO openCreateAppDTO, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -105,12 +104,10 @@ public okhttp3.Call openapiV1AppsAppIdAppnamespacesNamespaceNameDeleteCall(@java basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = openCreateAppDTO; // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); + String localVarPath = "/openapi/v1/apps"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -127,6 +124,7 @@ public okhttp3.Call openapiV1AppsAppIdAppnamespacesNamespaceNameDeleteCall(@java } final String[] localVarContentTypes = { + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -134,102 +132,98 @@ public okhttp3.Call openapiV1AppsAppIdAppnamespacesNamespaceNameDeleteCall(@java } String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdAppnamespacesNamespaceNameDeleteValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdAppnamespacesNamespaceNameDelete(Async)"); + private okhttp3.Call createAppValidateBeforeCall(OpenCreateAppDTO openCreateAppDTO, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'openCreateAppDTO' is set + if (openCreateAppDTO == null) { + throw new ApiException("Missing the required parameter 'openCreateAppDTO' when calling createApp(Async)"); } - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1AppsAppIdAppnamespacesNamespaceNameDelete(Async)"); - } - - return openapiV1AppsAppIdAppnamespacesNamespaceNameDeleteCall(appId, namespaceName, _callback); + return createAppCall(openCreateAppDTO, _callback); } /** - * 删除AppNamespace - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * @param appId (required) - * @param namespaceName (required) + * 创建应用 (original openapi) + * POST /openapi/v1/apps + * @param openCreateAppDTO (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- + + +
Status Code Description Response Headers
200 -
200 应用创建成功 -
400 请求参数错误 -
403 权限不足 -
*/ - public Object openapiV1AppsAppIdAppnamespacesNamespaceNameDelete(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String namespaceName) throws ApiException { - ApiResponse localVarResp = openapiV1AppsAppIdAppnamespacesNamespaceNameDeleteWithHttpInfo(appId, namespaceName); + public Object createApp(OpenCreateAppDTO openCreateAppDTO) throws ApiException { + ApiResponse localVarResp = createAppWithHttpInfo(openCreateAppDTO); return localVarResp.getData(); } /** - * 删除AppNamespace - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * @param appId (required) - * @param namespaceName (required) + * 创建应用 (original openapi) + * POST /openapi/v1/apps + * @param openCreateAppDTO (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- + + +
Status Code Description Response Headers
200 -
200 应用创建成功 -
400 请求参数错误 -
403 权限不足 -
*/ - public ApiResponse openapiV1AppsAppIdAppnamespacesNamespaceNameDeleteWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String namespaceName) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdAppnamespacesNamespaceNameDeleteValidateBeforeCall(appId, namespaceName, null); + public ApiResponse createAppWithHttpInfo(OpenCreateAppDTO openCreateAppDTO) throws ApiException { + okhttp3.Call localVarCall = createAppValidateBeforeCall(openCreateAppDTO, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 删除AppNamespace (asynchronously) - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * @param appId (required) - * @param namespaceName (required) + * 创建应用 (original openapi) (asynchronously) + * POST /openapi/v1/apps + * @param openCreateAppDTO (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- + + +
Status Code Description Response Headers
200 -
200 应用创建成功 -
400 请求参数错误 -
403 权限不足 -
*/ - public okhttp3.Call openapiV1AppsAppIdAppnamespacesNamespaceNameDeleteAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createAppAsync(OpenCreateAppDTO openCreateAppDTO, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdAppnamespacesNamespaceNameDeleteValidateBeforeCall(appId, namespaceName, _callback); + okhttp3.Call localVarCall = createAppValidateBeforeCall(openCreateAppDTO, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1AppsAppIdDelete - * @param appId (required) + * Build call for createAppInEnv + * @param env 环境标识,例如 DEV、FAT、UAT、PROD (required) + * @param operator 操作人用户名 (required) + * @param openAppDTO (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- - - + + +
Status Code Description Response Headers
200 应用删除成功 -
403 权限不足,需要超级管理员权限 -
404 应用不存在 -
200 应用在指定环境创建成功 -
400 请求参数错误 -
403 权限不足 -
*/ - public okhttp3.Call openapiV1AppsAppIdDeleteCall(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createAppInEnvCall(String env, String operator, OpenAppDTO openAppDTO, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -243,11 +237,11 @@ public okhttp3.Call openapiV1AppsAppIdDeleteCall(@javax.annotation.Nonnull Strin basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = openAppDTO; // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); + String localVarPath = "/openapi/v1/apps/envs/{env}" + .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -255,6 +249,10 @@ public okhttp3.Call openapiV1AppsAppIdDeleteCall(@javax.annotation.Nonnull Strin Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (operator != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); + } + final String[] localVarAccepts = { "application/json" }; @@ -264,6 +262,7 @@ public okhttp3.Call openapiV1AppsAppIdDeleteCall(@javax.annotation.Nonnull Strin } final String[] localVarContentTypes = { + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -271,99 +270,113 @@ public okhttp3.Call openapiV1AppsAppIdDeleteCall(@javax.annotation.Nonnull Strin } String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdDeleteValidateBeforeCall(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdDelete(Async)"); + private okhttp3.Call createAppInEnvValidateBeforeCall(String env, String operator, OpenAppDTO openAppDTO, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'env' is set + if (env == null) { + throw new ApiException("Missing the required parameter 'env' when calling 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 openapiV1AppsAppIdDeleteCall(appId, _callback); + return createAppInEnvCall(env, operator, openAppDTO, _callback); } /** - * 删除应用 - * DELETE /openapi/v1/apps/{appId} - * @param appId (required) - * @return OpenapiV1AppsGet401Response + * 在指定环境创建应用(new added) + * POST /openapi/v1/apps/envs/{env} + * @param env 环境标识,例如 DEV、FAT、UAT、PROD (required) + * @param operator 操作人用户名 (required) + * @param openAppDTO (required) + * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- - - + + +
Status Code Description Response Headers
200 应用删除成功 -
403 权限不足,需要超级管理员权限 -
404 应用不存在 -
200 应用在指定环境创建成功 -
400 请求参数错误 -
403 权限不足 -
*/ - public OpenapiV1AppsGet401Response openapiV1AppsAppIdDelete(@javax.annotation.Nonnull String appId) throws ApiException { - ApiResponse localVarResp = openapiV1AppsAppIdDeleteWithHttpInfo(appId); + public Object createAppInEnv(String env, String operator, OpenAppDTO openAppDTO) throws ApiException { + ApiResponse localVarResp = createAppInEnvWithHttpInfo(env, operator, openAppDTO); return localVarResp.getData(); } /** - * 删除应用 - * DELETE /openapi/v1/apps/{appId} - * @param appId (required) - * @return ApiResponse<OpenapiV1AppsGet401Response> + * 在指定环境创建应用(new added) + * POST /openapi/v1/apps/envs/{env} + * @param env 环境标识,例如 DEV、FAT、UAT、PROD (required) + * @param operator 操作人用户名 (required) + * @param openAppDTO (required) + * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- - - + + +
Status Code Description Response Headers
200 应用删除成功 -
403 权限不足,需要超级管理员权限 -
404 应用不存在 -
200 应用在指定环境创建成功 -
400 请求参数错误 -
403 权限不足 -
*/ - public ApiResponse openapiV1AppsAppIdDeleteWithHttpInfo(@javax.annotation.Nonnull String appId) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdDeleteValidateBeforeCall(appId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse createAppInEnvWithHttpInfo(String env, String operator, OpenAppDTO openAppDTO) throws ApiException { + okhttp3.Call localVarCall = createAppInEnvValidateBeforeCall(env, operator, openAppDTO, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 删除应用 (asynchronously) - * DELETE /openapi/v1/apps/{appId} - * @param appId (required) + * 在指定环境创建应用(new added) (asynchronously) + * POST /openapi/v1/apps/envs/{env} + * @param env 环境标识,例如 DEV、FAT、UAT、PROD (required) + * @param operator 操作人用户名 (required) + * @param openAppDTO (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- - - + + +
Status Code Description Response Headers
200 应用删除成功 -
403 权限不足,需要超级管理员权限 -
404 应用不存在 -
200 应用在指定环境创建成功 -
400 请求参数错误 -
403 权限不足 -
*/ - public okhttp3.Call openapiV1AppsAppIdDeleteAsync(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createAppInEnvAsync(String env, String operator, OpenAppDTO openAppDTO, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdDeleteValidateBeforeCall(appId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = createAppInEnvValidateBeforeCall(env, operator, openAppDTO, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1AppsAppIdEnvClustersGet - * @param appId (required) + * Build call for deleteApp + * @param appId 应用ID (required) + * @param operator 操作人用户名 (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 成功获取应用环境集群信息 -
200 应用删除成功 -
403 权限不足,需要超级管理员权限 -
404 应用不存在 -
*/ - public okhttp3.Call openapiV1AppsAppIdEnvClustersGetCall(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteAppCall(String appId, String operator, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -380,7 +393,7 @@ public okhttp3.Call openapiV1AppsAppIdEnvClustersGetCall(@javax.annotation.Nonnu Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/env-clusters" + String localVarPath = "/openapi/v1/apps/{appId}" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); List localVarQueryParams = new ArrayList(); @@ -389,6 +402,10 @@ public okhttp3.Call openapiV1AppsAppIdEnvClustersGetCall(@javax.annotation.Nonnu Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (operator != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); + } + final String[] localVarAccepts = { "application/json" }; @@ -405,98 +422,103 @@ public okhttp3.Call openapiV1AppsAppIdEnvClustersGetCall(@javax.annotation.Nonnu } String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdEnvClustersGetValidateBeforeCall(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteAppValidateBeforeCall(String appId, 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 openapiV1AppsAppIdEnvClustersGet(Async)"); + 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 openapiV1AppsAppIdEnvClustersGetCall(appId, _callback); + return deleteAppCall(appId, operator, _callback); } /** - * 获取应用的环境集群信息 - * GET /openapi/v1/apps/{appId}/env-clusters - * @param appId (required) - * @return List<OpenEnvClusterDTO> + * 删除应用(new added) + * DELETE /openapi/v1/apps/{appId} + * @param appId 应用ID (required) + * @param operator 操作人用户名 (required) + * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 成功获取应用环境集群信息 -
200 应用删除成功 -
403 权限不足,需要超级管理员权限 -
404 应用不存在 -
*/ - public List openapiV1AppsAppIdEnvClustersGet(@javax.annotation.Nonnull String appId) throws ApiException { - ApiResponse> localVarResp = openapiV1AppsAppIdEnvClustersGetWithHttpInfo(appId); + public Object deleteApp(String appId, String operator) throws ApiException { + ApiResponse localVarResp = deleteAppWithHttpInfo(appId, operator); return localVarResp.getData(); } /** - * 获取应用的环境集群信息 - * GET /openapi/v1/apps/{appId}/env-clusters - * @param appId (required) - * @return ApiResponse<List<OpenEnvClusterDTO>> + * 删除应用(new added) + * DELETE /openapi/v1/apps/{appId} + * @param appId 应用ID (required) + * @param operator 操作人用户名 (required) + * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 成功获取应用环境集群信息 -
200 应用删除成功 -
403 权限不足,需要超级管理员权限 -
404 应用不存在 -
*/ - public ApiResponse> openapiV1AppsAppIdEnvClustersGetWithHttpInfo(@javax.annotation.Nonnull String appId) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdEnvClustersGetValidateBeforeCall(appId, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse deleteAppWithHttpInfo(String appId, String operator) throws ApiException { + okhttp3.Call localVarCall = deleteAppValidateBeforeCall(appId, operator, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取应用的环境集群信息 (asynchronously) - * GET /openapi/v1/apps/{appId}/env-clusters - * @param appId (required) + * 删除应用(new added) (asynchronously) + * DELETE /openapi/v1/apps/{appId} + * @param appId 应用ID (required) + * @param operator 操作人用户名 (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 成功获取应用环境集群信息 -
200 应用删除成功 -
403 权限不足,需要超级管理员权限 -
404 应用不存在 -
*/ - public okhttp3.Call openapiV1AppsAppIdEnvClustersGetAsync(@javax.annotation.Nonnull String appId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call deleteAppAsync(String appId, String operator, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdEnvClustersGetValidateBeforeCall(appId, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + okhttp3.Call localVarCall = deleteAppValidateBeforeCall(appId, operator, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) + * Build call for findApps + * @param appIds 查找应用 (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 -
200 成功获取应用列表 -
401 未授权访问 -
*/ - public okhttp3.Call openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDeleteCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call findAppsCall(String appIds, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -513,11 +535,7 @@ public okhttp3.Call openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamesp Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); + String localVarPath = "/openapi/v1/apps"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -525,6 +543,10 @@ public okhttp3.Call openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamesp Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (appIds != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("appIds", appIds)); + } + final String[] localVarAccepts = { "application/json" }; @@ -541,117 +563,86 @@ public okhttp3.Call openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamesp } String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDeleteValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete(Async)"); - } - - return openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDeleteCall(appId, env, clusterName, namespaceName, _callback); + private okhttp3.Call findAppsValidateBeforeCall(String appIds, final ApiCallback _callback) throws ApiException { + return findAppsCall(appIds, _callback); } /** - * 删除关联的Namespace - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return Object + * 查找应用 (original openapi) + * POST /openapi/v1/apps + * @param appIds 查找应用 (optional) + * @return List<OpenAppDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 -
200 成功获取应用列表 -
401 未授权访问 -
*/ - public Object openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName) throws ApiException { - ApiResponse localVarResp = openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDeleteWithHttpInfo(appId, env, clusterName, namespaceName); + public List findApps(String appIds) throws ApiException { + ApiResponse> localVarResp = findAppsWithHttpInfo(appIds); return localVarResp.getData(); } /** - * 删除关联的Namespace - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return ApiResponse<Object> + * 查找应用 (original openapi) + * POST /openapi/v1/apps + * @param appIds 查找应用 (optional) + * @return ApiResponse<List<OpenAppDTO>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 -
200 成功获取应用列表 -
401 未授权访问 -
*/ - public ApiResponse openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDeleteWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDeleteValidateBeforeCall(appId, env, clusterName, namespaceName, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse> findAppsWithHttpInfo(String appIds) throws ApiException { + okhttp3.Call localVarCall = findAppsValidateBeforeCall(appIds, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 删除关联的Namespace (asynchronously) - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) + * 查找应用 (original openapi) (asynchronously) + * POST /openapi/v1/apps + * @param appIds 查找应用 (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 -
200 成功获取应用列表 -
401 未授权访问 -
*/ - public okhttp3.Call openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDeleteAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call findAppsAsync(String appIds, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDeleteValidateBeforeCall(appId, env, clusterName, namespaceName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = findAppsValidateBeforeCall(appIds, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1AppsAppIdGet - * @param appId (required) + * Build call for findAppsAuthorized * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- - + +
Status Code Description Response Headers
200 成功获取应用信息 -
404 应用不存在 -
200 成功获取授权应用列表 -
401 未授权访问 -
*/ - public okhttp3.Call openapiV1AppsAppIdGetCall(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call findAppsAuthorizedCall(final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -668,8 +659,7 @@ public okhttp3.Call openapiV1AppsAppIdGetCall(@javax.annotation.Nonnull String a Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); + String localVarPath = "/openapi/v1/apps/authorized"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -697,92 +687,80 @@ public okhttp3.Call openapiV1AppsAppIdGetCall(@javax.annotation.Nonnull String a } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdGetValidateBeforeCall(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdGet(Async)"); - } - - return openapiV1AppsAppIdGetCall(appId, _callback); + private okhttp3.Call findAppsAuthorizedValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return findAppsAuthorizedCall(_callback); } /** - * 获取单个应用信息 - * GET /openapi/v1/apps/{appId} - * @param appId (required) - * @return OpenAppDTO + * 获取当前Consumer授权的应用列表 (original openapi) + * GET /openapi/v1/apps/authorized + * @return List<OpenAppDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- - + +
Status Code Description Response Headers
200 成功获取应用信息 -
404 应用不存在 -
200 成功获取授权应用列表 -
401 未授权访问 -
*/ - public OpenAppDTO openapiV1AppsAppIdGet(@javax.annotation.Nonnull String appId) throws ApiException { - ApiResponse localVarResp = openapiV1AppsAppIdGetWithHttpInfo(appId); + public List findAppsAuthorized() throws ApiException { + ApiResponse> localVarResp = findAppsAuthorizedWithHttpInfo(); return localVarResp.getData(); } /** - * 获取单个应用信息 - * GET /openapi/v1/apps/{appId} - * @param appId (required) - * @return ApiResponse<OpenAppDTO> + * 获取当前Consumer授权的应用列表 (original openapi) + * GET /openapi/v1/apps/authorized + * @return ApiResponse<List<OpenAppDTO>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- - + +
Status Code Description Response Headers
200 成功获取应用信息 -
404 应用不存在 -
200 成功获取授权应用列表 -
401 未授权访问 -
*/ - public ApiResponse openapiV1AppsAppIdGetWithHttpInfo(@javax.annotation.Nonnull String appId) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdGetValidateBeforeCall(appId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse> findAppsAuthorizedWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = findAppsAuthorizedValidateBeforeCall(null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取单个应用信息 (asynchronously) - * GET /openapi/v1/apps/{appId} - * @param appId (required) + * 获取当前Consumer授权的应用列表 (original openapi) (asynchronously) + * GET /openapi/v1/apps/authorized * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- - + +
Status Code Description Response Headers
200 成功获取应用信息 -
404 应用不存在 -
200 成功获取授权应用列表 -
401 未授权访问 -
*/ - public okhttp3.Call openapiV1AppsAppIdGetAsync(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call findAppsAuthorizedAsync(final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdGetValidateBeforeCall(appId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = findAppsAuthorizedValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1AppsAppIdMissEnvsGet - * @param appId (required) + * Build call for findMissEnvs + * @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 - - +
Response Details
Status Code Description Response Headers
200 成功获取应用缺失的环境列表 -
404 应用不存在 -
*/ - public okhttp3.Call openapiV1AppsAppIdMissEnvsGetCall(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call findMissEnvsCall(String appId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -828,91 +806,88 @@ public okhttp3.Call openapiV1AppsAppIdMissEnvsGetCall(@javax.annotation.Nonnull } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdMissEnvsGetValidateBeforeCall(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call findMissEnvsValidateBeforeCall(String appId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdMissEnvsGet(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling findMissEnvs(Async)"); } - return openapiV1AppsAppIdMissEnvsGetCall(appId, _callback); + return findMissEnvsCall(appId, _callback); } /** - * 查找缺失的环境 + * 查找缺失的环境(new added) * GET /openapi/v1/apps/{appId}/miss_envs - * @param appId (required) - * @return List<String> + * @param appId 应用ID (required) + * @return MultiResponseEntity * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 成功获取应用缺失的环境列表 -
404 应用不存在 -
*/ - public List openapiV1AppsAppIdMissEnvsGet(@javax.annotation.Nonnull String appId) throws ApiException { - ApiResponse> localVarResp = openapiV1AppsAppIdMissEnvsGetWithHttpInfo(appId); + public MultiResponseEntity findMissEnvs(String appId) throws ApiException { + ApiResponse localVarResp = findMissEnvsWithHttpInfo(appId); return localVarResp.getData(); } /** - * 查找缺失的环境 + * 查找缺失的环境(new added) * GET /openapi/v1/apps/{appId}/miss_envs - * @param appId (required) - * @return ApiResponse<List<String>> + * @param appId 应用ID (required) + * @return ApiResponse<MultiResponseEntity> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 成功获取应用缺失的环境列表 -
404 应用不存在 -
*/ - public ApiResponse> openapiV1AppsAppIdMissEnvsGetWithHttpInfo(@javax.annotation.Nonnull String appId) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdMissEnvsGetValidateBeforeCall(appId, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse findMissEnvsWithHttpInfo(String appId) throws ApiException { + okhttp3.Call localVarCall = findMissEnvsValidateBeforeCall(appId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 查找缺失的环境 (asynchronously) + * 查找缺失的环境(new added) (asynchronously) * GET /openapi/v1/apps/{appId}/miss_envs - * @param appId (required) + * @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 - - +
Response Details
Status Code Description Response Headers
200 成功获取应用缺失的环境列表 -
404 应用不存在 -
*/ - public okhttp3.Call openapiV1AppsAppIdMissEnvsGetAsync(@javax.annotation.Nonnull String appId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call findMissEnvsAsync(String appId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdMissEnvsGetValidateBeforeCall(appId, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + okhttp3.Call localVarCall = findMissEnvsValidateBeforeCall(appId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1AppsAppIdNamespacesReleasesStatusGet + * Build call for getApp * @param appId (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 -
200 成功获取应用信息 -
404 应用不存在 -
*/ - public okhttp3.Call openapiV1AppsAppIdNamespacesReleasesStatusGetCall(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAppCall(String appId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -929,7 +904,7 @@ public okhttp3.Call openapiV1AppsAppIdNamespacesReleasesStatusGetCall(@javax.ann Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/namespaces/releases/status" + String localVarPath = "/openapi/v1/apps/{appId}" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); List localVarQueryParams = new ArrayList(); @@ -958,88 +933,87 @@ public okhttp3.Call openapiV1AppsAppIdNamespacesReleasesStatusGetCall(@javax.ann } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdNamespacesReleasesStatusGetValidateBeforeCall(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getAppValidateBeforeCall(String appId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdNamespacesReleasesStatusGet(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling getApp(Async)"); } - return openapiV1AppsAppIdNamespacesReleasesStatusGetCall(appId, _callback); + return getAppCall(appId, _callback); } /** - * 获取应用下所有Namespace的发布状态 - * GET /openapi/v1/apps/{appId}/namespaces/releases/status + * 获取单个应用信息(new added) + * GET /openapi/v1/apps/{appId} * @param appId (required) - * @return Map<String, Map<String, Boolean>> + * @return OpenAppDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 -
200 成功获取应用信息 -
404 应用不存在 -
*/ - public Map> openapiV1AppsAppIdNamespacesReleasesStatusGet(@javax.annotation.Nonnull String appId) throws ApiException { - ApiResponse>> localVarResp = openapiV1AppsAppIdNamespacesReleasesStatusGetWithHttpInfo(appId); + public OpenAppDTO getApp(String appId) throws ApiException { + ApiResponse localVarResp = getAppWithHttpInfo(appId); return localVarResp.getData(); } /** - * 获取应用下所有Namespace的发布状态 - * GET /openapi/v1/apps/{appId}/namespaces/releases/status + * 获取单个应用信息(new added) + * GET /openapi/v1/apps/{appId} * @param appId (required) - * @return ApiResponse<Map<String, Map<String, Boolean>>> + * @return ApiResponse<OpenAppDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 -
200 成功获取应用信息 -
404 应用不存在 -
*/ - public ApiResponse>> openapiV1AppsAppIdNamespacesReleasesStatusGetWithHttpInfo(@javax.annotation.Nonnull String appId) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdNamespacesReleasesStatusGetValidateBeforeCall(appId, null); - Type localVarReturnType = new TypeToken>>(){}.getType(); + public ApiResponse getAppWithHttpInfo(String appId) throws ApiException { + okhttp3.Call localVarCall = getAppValidateBeforeCall(appId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取应用下所有Namespace的发布状态 (asynchronously) - * GET /openapi/v1/apps/{appId}/namespaces/releases/status + * 获取单个应用信息(new added) (asynchronously) + * GET /openapi/v1/apps/{appId} * @param appId (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 -
200 成功获取应用信息 -
404 应用不存在 -
*/ - public okhttp3.Call openapiV1AppsAppIdNamespacesReleasesStatusGetAsync(@javax.annotation.Nonnull String appId, final ApiCallback>> _callback) throws ApiException { + public okhttp3.Call getAppAsync(String appId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdNamespacesReleasesStatusGetValidateBeforeCall(appId, _callback); - Type localVarReturnType = new TypeToken>>(){}.getType(); + okhttp3.Call localVarCall = getAppValidateBeforeCall(appId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1AppsAppIdNavtreeGet - * @param appId (required) + * Build call for getAppNavTree + * @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 - - +
Response Details
Status Code Description Response Headers
200 成功获取应用导航树 -
*/ - public okhttp3.Call openapiV1AppsAppIdNavtreeGetCall(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAppNavTreeCall(String appId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1085,91 +1059,86 @@ public okhttp3.Call openapiV1AppsAppIdNavtreeGetCall(@javax.annotation.Nonnull S } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdNavtreeGetValidateBeforeCall(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { + 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 openapiV1AppsAppIdNavtreeGet(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling getAppNavTree(Async)"); } - return openapiV1AppsAppIdNavtreeGetCall(appId, _callback); + return getAppNavTreeCall(appId, _callback); } /** - * 获取应用导航树 + * 获取应用导航树(new added) * GET /openapi/v1/apps/{appId}/navtree - * @param appId (required) - * @return List<EnvClusterInfo> + * @param appId 应用ID (required) + * @return MultiResponseEntity * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 成功获取应用导航树 -
*/ - public List openapiV1AppsAppIdNavtreeGet(@javax.annotation.Nonnull String appId) throws ApiException { - ApiResponse> localVarResp = openapiV1AppsAppIdNavtreeGetWithHttpInfo(appId); + public MultiResponseEntity getAppNavTree(String appId) throws ApiException { + ApiResponse localVarResp = getAppNavTreeWithHttpInfo(appId); return localVarResp.getData(); } /** - * 获取应用导航树 + * 获取应用导航树(new added) * GET /openapi/v1/apps/{appId}/navtree - * @param appId (required) - * @return ApiResponse<List<EnvClusterInfo>> + * @param appId 应用ID (required) + * @return ApiResponse<MultiResponseEntity> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 成功获取应用导航树 -
*/ - public ApiResponse> openapiV1AppsAppIdNavtreeGetWithHttpInfo(@javax.annotation.Nonnull String appId) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdNavtreeGetValidateBeforeCall(appId, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse getAppNavTreeWithHttpInfo(String appId) throws ApiException { + okhttp3.Call localVarCall = getAppNavTreeValidateBeforeCall(appId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取应用导航树 (asynchronously) + * 获取应用导航树(new added) (asynchronously) * GET /openapi/v1/apps/{appId}/navtree - * @param appId (required) + * @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 - - +
Response Details
Status Code Description Response Headers
200 成功获取应用导航树 -
*/ - public okhttp3.Call openapiV1AppsAppIdNavtreeGetAsync(@javax.annotation.Nonnull String appId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getAppNavTreeAsync(String appId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdNavtreeGetValidateBeforeCall(appId, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + okhttp3.Call localVarCall = getAppNavTreeValidateBeforeCall(appId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1AppsAppIdPut - * @param appId (required) - * @param openAppDTO (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 - - +
Response Details
- - - + +
Status Code Description Response Headers
200 -
400 请求参数错误 -
403 权限不足 -
200 成功获取Consumer的应用列表 -
401 未授权访问 -
*/ - public okhttp3.Call openapiV1AppsAppIdPutCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenAppDTO openAppDTO, 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[] { }; @@ -1183,11 +1152,10 @@ public okhttp3.Call openapiV1AppsAppIdPutCall(@javax.annotation.Nonnull String a basePath = null; } - Object localVarPostBody = openAppDTO; + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); + String localVarPath = "/openapi/v1/apps/by-self"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1195,6 +1163,14 @@ public okhttp3.Call openapiV1AppsAppIdPutCall(@javax.annotation.Nonnull String a 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" }; @@ -1204,7 +1180,6 @@ public okhttp3.Call openapiV1AppsAppIdPutCall(@javax.annotation.Nonnull String a } final String[] localVarContentTypes = { - "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1212,230 +1187,100 @@ public okhttp3.Call openapiV1AppsAppIdPutCall(@javax.annotation.Nonnull String a } String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdPutValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenAppDTO openAppDTO, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdPut(Async)"); + 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 'openAppDTO' is set - if (openAppDTO == null) { - throw new ApiException("Missing the required parameter 'openAppDTO' when calling openapiV1AppsAppIdPut(Async)"); + // verify the required parameter 'size' is set + if (size == null) { + throw new ApiException("Missing the required parameter 'size' when calling getAppsBySelf(Async)"); } - return openapiV1AppsAppIdPutCall(appId, openAppDTO, _callback); + return getAppsBySelfCall(page, size, _callback); } /** - * 更新应用 - * PUT /openapi/v1/apps/{appId} - * @param appId (required) - * @param openAppDTO (required) - * @return OpenAppDTO + * 获取当前Consumer的应用列表(分页)(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 - - +
Response Details
- - - + +
Status Code Description Response Headers
200 -
400 请求参数错误 -
403 权限不足 -
200 成功获取Consumer的应用列表 -
401 未授权访问 -
*/ - public OpenAppDTO openapiV1AppsAppIdPut(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenAppDTO openAppDTO) throws ApiException { - ApiResponse localVarResp = openapiV1AppsAppIdPutWithHttpInfo(appId, openAppDTO); + public List getAppsBySelf(Integer page, Integer size) throws ApiException { + ApiResponse> localVarResp = getAppsBySelfWithHttpInfo(page, size); return localVarResp.getData(); } /** - * 更新应用 - * PUT /openapi/v1/apps/{appId} - * @param appId (required) - * @param openAppDTO (required) - * @return ApiResponse<OpenAppDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 -
400 请求参数错误 -
403 权限不足 -
- */ - public ApiResponse openapiV1AppsAppIdPutWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenAppDTO openAppDTO) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdPutValidateBeforeCall(appId, openAppDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 更新应用 (asynchronously) - * PUT /openapi/v1/apps/{appId} - * @param appId (required) - * @param openAppDTO (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call openapiV1AppsAppIdPutAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenAppDTO openAppDTO, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1AppsAppIdPutValidateBeforeCall(appId, openAppDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1AppsBySelfGet - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取Consumer的应用列表 -
401 未授权访问 -
- */ - public okhttp3.Call openapiV1AppsBySelfGetCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/by-self"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsBySelfGetValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return openapiV1AppsBySelfGetCall(_callback); - - } - - /** - * 获取当前Consumer的应用列表(分页) - * GET /openapi/v1/apps/by-self - * @return List<OpenAppDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取Consumer的应用列表 -
401 未授权访问 -
- */ - public List openapiV1AppsBySelfGet() throws ApiException { - ApiResponse> localVarResp = openapiV1AppsBySelfGetWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * 获取当前Consumer的应用列表(分页) + * 获取当前Consumer的应用列表(分页)(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 - - +
Response Details
Status Code Description Response Headers
200 成功获取Consumer的应用列表 -
401 未授权访问 -
*/ - public ApiResponse> openapiV1AppsBySelfGetWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsBySelfGetValidateBeforeCall(null); + 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); } /** - * 获取当前Consumer的应用列表(分页) (asynchronously) + * 获取当前Consumer的应用列表(分页)(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 - - +
Response Details
Status Code Description Response Headers
200 成功获取Consumer的应用列表 -
401 未授权访问 -
*/ - public okhttp3.Call openapiV1AppsBySelfGetAsync(final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getAppsBySelfAsync(Integer page, Integer size, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsBySelfGetValidateBeforeCall(_callback); + okhttp3.Call localVarCall = getAppsBySelfValidateBeforeCall(page, size, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1AppsEnvsEnvPost - * @param env (required) - * @param openAppDTO (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 - - +
Response Details
- - - + +
Status Code Description Response Headers
200 应用在指定环境创建成功 -
400 请求参数错误 -
403 权限不足 -
200 成功获取应用环境集群信息 -
404 应用不存在 -
*/ - public okhttp3.Call openapiV1AppsEnvsEnvPostCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull OpenAppDTO openAppDTO, 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[] { }; @@ -1449,11 +1294,11 @@ public okhttp3.Call openapiV1AppsEnvsEnvPostCall(@javax.annotation.Nonnull Strin basePath = null; } - Object localVarPostBody = openAppDTO; + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/apps/envs/{env}" - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())); + String localVarPath = "/openapi/v1/apps/{appId}/envclusters" + .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1470,7 +1315,6 @@ public okhttp3.Call openapiV1AppsEnvsEnvPostCall(@javax.annotation.Nonnull Strin } final String[] localVarContentTypes = { - "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1478,107 +1322,95 @@ public okhttp3.Call openapiV1AppsEnvsEnvPostCall(@javax.annotation.Nonnull Strin } String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsEnvsEnvPostValidateBeforeCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull OpenAppDTO openAppDTO, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1AppsEnvsEnvPost(Async)"); - } - - // verify the required parameter 'openAppDTO' is set - if (openAppDTO == null) { - throw new ApiException("Missing the required parameter 'openAppDTO' when calling openapiV1AppsEnvsEnvPost(Async)"); + 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 openapiV1AppsEnvsEnvPostCall(env, openAppDTO, _callback); + return getEnvClusterInfoCall(appId, _callback); } /** - * 在指定环境创建应用 - * POST /openapi/v1/apps/envs/{env} - * @param env (required) - * @param openAppDTO (required) - * @return OpenapiV1AppsGet401Response + * 获取应用的环境集群信息 (original openapi) + * 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 * @http.response.details - - +
Response Details
- - - + +
Status Code Description Response Headers
200 应用在指定环境创建成功 -
400 请求参数错误 -
403 权限不足 -
200 成功获取应用环境集群信息 -
404 应用不存在 -
*/ - public OpenapiV1AppsGet401Response openapiV1AppsEnvsEnvPost(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull OpenAppDTO openAppDTO) throws ApiException { - ApiResponse localVarResp = openapiV1AppsEnvsEnvPostWithHttpInfo(env, openAppDTO); + public List getEnvClusterInfo(String appId) throws ApiException { + ApiResponse> localVarResp = getEnvClusterInfoWithHttpInfo(appId); return localVarResp.getData(); } /** - * 在指定环境创建应用 - * POST /openapi/v1/apps/envs/{env} - * @param env (required) - * @param openAppDTO (required) - * @return ApiResponse<OpenapiV1AppsGet401Response> + * 获取应用的环境集群信息 (original openapi) + * 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 * @http.response.details - - +
Response Details
- - - + +
Status Code Description Response Headers
200 应用在指定环境创建成功 -
400 请求参数错误 -
403 权限不足 -
200 成功获取应用环境集群信息 -
404 应用不存在 -
*/ - public ApiResponse openapiV1AppsEnvsEnvPostWithHttpInfo(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull OpenAppDTO openAppDTO) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsEnvsEnvPostValidateBeforeCall(env, openAppDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse> getEnvClusterInfoWithHttpInfo(String appId) throws ApiException { + okhttp3.Call localVarCall = getEnvClusterInfoValidateBeforeCall(appId, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 在指定环境创建应用 (asynchronously) - * POST /openapi/v1/apps/envs/{env} - * @param env (required) - * @param openAppDTO (required) + * 获取应用的环境集群信息 (original openapi) (asynchronously) + * 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 * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- - - + +
Status Code Description Response Headers
200 应用在指定环境创建成功 -
400 请求参数错误 -
403 权限不足 -
200 成功获取应用环境集群信息 -
404 应用不存在 -
*/ - public okhttp3.Call openapiV1AppsEnvsEnvPostAsync(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull OpenAppDTO openAppDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getEnvClusterInfoAsync(String appId, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsEnvsEnvPostValidateBeforeCall(env, openAppDTO, _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 openapiV1AppsGet - * @param authorized 是否只返回授权的应用 (optional) + * Build call for updateApp + * @param appId 应用ID (required) + * @param operator 操作人用户名 (required) + * @param openAppDTO (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- - + + +
Status Code Description Response Headers
200 成功获取授权应用列表 -
401 未授权访问 -
200 应用更新成功 -
400 请求参数错误 -
403 权限不足 -
*/ - public okhttp3.Call openapiV1AppsGetCall(@javax.annotation.Nullable String authorized, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateAppCall(String appId, String operator, OpenAppDTO openAppDTO, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1592,10 +1424,11 @@ public okhttp3.Call openapiV1AppsGetCall(@javax.annotation.Nullable String autho basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = openAppDTO; // create path and map variables - String localVarPath = "/openapi/v1/apps"; + String localVarPath = "/openapi/v1/apps/{appId}" + .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1603,8 +1436,8 @@ public okhttp3.Call openapiV1AppsGetCall(@javax.annotation.Nullable String autho Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (authorized != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("authorized", authorized)); + if (operator != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); } final String[] localVarAccepts = { @@ -1616,6 +1449,7 @@ public okhttp3.Call openapiV1AppsGetCall(@javax.annotation.Nullable String autho } final String[] localVarContentTypes = { + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1623,207 +1457,93 @@ public okhttp3.Call openapiV1AppsGetCall(@javax.annotation.Nullable String autho } String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsGetValidateBeforeCall(@javax.annotation.Nullable String authorized, final ApiCallback _callback) throws ApiException { - return openapiV1AppsGetCall(authorized, _callback); - - } - - /** - * 获取当前Consumer授权的应用列表 - * GET /openapi/v1/apps?authorized=true - * @param authorized 是否只返回授权的应用 (optional) - * @return List<OpenAppDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取授权应用列表 -
401 未授权访问 -
- */ - public List openapiV1AppsGet(@javax.annotation.Nullable String authorized) throws ApiException { - ApiResponse> localVarResp = openapiV1AppsGetWithHttpInfo(authorized); - return localVarResp.getData(); - } - - /** - * 获取当前Consumer授权的应用列表 - * GET /openapi/v1/apps?authorized=true - * @param authorized 是否只返回授权的应用 (optional) - * @return ApiResponse<List<OpenAppDTO>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取授权应用列表 -
401 未授权访问 -
- */ - public ApiResponse> openapiV1AppsGetWithHttpInfo(@javax.annotation.Nullable String authorized) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsGetValidateBeforeCall(authorized, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取当前Consumer授权的应用列表 (asynchronously) - * GET /openapi/v1/apps?authorized=true - * @param authorized 是否只返回授权的应用 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取授权应用列表 -
401 未授权访问 -
- */ - public okhttp3.Call openapiV1AppsGetAsync(@javax.annotation.Nullable String authorized, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1AppsGetValidateBeforeCall(authorized, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1AppsPost - * @param openapiV1AppsPostRequest (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 应用创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call openapiV1AppsPostCall(@javax.annotation.Nonnull OpenapiV1AppsPostRequest openapiV1AppsPostRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = openapiV1AppsPostRequest; - - // create path and map variables - String localVarPath = "/openapi/v1/apps"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); + private okhttp3.Call updateAppValidateBeforeCall(String appId, String operator, OpenAppDTO openAppDTO, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling updateApp(Async)"); } - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); + // verify the required parameter 'operator' is set + if (operator == null) { + throw new ApiException("Missing the required parameter 'operator' when calling updateApp(Async)"); } - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsPostValidateBeforeCall(@javax.annotation.Nonnull OpenapiV1AppsPostRequest openapiV1AppsPostRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'openapiV1AppsPostRequest' is set - if (openapiV1AppsPostRequest == null) { - throw new ApiException("Missing the required parameter 'openapiV1AppsPostRequest' when calling openapiV1AppsPost(Async)"); + // verify the required parameter 'openAppDTO' is set + if (openAppDTO == null) { + throw new ApiException("Missing the required parameter 'openAppDTO' when calling updateApp(Async)"); } - return openapiV1AppsPostCall(openapiV1AppsPostRequest, _callback); + return updateAppCall(appId, operator, openAppDTO, _callback); } /** - * 创建应用 - * POST /openapi/v1/apps - * @param openapiV1AppsPostRequest (required) + * 更新应用(new added) + * PUT /openapi/v1/apps/{appId} + * @param appId 应用ID (required) + * @param operator 操作人用户名 (required) + * @param openAppDTO (required) * @return OpenAppDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 应用创建成功 -
200 应用更新成功 -
400 请求参数错误 -
403 权限不足 -
*/ - public OpenAppDTO openapiV1AppsPost(@javax.annotation.Nonnull OpenapiV1AppsPostRequest openapiV1AppsPostRequest) throws ApiException { - ApiResponse localVarResp = openapiV1AppsPostWithHttpInfo(openapiV1AppsPostRequest); + public OpenAppDTO updateApp(String appId, String operator, OpenAppDTO openAppDTO) throws ApiException { + ApiResponse localVarResp = updateAppWithHttpInfo(appId, operator, openAppDTO); return localVarResp.getData(); } /** - * 创建应用 - * POST /openapi/v1/apps - * @param openapiV1AppsPostRequest (required) + * 更新应用(new added) + * PUT /openapi/v1/apps/{appId} + * @param appId 应用ID (required) + * @param operator 操作人用户名 (required) + * @param openAppDTO (required) * @return ApiResponse<OpenAppDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 应用创建成功 -
200 应用更新成功 -
400 请求参数错误 -
403 权限不足 -
*/ - public ApiResponse openapiV1AppsPostWithHttpInfo(@javax.annotation.Nonnull OpenapiV1AppsPostRequest openapiV1AppsPostRequest) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsPostValidateBeforeCall(openapiV1AppsPostRequest, null); + public ApiResponse updateAppWithHttpInfo(String appId, String operator, OpenAppDTO openAppDTO) throws ApiException { + okhttp3.Call localVarCall = updateAppValidateBeforeCall(appId, operator, openAppDTO, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 创建应用 (asynchronously) - * POST /openapi/v1/apps - * @param openapiV1AppsPostRequest (required) + * 更新应用(new added) (asynchronously) + * PUT /openapi/v1/apps/{appId} + * @param appId 应用ID (required) + * @param operator 操作人用户名 (required) + * @param openAppDTO (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 应用创建成功 -
200 应用更新成功 -
400 请求参数错误 -
403 权限不足 -
*/ - public okhttp3.Call openapiV1AppsPostAsync(@javax.annotation.Nonnull OpenapiV1AppsPostRequest openapiV1AppsPostRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateAppAsync(String appId, String operator, OpenAppDTO openAppDTO, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsPostValidateBeforeCall(openapiV1AppsPostRequest, _callback); + okhttp3.Call localVarCall = updateAppValidateBeforeCall(appId, operator, openAppDTO, _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 36c311b1..39c682e9 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 @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -28,14 +28,13 @@ import org.openapitools.client.model.OpenClusterDTO; -import org.openapitools.client.model.OpenNamespaceDTO; -import org.openapitools.client.model.OpenapiV1AppsGet401Response; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.ws.rs.core.GenericType; public class ClusterManagementApi { private ApiClient localVarApiClient; @@ -75,163 +74,22 @@ public void setCustomBaseUrl(String customBaseUrl) { } /** - * Build call for openapiV1AppsAppIdClustersClusterNameGet - * @param appId (required) - * @param clusterName (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取集群信息 -
404 集群不存在 -
- */ - public okhttp3.Call openapiV1AppsAppIdClustersClusterNameGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/clusters/{clusterName}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdClustersClusterNameGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdClustersClusterNameGet(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1AppsAppIdClustersClusterNameGet(Async)"); - } - - return openapiV1AppsAppIdClustersClusterNameGetCall(appId, clusterName, _callback); - - } - - /** - * 获取指定集群信息 - * GET /openapi/v1/apps/{appId}/clusters/{clusterName} - * @param appId (required) - * @param clusterName (required) - * @return OpenClusterDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取集群信息 -
404 集群不存在 -
- */ - public OpenClusterDTO openapiV1AppsAppIdClustersClusterNameGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName) throws ApiException { - ApiResponse localVarResp = openapiV1AppsAppIdClustersClusterNameGetWithHttpInfo(appId, clusterName); - return localVarResp.getData(); - } - - /** - * 获取指定集群信息 - * GET /openapi/v1/apps/{appId}/clusters/{clusterName} - * @param appId (required) - * @param clusterName (required) - * @return ApiResponse<OpenClusterDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取集群信息 -
404 集群不存在 -
- */ - public ApiResponse openapiV1AppsAppIdClustersClusterNameGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdClustersClusterNameGetValidateBeforeCall(appId, clusterName, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取指定集群信息 (asynchronously) - * GET /openapi/v1/apps/{appId}/clusters/{clusterName} - * @param appId (required) - * @param clusterName (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取集群信息 -
404 集群不存在 -
- */ - public okhttp3.Call openapiV1AppsAppIdClustersClusterNameGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1AppsAppIdClustersClusterNameGetValidateBeforeCall(appId, clusterName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1AppsAppIdClustersPost - * @param appId (required) + * Build call for createCluster + * @param appId 应用ID (required) + * @param env (required) * @param openClusterDTO (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 集群创建成功 -
400 请求参数错误 -
403 权限不足 -
*/ - public okhttp3.Call openapiV1AppsAppIdClustersPostCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenClusterDTO openClusterDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createClusterCall(String appId, String env, OpenClusterDTO openClusterDTO, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -248,8 +106,9 @@ public okhttp3.Call openapiV1AppsAppIdClustersPostCall(@javax.annotation.Nonnull Object localVarPostBody = openClusterDTO; // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/clusters" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters" + .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -278,99 +137,104 @@ public okhttp3.Call openapiV1AppsAppIdClustersPostCall(@javax.annotation.Nonnull } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdClustersPostValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenClusterDTO openClusterDTO, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createClusterValidateBeforeCall(String appId, String env, OpenClusterDTO openClusterDTO, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdClustersPost(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling createCluster(Async)"); + } + + // verify the required parameter 'env' is set + if (env == null) { + throw new ApiException("Missing the required parameter 'env' when calling createCluster(Async)"); } // verify the required parameter 'openClusterDTO' is set if (openClusterDTO == null) { - throw new ApiException("Missing the required parameter 'openClusterDTO' when calling openapiV1AppsAppIdClustersPost(Async)"); + throw new ApiException("Missing the required parameter 'openClusterDTO' when calling createCluster(Async)"); } - return openapiV1AppsAppIdClustersPostCall(appId, openClusterDTO, _callback); + return createClusterCall(appId, env, openClusterDTO, _callback); } /** - * 创建集群 - * POST /openapi/v1/apps/{appId}/clusters - * @param appId (required) + * 创建集群 (original openapi) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters + * @param appId 应用ID (required) + * @param env (required) * @param openClusterDTO (required) * @return OpenClusterDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 集群创建成功 -
400 请求参数错误 -
403 权限不足 -
*/ - public OpenClusterDTO openapiV1AppsAppIdClustersPost(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenClusterDTO openClusterDTO) throws ApiException { - ApiResponse localVarResp = openapiV1AppsAppIdClustersPostWithHttpInfo(appId, openClusterDTO); + public OpenClusterDTO createCluster(String appId, String env, OpenClusterDTO openClusterDTO) throws ApiException { + ApiResponse localVarResp = createClusterWithHttpInfo(appId, env, openClusterDTO); return localVarResp.getData(); } /** - * 创建集群 - * POST /openapi/v1/apps/{appId}/clusters - * @param appId (required) + * 创建集群 (original openapi) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters + * @param appId 应用ID (required) + * @param env (required) * @param openClusterDTO (required) * @return ApiResponse<OpenClusterDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 集群创建成功 -
400 请求参数错误 -
403 权限不足 -
*/ - public ApiResponse openapiV1AppsAppIdClustersPostWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenClusterDTO openClusterDTO) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdClustersPostValidateBeforeCall(appId, openClusterDTO, null); + public ApiResponse createClusterWithHttpInfo(String appId, String env, OpenClusterDTO openClusterDTO) throws ApiException { + okhttp3.Call localVarCall = createClusterValidateBeforeCall(appId, env, openClusterDTO, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 创建集群 (asynchronously) - * POST /openapi/v1/apps/{appId}/clusters - * @param appId (required) + * 创建集群 (original openapi) (asynchronously) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters + * @param appId 应用ID (required) + * @param env (required) * @param openClusterDTO (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 集群创建成功 -
400 请求参数错误 -
403 权限不足 -
*/ - public okhttp3.Call openapiV1AppsAppIdClustersPostAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenClusterDTO openClusterDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createClusterAsync(String appId, String env, OpenClusterDTO openClusterDTO, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdClustersPostValidateBeforeCall(appId, openClusterDTO, _callback); + okhttp3.Call localVarCall = createClusterValidateBeforeCall(appId, env, openClusterDTO, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete + * Build call for deleteCluster * @param env (required) * @param appId (required) * @param clusterName (required) + * @param operator 操作人用户名 (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
@@ -378,7 +242,7 @@ public okhttp3.Call openapiV1AppsAppIdClustersPostAsync(@javax.annotation.Nonnul
Status Code Description Response Headers
200 集群删除成功 -
400 删除失败,集群可能包含配置 -
404 集群不存在 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteClusterCall(String env, String appId, String clusterName, String operator, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -406,6 +270,10 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteCall(@java Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (operator != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); + } + final String[] localVarAccepts = { "application/json" }; @@ -426,37 +294,42 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteCall(@java } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteValidateBeforeCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteClusterValidateBeforeCall(String env, String appId, String clusterName, 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 openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling deleteCluster(Async)"); } // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling deleteCluster(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling deleteCluster(Async)"); + } + + // verify the required parameter 'operator' is set + if (operator == null) { + throw new ApiException("Missing the required parameter 'operator' when calling deleteCluster(Async)"); } - return openapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteCall(env, appId, clusterName, _callback); + return deleteClusterCall(env, appId, clusterName, operator, _callback); } /** - * 删除集群 + * 删除集群 (new added) * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} * @param env (required) * @param appId (required) * @param clusterName (required) - * @return OpenapiV1AppsGet401Response + * @param operator 操作人用户名 (required) + * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
@@ -464,22 +337,22 @@ private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteValidateB
Status Code Description Response Headers
200 集群删除成功 -
400 删除失败,集群可能包含配置 -
404 集群不存在 -
*/ - public OpenapiV1AppsGet401Response openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteWithHttpInfo(env, appId, clusterName); + public Object deleteCluster(String env, String appId, String clusterName, String operator) throws ApiException { + ApiResponse localVarResp = deleteClusterWithHttpInfo(env, appId, clusterName, operator); return localVarResp.getData(); } /** - * 删除集群 + * 删除集群 (new added) * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} * @param env (required) * @param appId (required) * @param clusterName (required) - * @return ApiResponse<OpenapiV1AppsGet401Response> + * @param operator 操作人用户名 (required) + * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
@@ -487,24 +360,24 @@ public OpenapiV1AppsGet401Response openapiV1EnvsEnvAppsAppIdClustersClusterNameD
Status Code Description Response Headers
200 集群删除成功 -
400 删除失败,集群可能包含配置 -
404 集群不存在 -
*/ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteWithHttpInfo(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteValidateBeforeCall(env, appId, clusterName, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse deleteClusterWithHttpInfo(String env, String appId, String clusterName, String operator) throws ApiException { + okhttp3.Call localVarCall = deleteClusterValidateBeforeCall(env, appId, clusterName, operator, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 删除集群 (asynchronously) + * 删除集群 (new added) (asynchronously) * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} * @param env (required) * @param appId (required) * @param clusterName (required) + * @param operator 操作人用户名 (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
@@ -512,31 +385,29 @@ public ApiResponse openapiV1EnvsEnvAppsAppIdCluster
Status Code Description Response Headers
200 集群删除成功 -
400 删除失败,集群可能包含配置 -
404 集群不存在 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteAsync(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteClusterAsync(String env, String appId, String clusterName, String operator, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteValidateBeforeCall(env, appId, clusterName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = deleteClusterValidateBeforeCall(env, appId, clusterName, operator, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet + * Build call for getCluster * @param appId (required) - * @param env (required) * @param clusterName (required) - * @param namespaceName (required) + * @param env (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- - + +
Status Code Description Response Headers
200 -
404 分支不存在 -
200 成功获取集群信息 -
404 集群不存在 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getClusterCall(String appId, String clusterName, String env, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -553,11 +424,10 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); + .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -585,268 +455,87 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getClusterValidateBeforeCall(String appId, String clusterName, String env, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling getCluster(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGetCall(appId, env, clusterName, namespaceName, _callback); - - } - - /** - * 获取命名空间分支信息 - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return OpenNamespaceDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 -
404 分支不存在 -
- */ - public OpenNamespaceDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGetWithHttpInfo(appId, env, clusterName, namespaceName); - return localVarResp.getData(); - } - - /** - * 获取命名空间分支信息 - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return ApiResponse<OpenNamespaceDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 -
404 分支不存在 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGetValidateBeforeCall(appId, env, clusterName, namespaceName, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取命名空间分支信息 (asynchronously) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 -
404 分支不存在 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGetValidateBeforeCall(appId, env, clusterName, namespaceName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param fillItemDetail (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Boolean fillItemDetail, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (fillItemDetail != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("fillItemDetail", fillItemDetail)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Boolean fillItemDetail, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling getCluster(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet(Async)"); - } - - // verify the required parameter 'fillItemDetail' is set - if (fillItemDetail == null) { - throw new ApiException("Missing the required parameter 'fillItemDetail' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling getCluster(Async)"); } - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGetCall(appId, env, clusterName, namespaceName, fillItemDetail, _callback); + return getClusterCall(appId, clusterName, env, _callback); } /** - * 获取指定的Namespace - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} + * 获取指定集群信息 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} * @param appId (required) - * @param env (required) * @param clusterName (required) - * @param namespaceName (required) - * @param fillItemDetail (required) - * @return OpenNamespaceDTO + * @param env (required) + * @return OpenClusterDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 -
200 成功获取集群信息 -
404 集群不存在 -
*/ - public OpenNamespaceDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Boolean fillItemDetail) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGetWithHttpInfo(appId, env, clusterName, namespaceName, fillItemDetail); + public OpenClusterDTO getCluster(String appId, String clusterName, String env) throws ApiException { + ApiResponse localVarResp = getClusterWithHttpInfo(appId, clusterName, env); return localVarResp.getData(); } /** - * 获取指定的Namespace - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} + * 获取指定集群信息 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} * @param appId (required) - * @param env (required) * @param clusterName (required) - * @param namespaceName (required) - * @param fillItemDetail (required) - * @return ApiResponse<OpenNamespaceDTO> + * @param env (required) + * @return ApiResponse<OpenClusterDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 -
200 成功获取集群信息 -
404 集群不存在 -
*/ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Boolean fillItemDetail) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGetValidateBeforeCall(appId, env, clusterName, namespaceName, fillItemDetail, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getClusterWithHttpInfo(String appId, String clusterName, String env) throws ApiException { + okhttp3.Call localVarCall = getClusterValidateBeforeCall(appId, clusterName, env, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取指定的Namespace (asynchronously) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} + * 获取指定集群信息 (original openapi) (asynchronously) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} * @param appId (required) - * @param env (required) * @param clusterName (required) - * @param namespaceName (required) - * @param fillItemDetail (required) + * @param env (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 -
200 成功获取集群信息 -
404 集群不存在 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Boolean fillItemDetail, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getClusterAsync(String appId, String clusterName, String env, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGetValidateBeforeCall(appId, env, clusterName, namespaceName, fillItemDetail, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getClusterValidateBeforeCall(appId, clusterName, env, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/java-client/src/main/java/org/openapitools/client/api/InstanceManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/InstanceManagementApi.java index 2ea52e7d..1e158f7d 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 @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -35,6 +35,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.ws.rs.core.GenericType; public class InstanceManagementApi { private ApiClient localVarApiClient; @@ -74,21 +75,21 @@ public void setCustomBaseUrl(String customBaseUrl) { } /** - * Build call for openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) + * Build call for getInstanceCountByNamespace + * @param env (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功返回实例数量 -
*/ - public okhttp3.Call openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getInstanceCountByNamespaceCall(String env, String appId, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -105,7 +106,8 @@ public okhttp3.Call openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceName Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances" + .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); @@ -136,108 +138,112 @@ public okhttp3.Call openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceName } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getInstanceCountByNamespaceValidateBeforeCall(String env, String appId, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'env' is set + if (env == null) { + throw new ApiException("Missing the required parameter 'env' when calling getInstanceCountByNamespace(Async)"); + } + // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling getInstanceCountByNamespace(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling getInstanceCountByNamespace(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling getInstanceCountByNamespace(Async)"); } - return openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetCall(appId, clusterName, namespaceName, _callback); + return getInstanceCountByNamespaceCall(env, appId, clusterName, namespaceName, _callback); } /** - * 获取命名空间下的实例数量 - * GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) + * 获取命名空间下的实例数量 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances + * @param env (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) * @return Integer * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功返回实例数量 -
*/ - public Integer openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName) throws ApiException { - ApiResponse localVarResp = openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetWithHttpInfo(appId, clusterName, namespaceName); + public Integer getInstanceCountByNamespace(String env, String appId, String clusterName, String namespaceName) throws ApiException { + ApiResponse localVarResp = getInstanceCountByNamespaceWithHttpInfo(env, appId, clusterName, namespaceName); return localVarResp.getData(); } /** - * 获取命名空间下的实例数量 - * GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) + * 获取命名空间下的实例数量 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances + * @param env (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) * @return ApiResponse<Integer> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功返回实例数量 -
*/ - public ApiResponse openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetValidateBeforeCall(appId, clusterName, namespaceName, null); + public ApiResponse getInstanceCountByNamespaceWithHttpInfo(String env, String appId, String clusterName, String namespaceName) throws ApiException { + okhttp3.Call localVarCall = getInstanceCountByNamespaceValidateBeforeCall(env, appId, clusterName, namespaceName, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取命名空间下的实例数量 (asynchronously) - * GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) + * 获取命名空间下的实例数量 (original openapi) (asynchronously) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances + * @param env (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功返回实例数量 -
*/ - public okhttp3.Call openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getInstanceCountByNamespaceAsync(String env, String appId, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetValidateBeforeCall(appId, clusterName, namespaceName, _callback); + okhttp3.Call localVarCall = getInstanceCountByNamespaceValidateBeforeCall(env, appId, clusterName, namespaceName, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) + * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) * @param excludeReleases 排除的发布ID列表,用逗号分隔 (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nullable String excludeReleases, final ApiCallback _callback) throws ApiException { + public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetCall(String env, String appId, String clusterName, String namespaceName, String excludeReleases, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -254,7 +260,7 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int" .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) @@ -290,97 +296,94 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetValidateBeforeCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nullable String excludeReleases, final ApiCallback _callback) throws ApiException { + private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetValidateBeforeCall(String env, String appId, String clusterName, String namespaceName, String excludeReleases, final ApiCallback _callback) throws ApiException { // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(Async)"); } // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(Async)"); } - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetCall(env, appId, clusterName, namespaceName, excludeReleases, _callback); + return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetCall(env, appId, clusterName, namespaceName, excludeReleases, _callback); } /** - * 查询不在指定发布版本中的实例 + * 查询不在指定发布版本中的实例 (new added) * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) * @param excludeReleases 排除的发布ID列表,用逗号分隔 (optional) * @return List<OpenInstanceDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 -
*/ - public List openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nullable String excludeReleases) throws ApiException { - ApiResponse> localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetWithHttpInfo(env, appId, clusterName, namespaceName, excludeReleases); + public List openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(String env, String appId, String clusterName, String namespaceName, String excludeReleases) throws ApiException { + ApiResponse> localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetWithHttpInfo(env, appId, clusterName, namespaceName, excludeReleases); 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 (required) - * @param clusterName (required) - * @param namespaceName (required) + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) * @param excludeReleases 排除的发布ID列表,用逗号分隔 (optional) * @return ApiResponse<List<OpenInstanceDTO>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 -
*/ - public ApiResponse> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetWithHttpInfo(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nullable String excludeReleases) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetValidateBeforeCall(env, appId, clusterName, namespaceName, excludeReleases, null); + public ApiResponse> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetWithHttpInfo(String env, String appId, String clusterName, String namespaceName, String excludeReleases) throws ApiException { + okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetValidateBeforeCall(env, appId, clusterName, namespaceName, excludeReleases, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 查询不在指定发布版本中的实例 (asynchronously) + * 查询不在指定发布版本中的实例 (new added) (asynchronously) * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) * @param excludeReleases 排除的发布ID列表,用逗号分隔 (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetAsync(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nullable String excludeReleases, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetAsync(String env, String appId, String clusterName, String namespaceName, String excludeReleases, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetValidateBeforeCall(env, appId, clusterName, namespaceName, excludeReleases, _callback); + okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetValidateBeforeCall(env, appId, clusterName, namespaceName, excludeReleases, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -395,13 +398,12 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 -
*/ - public okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdInstancesGetCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size, final ApiCallback _callback) throws ApiException { + public okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdInstancesGetCall(String env, Integer releaseId, Integer page, Integer size, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -456,7 +458,7 @@ public okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdInstancesGetCall(@javax.ann } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdInstancesGetValidateBeforeCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size, final ApiCallback _callback) throws ApiException { + private okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdInstancesGetValidateBeforeCall(String env, Integer releaseId, Integer page, Integer size, final ApiCallback _callback) throws ApiException { // verify the required parameter 'env' is set if (env == null) { throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet(Async)"); @@ -482,7 +484,7 @@ private okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdInstancesGetValidateBefore } /** - * 根据发布版本查询实例(支持分页) + * 根据发布版本查询实例(支持分页) (new added) * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances * @param env (required) * @param releaseId (required) @@ -491,19 +493,18 @@ private okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdInstancesGetValidateBefore * @return OpenPageDTOOpenInstanceDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 -
*/ - public OpenPageDTOOpenInstanceDTO openapiV1EnvsEnvReleasesReleaseIdInstancesGet(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size) throws ApiException { + public OpenPageDTOOpenInstanceDTO openapiV1EnvsEnvReleasesReleaseIdInstancesGet(String env, Integer releaseId, Integer page, Integer size) throws ApiException { ApiResponse localVarResp = openapiV1EnvsEnvReleasesReleaseIdInstancesGetWithHttpInfo(env, releaseId, page, size); return localVarResp.getData(); } /** - * 根据发布版本查询实例(支持分页) + * 根据发布版本查询实例(支持分页) (new added) * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances * @param env (required) * @param releaseId (required) @@ -512,20 +513,19 @@ public OpenPageDTOOpenInstanceDTO openapiV1EnvsEnvReleasesReleaseIdInstancesGet( * @return ApiResponse<OpenPageDTOOpenInstanceDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 -
*/ - public ApiResponse openapiV1EnvsEnvReleasesReleaseIdInstancesGetWithHttpInfo(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size) throws ApiException { + public ApiResponse openapiV1EnvsEnvReleasesReleaseIdInstancesGetWithHttpInfo(String env, Integer releaseId, Integer page, Integer size) throws ApiException { okhttp3.Call localVarCall = openapiV1EnvsEnvReleasesReleaseIdInstancesGetValidateBeforeCall(env, releaseId, page, size, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 根据发布版本查询实例(支持分页) (asynchronously) + * 根据发布版本查询实例(支持分页) (new added) (asynchronously) * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances * @param env (required) * @param releaseId (required) @@ -535,13 +535,12 @@ public ApiResponse openapiV1EnvsEnvReleasesReleaseId * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 -
*/ - public okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdInstancesGetAsync(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size, final ApiCallback _callback) throws ApiException { + public okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdInstancesGetAsync(String env, Integer releaseId, Integer page, Integer size, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = openapiV1EnvsEnvReleasesReleaseIdInstancesGetValidateBeforeCall(env, releaseId, page, size, _callback); Type localVarReturnType = new TypeToken(){}.getType(); 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 45c418c0..23134e04 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 @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -27,20 +27,18 @@ import java.io.IOException; -import org.openapitools.client.model.ListItemDiffs; -import org.openapitools.client.model.NamespaceSyncModel; -import org.openapitools.client.model.NamespaceTextModel; import org.openapitools.client.model.OpenItemDTO; +import org.openapitools.client.model.OpenItemDiffs; +import org.openapitools.client.model.OpenNamespaceSyncModel; +import org.openapitools.client.model.OpenNamespaceTextModel; import org.openapitools.client.model.OpenPageDTOOpenItemDTO; -import org.openapitools.client.model.OpenapiV1AppsGet401Response; -import org.openapitools.client.model.OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response; -import org.openapitools.client.model.OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.ws.rs.core.GenericType; public class ItemManagementApi { private ApiClient localVarApiClient; @@ -80,24 +78,24 @@ public void setCustomBaseUrl(String customBaseUrl) { } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete + * Build call for batchUpdateItemsByText * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param key (required) - * @param operator (required) + * @param operator 操作人用户名 (required) + * @param openNamespaceTextModel (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 -
200 批量更新配置项成功 -
403 权限不足 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDeleteCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull String operator, final ApiCallback _callback) throws ApiException { + public okhttp3.Call batchUpdateItemsByTextCall(String appId, String env, String clusterName, String namespaceName, String operator, OpenNamespaceTextModel openNamespaceTextModel, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -111,15 +109,14 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = openNamespaceTextModel; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); + .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -140,6 +137,7 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } final String[] localVarContentTypes = { + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -147,137 +145,135 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDeleteValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull String operator, final ApiCallback _callback) throws ApiException { + private okhttp3.Call batchUpdateItemsByTextValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String operator, OpenNamespaceTextModel openNamespaceTextModel, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling batchUpdateItemsByText(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling batchUpdateItemsByText(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling batchUpdateItemsByText(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete(Async)"); - } - - // verify the required parameter 'key' is set - if (key == null) { - throw new ApiException("Missing the required parameter 'key' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling batchUpdateItemsByText(Async)"); } // verify the required parameter 'operator' is set if (operator == null) { - throw new ApiException("Missing the required parameter 'operator' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete(Async)"); + throw new ApiException("Missing the required parameter 'operator' when calling batchUpdateItemsByText(Async)"); + } + + // verify the required parameter 'openNamespaceTextModel' is set + if (openNamespaceTextModel == null) { + throw new ApiException("Missing the required parameter 'openNamespaceTextModel' when calling batchUpdateItemsByText(Async)"); } - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDeleteCall(appId, env, clusterName, namespaceName, key, operator, _callback); + return batchUpdateItemsByTextCall(appId, env, clusterName, namespaceName, operator, openNamespaceTextModel, _callback); } /** - * 通过编码的key删除配置项 - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + * 通过文本批量修改配置项 (new added) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate: * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param key (required) - * @param operator (required) + * @param operator 操作人用户名 (required) + * @param openNamespaceTextModel (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 -
200 批量更新配置项成功 -
403 权限不足 -
*/ - public Object openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull String operator) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDeleteWithHttpInfo(appId, env, clusterName, namespaceName, key, operator); + public Object batchUpdateItemsByText(String appId, String env, String clusterName, String namespaceName, String operator, OpenNamespaceTextModel openNamespaceTextModel) throws ApiException { + ApiResponse localVarResp = batchUpdateItemsByTextWithHttpInfo(appId, env, clusterName, namespaceName, operator, openNamespaceTextModel); return localVarResp.getData(); } /** - * 通过编码的key删除配置项 - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + * 通过文本批量修改配置项 (new added) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate: * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param key (required) - * @param operator (required) + * @param operator 操作人用户名 (required) + * @param openNamespaceTextModel (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 -
200 批量更新配置项成功 -
403 权限不足 -
*/ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDeleteWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull String operator) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDeleteValidateBeforeCall(appId, env, clusterName, namespaceName, key, operator, null); + public ApiResponse batchUpdateItemsByTextWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String operator, OpenNamespaceTextModel openNamespaceTextModel) throws ApiException { + okhttp3.Call localVarCall = batchUpdateItemsByTextValidateBeforeCall(appId, env, clusterName, namespaceName, operator, openNamespaceTextModel, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 通过编码的key删除配置项 (asynchronously) - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + * 通过文本批量修改配置项 (new added) (asynchronously) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate: * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param key (required) - * @param operator (required) + * @param operator 操作人用户名 (required) + * @param openNamespaceTextModel (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 -
200 批量更新配置项成功 -
403 权限不足 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDeleteAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull String operator, final ApiCallback _callback) throws ApiException { + public okhttp3.Call batchUpdateItemsByTextAsync(String appId, String env, String clusterName, String namespaceName, String operator, OpenNamespaceTextModel openNamespaceTextModel, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDeleteValidateBeforeCall(appId, env, clusterName, namespaceName, key, operator, _callback); + okhttp3.Call localVarCall = batchUpdateItemsByTextValidateBeforeCall(appId, env, clusterName, namespaceName, operator, openNamespaceTextModel, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) + * Build call for compareItems + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param openNamespaceSyncModel (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- - +
Status Code Description Response Headers
200 成功获取配置项(支持编码key) -
404 配置项不存在 -
200 成功对比命名空间配置差异 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, final ApiCallback _callback) throws ApiException { + public okhttp3.Call compareItemsCall(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncModel openNamespaceSyncModel, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -291,15 +287,14 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = openNamespaceSyncModel; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); + .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -316,6 +311,7 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } final String[] localVarContentTypes = { + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -323,136 +319,127 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, final ApiCallback _callback) throws ApiException { + private okhttp3.Call compareItemsValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncModel openNamespaceSyncModel, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling compareItems(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling compareItems(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling compareItems(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling compareItems(Async)"); } - // verify the required parameter 'key' is set - if (key == null) { - throw new ApiException("Missing the required parameter 'key' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet(Async)"); + // verify the required parameter 'openNamespaceSyncModel' is set + if (openNamespaceSyncModel == null) { + throw new ApiException("Missing the required parameter 'openNamespaceSyncModel' when calling compareItems(Async)"); } - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGetCall(appId, env, clusterName, namespaceName, key, _callback); + return compareItemsCall(appId, env, clusterName, namespaceName, openNamespaceSyncModel, _callback); } /** - * 通过查询参数获取配置项(支持编码的key) - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @return OpenItemDTO + * 对比命名空间配置差异 (new added) + * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param openNamespaceSyncModel (required) + * @return List<OpenItemDiffs> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- - +
Status Code Description Response Headers
200 成功获取配置项(支持编码key) -
404 配置项不存在 -
200 成功对比命名空间配置差异 -
*/ - public OpenItemDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGetWithHttpInfo(appId, env, clusterName, namespaceName, key); + public List compareItems(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncModel openNamespaceSyncModel) throws ApiException { + ApiResponse> localVarResp = compareItemsWithHttpInfo(appId, env, clusterName, namespaceName, openNamespaceSyncModel); return localVarResp.getData(); } /** - * 通过查询参数获取配置项(支持编码的key) - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @return ApiResponse<OpenItemDTO> + * 对比命名空间配置差异 (new added) + * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param openNamespaceSyncModel (required) + * @return ApiResponse<List<OpenItemDiffs>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- - +
Status Code Description Response Headers
200 成功获取配置项(支持编码key) -
404 配置项不存在 -
200 成功对比命名空间配置差异 -
*/ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGetValidateBeforeCall(appId, env, clusterName, namespaceName, key, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse> compareItemsWithHttpInfo(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncModel openNamespaceSyncModel) throws ApiException { + okhttp3.Call localVarCall = compareItemsValidateBeforeCall(appId, env, clusterName, namespaceName, openNamespaceSyncModel, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 通过查询参数获取配置项(支持编码的key) (asynchronously) - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) + * 对比命名空间配置差异 (new added) (asynchronously) + * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param openNamespaceSyncModel (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- - +
Status Code Description Response Headers
200 成功获取配置项(支持编码key) -
404 配置项不存在 -
200 成功对比命名空间配置差异 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, final ApiCallback _callback) throws ApiException { + public okhttp3.Call compareItemsAsync(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncModel openNamespaceSyncModel, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGetValidateBeforeCall(appId, env, clusterName, namespaceName, key, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = compareItemsValidateBeforeCall(appId, env, clusterName, namespaceName, openNamespaceSyncModel, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param createIfNotExists (required) + * Build call for createItem + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (required) * @param openItemDTO (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- + -
Status Code Description Response Headers
200 配置项更新成功(编码key) -
200 配置项创建成功 -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPutCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull Boolean createIfNotExists, @javax.annotation.Nonnull OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createItemCall(String appId, String env, String clusterName, String namespaceName, String operator, OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -469,12 +456,11 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp Object localVarPostBody = openItemDTO; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); + .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -482,8 +468,8 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (createIfNotExists != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("createIfNotExists", createIfNotExists)); + if (operator != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); } final String[] localVarAccepts = { @@ -503,155 +489,139 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPutValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull Boolean createIfNotExists, @javax.annotation.Nonnull OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createItemValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String operator, OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling createItem(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling createItem(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling createItem(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(Async)"); - } - - // verify the required parameter 'key' is set - if (key == null) { - throw new ApiException("Missing the required parameter 'key' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling createItem(Async)"); } - // verify the required parameter 'createIfNotExists' is set - if (createIfNotExists == null) { - throw new ApiException("Missing the required parameter 'createIfNotExists' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(Async)"); + // verify the required parameter 'operator' is set + if (operator == null) { + throw new ApiException("Missing the required parameter 'operator' when calling createItem(Async)"); } // verify the required parameter 'openItemDTO' is set if (openItemDTO == null) { - throw new ApiException("Missing the required parameter 'openItemDTO' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(Async)"); + throw new ApiException("Missing the required parameter 'openItemDTO' when calling createItem(Async)"); } - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPutCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, _callback); + return createItemCall(appId, env, clusterName, namespaceName, operator, openItemDTO, _callback); } /** - * 通过编码的key更新配置项 - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param createIfNotExists (required) + * 创建新的配置项 (original openapi) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (required) * @param openItemDTO (required) - * @return OpenapiV1AppsGet401Response + * @return OpenItemDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- + -
Status Code Description Response Headers
200 配置项更新成功(编码key) -
200 配置项创建成功 -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
*/ - public OpenapiV1AppsGet401Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull Boolean createIfNotExists, @javax.annotation.Nonnull OpenItemDTO openItemDTO) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPutWithHttpInfo(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); + public OpenItemDTO createItem(String appId, String env, String clusterName, String namespaceName, String operator, OpenItemDTO openItemDTO) throws ApiException { + ApiResponse localVarResp = createItemWithHttpInfo(appId, env, clusterName, namespaceName, operator, openItemDTO); return localVarResp.getData(); } /** - * 通过编码的key更新配置项 - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param createIfNotExists (required) + * 创建新的配置项 (original openapi) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (required) * @param openItemDTO (required) - * @return ApiResponse<OpenapiV1AppsGet401Response> + * @return ApiResponse<OpenItemDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- + -
Status Code Description Response Headers
200 配置项更新成功(编码key) -
200 配置项创建成功 -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
*/ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPutWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull Boolean createIfNotExists, @javax.annotation.Nonnull OpenItemDTO openItemDTO) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPutValidateBeforeCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse createItemWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String operator, OpenItemDTO openItemDTO) throws ApiException { + okhttp3.Call localVarCall = createItemValidateBeforeCall(appId, env, clusterName, namespaceName, operator, openItemDTO, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 通过编码的key更新配置项 (asynchronously) - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param createIfNotExists (required) + * 创建新的配置项 (original openapi) (asynchronously) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (required) * @param openItemDTO (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- + -
Status Code Description Response Headers
200 配置项更新成功(编码key) -
200 配置项创建成功 -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPutAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull Boolean createIfNotExists, @javax.annotation.Nonnull OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createItemAsync(String appId, String env, String clusterName, String namespaceName, String operator, OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPutValidateBeforeCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = createItemValidateBeforeCall(appId, env, clusterName, namespaceName, operator, openItemDTO, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceTextModel (required) + * Build call for deleteItem + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名 (required) + * @param operator 操作人用户名 (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- - - +
Status Code Description Response Headers
200 批量更新配置项成功 -
400 请求参数错误 -
403 权限不足 -
200 配置项删除成功 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePutCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceTextModel namespaceTextModel, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteItemCall(String appId, String env, String clusterName, String namespaceName, String key, String operator, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -665,14 +635,15 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp basePath = null; } - Object localVarPostBody = namespaceTextModel; + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); + .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) + .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -680,6 +651,10 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (operator != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); + } + final String[] localVarAccepts = { "application/json" }; @@ -689,7 +664,6 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } final String[] localVarContentTypes = { - "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -697,134 +671,133 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePutValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceTextModel namespaceTextModel, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteItemValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String key, 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 openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling deleteItem(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling deleteItem(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling deleteItem(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling deleteItem(Async)"); + } + + // verify the required parameter 'key' is set + if (key == null) { + throw new ApiException("Missing the required parameter 'key' when calling deleteItem(Async)"); } - // verify the required parameter 'namespaceTextModel' is set - if (namespaceTextModel == null) { - throw new ApiException("Missing the required parameter 'namespaceTextModel' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut(Async)"); + // verify the required parameter 'operator' is set + if (operator == null) { + throw new ApiException("Missing the required parameter 'operator' when calling deleteItem(Async)"); } - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePutCall(appId, env, clusterName, namespaceName, namespaceTextModel, _callback); + return deleteItemCall(appId, env, clusterName, namespaceName, key, operator, _callback); } /** - * 通过文本批量修改配置项 - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceTextModel (required) - * @return OpenapiV1AppsGet401Response + * 删除配置项 (original openapi) + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名 (required) + * @param operator 操作人用户名 (required) + * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- - - +
Status Code Description Response Headers
200 批量更新配置项成功 -
400 请求参数错误 -
403 权限不足 -
200 配置项删除成功 -
*/ - public OpenapiV1AppsGet401Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceTextModel namespaceTextModel) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePutWithHttpInfo(appId, env, clusterName, namespaceName, namespaceTextModel); + public Object deleteItem(String appId, String env, String clusterName, String namespaceName, String key, String operator) throws ApiException { + ApiResponse localVarResp = deleteItemWithHttpInfo(appId, env, clusterName, namespaceName, key, operator); return localVarResp.getData(); } /** - * 通过文本批量修改配置项 - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceTextModel (required) - * @return ApiResponse<OpenapiV1AppsGet401Response> + * 删除配置项 (original openapi) + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名 (required) + * @param operator 操作人用户名 (required) + * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- - - +
Status Code Description Response Headers
200 批量更新配置项成功 -
400 请求参数错误 -
403 权限不足 -
200 配置项删除成功 -
*/ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePutWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceTextModel namespaceTextModel) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePutValidateBeforeCall(appId, env, clusterName, namespaceName, namespaceTextModel, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse deleteItemWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String key, String operator) throws ApiException { + okhttp3.Call localVarCall = deleteItemValidateBeforeCall(appId, env, clusterName, namespaceName, key, operator, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 通过文本批量修改配置项 (asynchronously) - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceTextModel (required) + * 删除配置项 (original openapi) (asynchronously) + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名 (required) + * @param operator 操作人用户名 (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- - - +
Status Code Description Response Headers
200 批量更新配置项成功 -
400 请求参数错误 -
403 权限不足 -
200 配置项删除成功 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePutAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceTextModel namespaceTextModel, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteItemAsync(String appId, String env, String clusterName, String namespaceName, String key, String operator, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePutValidateBeforeCall(appId, env, clusterName, namespaceName, namespaceTextModel, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = deleteItemValidateBeforeCall(appId, env, clusterName, namespaceName, key, operator, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost + * Build call for deleteItemByEncodedKey * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param namespaceSyncModel (required) + * @param key (required) + * @param operator (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 成功对比命名空间配置差异 -
200 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePostCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceSyncModel namespaceSyncModel, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteItemByEncodedKeyCall(String appId, String env, String clusterName, String namespaceName, String key, String operator, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -838,14 +811,15 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp basePath = null; } - Object localVarPostBody = namespaceSyncModel; + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); + .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) + .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -853,6 +827,10 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (operator != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); + } + final String[] localVarAccepts = { "application/json" }; @@ -862,7 +840,6 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } final String[] localVarContentTypes = { - "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -870,130 +847,134 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePostValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceSyncModel namespaceSyncModel, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteItemByEncodedKeyValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String key, 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 openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling deleteItemByEncodedKey(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling deleteItemByEncodedKey(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling deleteItemByEncodedKey(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling deleteItemByEncodedKey(Async)"); + } + + // verify the required parameter 'key' is set + if (key == null) { + throw new ApiException("Missing the required parameter 'key' when calling deleteItemByEncodedKey(Async)"); } - // verify the required parameter 'namespaceSyncModel' is set - if (namespaceSyncModel == null) { - throw new ApiException("Missing the required parameter 'namespaceSyncModel' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost(Async)"); + // verify the required parameter 'operator' is set + if (operator == null) { + throw new ApiException("Missing the required parameter 'operator' when calling deleteItemByEncodedKey(Async)"); } - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePostCall(appId, env, clusterName, namespaceName, namespaceSyncModel, _callback); + return deleteItemByEncodedKeyCall(appId, env, clusterName, namespaceName, key, operator, _callback); } /** - * 对比命名空间配置差异 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare + * 通过编码的key删除配置项 (original openapi) + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param namespaceSyncModel (required) - * @return List<ListItemDiffs> + * @param key (required) + * @param operator (required) + * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 成功对比命名空间配置差异 -
200 -
*/ - public List openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceSyncModel namespaceSyncModel) throws ApiException { - ApiResponse> localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePostWithHttpInfo(appId, env, clusterName, namespaceName, namespaceSyncModel); + public Object deleteItemByEncodedKey(String appId, String env, String clusterName, String namespaceName, String key, String operator) throws ApiException { + ApiResponse localVarResp = deleteItemByEncodedKeyWithHttpInfo(appId, env, clusterName, namespaceName, key, operator); return localVarResp.getData(); } /** - * 对比命名空间配置差异 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare + * 通过编码的key删除配置项 (original openapi) + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param namespaceSyncModel (required) - * @return ApiResponse<List<ListItemDiffs>> + * @param key (required) + * @param operator (required) + * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 成功对比命名空间配置差异 -
200 -
*/ - public ApiResponse> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePostWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceSyncModel namespaceSyncModel) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePostValidateBeforeCall(appId, env, clusterName, namespaceName, namespaceSyncModel, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse deleteItemByEncodedKeyWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String key, String operator) throws ApiException { + okhttp3.Call localVarCall = deleteItemByEncodedKeyValidateBeforeCall(appId, env, clusterName, namespaceName, key, operator, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 对比命名空间配置差异 (asynchronously) - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare + * 通过编码的key删除配置项 (original openapi) (asynchronously) + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param namespaceSyncModel (required) + * @param key (required) + * @param operator (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 成功对比命名空间配置差异 -
200 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePostAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceSyncModel namespaceSyncModel, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call deleteItemByEncodedKeyAsync(String appId, String env, String clusterName, String namespaceName, String key, String operator, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePostValidateBeforeCall(appId, env, clusterName, namespaceName, namespaceSyncModel, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + okhttp3.Call localVarCall = deleteItemByEncodedKeyValidateBeforeCall(appId, env, clusterName, namespaceName, key, operator, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (required) - * @param size (required) + * Build call for findItemsByNamespace + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 成功获取配置项列表 -
404 命名空间不存在 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size, final ApiCallback _callback) throws ApiException { + public okhttp3.Call findItemsByNamespaceCall(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1050,136 +1031,132 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size, final ApiCallback _callback) throws ApiException { + private okhttp3.Call findItemsByNamespaceValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling findItemsByNamespace(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling findItemsByNamespace(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling findItemsByNamespace(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling findItemsByNamespace(Async)"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException("Missing the required parameter 'page' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet(Async)"); + throw new ApiException("Missing the required parameter 'page' when calling findItemsByNamespace(Async)"); } // verify the required parameter 'size' is set if (size == null) { - throw new ApiException("Missing the required parameter 'size' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet(Async)"); + throw new ApiException("Missing the required parameter 'size' when calling findItemsByNamespace(Async)"); } - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGetCall(appId, env, clusterName, namespaceName, page, size, _callback); + return findItemsByNamespaceCall(appId, env, clusterName, namespaceName, page, size, _callback); } /** - * 获取命名空间下的配置项列表 - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (required) - * @param size (required) + * 获取命名空间下的配置项列表 (original openapi) + * 获取指定命名空间的配置项列表,支持分页 + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) * @return OpenPageDTOOpenItemDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 成功获取配置项列表 -
404 命名空间不存在 -
*/ - public OpenPageDTOOpenItemDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGetWithHttpInfo(appId, env, clusterName, namespaceName, page, size); + 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); return localVarResp.getData(); } /** - * 获取命名空间下的配置项列表 - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (required) - * @param size (required) + * 获取命名空间下的配置项列表 (original openapi) + * 获取指定命名空间的配置项列表,支持分页 + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) * @return ApiResponse<OpenPageDTOOpenItemDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 成功获取配置项列表 -
404 命名空间不存在 -
*/ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGetValidateBeforeCall(appId, env, clusterName, namespaceName, page, size, null); + public ApiResponse findItemsByNamespaceWithHttpInfo(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size) throws ApiException { + okhttp3.Call localVarCall = findItemsByNamespaceValidateBeforeCall(appId, env, clusterName, namespaceName, page, size, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取命名空间下的配置项列表 (asynchronously) - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (required) - * @param size (required) + * 获取命名空间下的配置项列表 (original openapi) (asynchronously) + * 获取指定命名空间的配置项列表,支持分页 + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 成功获取配置项列表 -
404 命名空间不存在 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size, final ApiCallback _callback) throws ApiException { + public okhttp3.Call findItemsByNamespaceAsync(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGetValidateBeforeCall(appId, env, clusterName, namespaceName, page, size, _callback); + okhttp3.Call localVarCall = findItemsByNamespaceValidateBeforeCall(appId, env, clusterName, namespaceName, page, size, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param operator (required) + * Build call for getBranchItems + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 -
200 成功获取分支下的配置项列表 -
404 分支不存在 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDeleteCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull String operator, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getBranchItemsCall(String appId, String env, String clusterName, String namespaceName, String branchName, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1196,12 +1173,12 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); + .replace("{" + "branchName" + "}", localVarApiClient.escapeString(branchName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1209,10 +1186,6 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - final String[] localVarAccepts = { "application/json" }; @@ -1229,137 +1202,128 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDeleteValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull String operator, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getBranchItemsValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String branchName, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling getBranchItems(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling getBranchItems(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling getBranchItems(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling getBranchItems(Async)"); } - // verify the required parameter 'key' is set - if (key == null) { - throw new ApiException("Missing the required parameter 'key' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete(Async)"); + // verify the required parameter 'branchName' is set + if (branchName == null) { + throw new ApiException("Missing the required parameter 'branchName' when calling getBranchItems(Async)"); } - // verify the required parameter 'operator' is set - if (operator == null) { - throw new ApiException("Missing the required parameter 'operator' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDeleteCall(appId, env, clusterName, namespaceName, key, operator, _callback); + return getBranchItemsCall(appId, env, clusterName, namespaceName, branchName, _callback); } /** - * 删除配置项 - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param operator (required) - * @return Object + * 获取分支下的配置项 (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @return List<OpenItemDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 -
200 成功获取分支下的配置项列表 -
404 分支不存在 -
*/ - public Object openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull String operator) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDeleteWithHttpInfo(appId, env, clusterName, namespaceName, key, operator); + public List getBranchItems(String appId, String env, String clusterName, String namespaceName, String branchName) throws ApiException { + ApiResponse> localVarResp = getBranchItemsWithHttpInfo(appId, env, clusterName, namespaceName, branchName); return localVarResp.getData(); } /** - * 删除配置项 - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param operator (required) - * @return ApiResponse<Object> + * 获取分支下的配置项 (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @return ApiResponse<List<OpenItemDTO>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 -
200 成功获取分支下的配置项列表 -
404 分支不存在 -
*/ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDeleteWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull String operator) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDeleteValidateBeforeCall(appId, env, clusterName, namespaceName, key, operator, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse> getBranchItemsWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String branchName) throws ApiException { + okhttp3.Call localVarCall = getBranchItemsValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 删除配置项 (asynchronously) - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param operator (required) + * 获取分支下的配置项 (new added) (asynchronously) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 -
200 成功获取分支下的配置项列表 -
404 分支不存在 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDeleteAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull String operator, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getBranchItemsAsync(String appId, String env, String clusterName, String namespaceName, String branchName, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDeleteValidateBeforeCall(appId, env, clusterName, namespaceName, key, operator, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getBranchItemsValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) + * Build call for getItem + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名 (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 成功获取配置项 -
404 配置项不存在 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getItemCall(String appId, String env, String clusterName, String namespaceName, String key, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1409,132 +1373,124 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getItemValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String key, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling getItem(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling getItem(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling getItem(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling getItem(Async)"); } // verify the required parameter 'key' is set if (key == null) { - throw new ApiException("Missing the required parameter 'key' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet(Async)"); + throw new ApiException("Missing the required parameter 'key' when calling getItem(Async)"); } - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGetCall(appId, env, clusterName, namespaceName, key, _callback); + return getItemCall(appId, env, clusterName, namespaceName, key, _callback); } /** - * 获取单个配置项 - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) + * 获取单个配置项 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名 (required) * @return OpenItemDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 成功获取配置项 -
404 配置项不存在 -
*/ - public OpenItemDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGetWithHttpInfo(appId, env, clusterName, namespaceName, key); + public OpenItemDTO getItem(String appId, String env, String clusterName, String namespaceName, String key) throws ApiException { + ApiResponse localVarResp = getItemWithHttpInfo(appId, env, clusterName, namespaceName, key); return localVarResp.getData(); } /** - * 获取单个配置项 - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) + * 获取单个配置项 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名 (required) * @return ApiResponse<OpenItemDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 成功获取配置项 -
404 配置项不存在 -
*/ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGetValidateBeforeCall(appId, env, clusterName, namespaceName, key, null); + public ApiResponse getItemWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String key) throws ApiException { + okhttp3.Call localVarCall = getItemValidateBeforeCall(appId, env, clusterName, namespaceName, key, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取单个配置项 (asynchronously) - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) + * 获取单个配置项 (original openapi) (asynchronously) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名 (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 成功获取配置项 -
404 配置项不存在 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getItemAsync(String appId, String env, String clusterName, String namespaceName, String key, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGetValidateBeforeCall(appId, env, clusterName, namespaceName, key, _callback); + okhttp3.Call localVarCall = getItemValidateBeforeCall(appId, env, clusterName, namespaceName, key, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut + * Build call for getItemByEncodedKey * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param createIfNotExists (required) - * @param openItemDTO (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名(需要URL编码) (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- - - +
Status Code Description Response Headers
200 配置项更新成功 -
400 请求参数错误 -
403 权限不足 -
200 成功获取配置项(支持编码key) -
404 配置项不存在 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPutCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull Boolean createIfNotExists, @javax.annotation.Nonnull OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getItemByEncodedKeyCall(String appId, String env, String clusterName, String namespaceName, String key, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1548,10 +1504,10 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp basePath = null; } - Object localVarPostBody = openItemDTO; + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) @@ -1564,10 +1520,6 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (createIfNotExists != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("createIfNotExists", createIfNotExists)); - } - final String[] localVarAccepts = { "application/json" }; @@ -1577,7 +1529,6 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } final String[] localVarContentTypes = { - "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1585,155 +1536,129 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPutValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull Boolean createIfNotExists, @javax.annotation.Nonnull OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getItemByEncodedKeyValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String key, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling getItemByEncodedKey(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling getItemByEncodedKey(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling getItemByEncodedKey(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling getItemByEncodedKey(Async)"); } // verify the required parameter 'key' is set if (key == null) { - throw new ApiException("Missing the required parameter 'key' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut(Async)"); + throw new ApiException("Missing the required parameter 'key' when calling getItemByEncodedKey(Async)"); } - // verify the required parameter 'createIfNotExists' is set - if (createIfNotExists == null) { - throw new ApiException("Missing the required parameter 'createIfNotExists' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut(Async)"); - } - - // verify the required parameter 'openItemDTO' is set - if (openItemDTO == null) { - throw new ApiException("Missing the required parameter 'openItemDTO' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPutCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, _callback); + return getItemByEncodedKeyCall(appId, env, clusterName, namespaceName, key, _callback); } /** - * 更新配置项 - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * 通过查询参数获取配置项(支持编码的key) (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param createIfNotExists (required) - * @param openItemDTO (required) - * @return OpenapiV1AppsGet401Response + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名(需要URL编码) (required) + * @return OpenItemDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- - - +
Status Code Description Response Headers
200 配置项更新成功 -
400 请求参数错误 -
403 权限不足 -
200 成功获取配置项(支持编码key) -
404 配置项不存在 -
*/ - public OpenapiV1AppsGet401Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull Boolean createIfNotExists, @javax.annotation.Nonnull OpenItemDTO openItemDTO) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPutWithHttpInfo(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); + public OpenItemDTO getItemByEncodedKey(String appId, String env, String clusterName, String namespaceName, String key) throws ApiException { + ApiResponse localVarResp = getItemByEncodedKeyWithHttpInfo(appId, env, clusterName, namespaceName, key); return localVarResp.getData(); } /** - * 更新配置项 - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * 通过查询参数获取配置项(支持编码的key) (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param createIfNotExists (required) - * @param openItemDTO (required) - * @return ApiResponse<OpenapiV1AppsGet401Response> + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名(需要URL编码) (required) + * @return ApiResponse<OpenItemDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- - - +
Status Code Description Response Headers
200 配置项更新成功 -
400 请求参数错误 -
403 权限不足 -
200 成功获取配置项(支持编码key) -
404 配置项不存在 -
*/ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPutWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull Boolean createIfNotExists, @javax.annotation.Nonnull OpenItemDTO openItemDTO) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPutValidateBeforeCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getItemByEncodedKeyWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String key) throws ApiException { + okhttp3.Call localVarCall = getItemByEncodedKeyValidateBeforeCall(appId, env, clusterName, namespaceName, key, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 更新配置项 (asynchronously) - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * 通过查询参数获取配置项(支持编码的key) (original openapi) (asynchronously) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param createIfNotExists (required) - * @param openItemDTO (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名(需要URL编码) (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- - - +
Status Code Description Response Headers
200 配置项更新成功 -
400 请求参数错误 -
403 权限不足 -
200 成功获取配置项(支持编码key) -
404 配置项不存在 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPutAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull Boolean createIfNotExists, @javax.annotation.Nonnull OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getItemByEncodedKeyAsync(String appId, String env, String clusterName, String namespaceName, String key, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPutValidateBeforeCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getItemByEncodedKeyValidateBeforeCall(appId, env, clusterName, namespaceName, key, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost + * Build call for revertItems * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param openItemDTO (required) + * @param operator 操作人用户名 (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 配置项创建成功 -
200 配置项更改撤销成功 -
400 请求参数错误 -
403 权限不足 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPostCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call revertItemsCall(String appId, String env, String clusterName, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1747,10 +1672,10 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp basePath = null; } - Object localVarPostBody = openItemDTO; + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) @@ -1762,6 +1687,10 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (operator != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); + } + final String[] localVarAccepts = { "application/json" }; @@ -1771,7 +1700,6 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } final String[] localVarContentTypes = { - "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1783,131 +1711,129 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPostValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { + private okhttp3.Call revertItemsValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling revertItems(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling revertItems(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling revertItems(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling revertItems(Async)"); } - // verify the required parameter 'openItemDTO' is set - if (openItemDTO == null) { - throw new ApiException("Missing the required parameter 'openItemDTO' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost(Async)"); + // verify the required parameter 'operator' is set + if (operator == null) { + throw new ApiException("Missing the required parameter 'operator' when calling revertItems(Async)"); } - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPostCall(appId, env, clusterName, namespaceName, openItemDTO, _callback); + return revertItemsCall(appId, env, clusterName, namespaceName, operator, _callback); } /** - * 创建新的配置项 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items + * 撤销配置项更改 (new added) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param openItemDTO (required) - * @return OpenItemDTO + * @param operator 操作人用户名 (required) + * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 配置项创建成功 -
200 配置项更改撤销成功 -
400 请求参数错误 -
403 权限不足 -
*/ - public OpenItemDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull OpenItemDTO openItemDTO) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPostWithHttpInfo(appId, env, clusterName, namespaceName, openItemDTO); + public Object revertItems(String appId, String env, String clusterName, String namespaceName, String operator) throws ApiException { + ApiResponse localVarResp = revertItemsWithHttpInfo(appId, env, clusterName, namespaceName, operator); return localVarResp.getData(); } /** - * 创建新的配置项 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items + * 撤销配置项更改 (new added) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param openItemDTO (required) - * @return ApiResponse<OpenItemDTO> + * @param operator 操作人用户名 (required) + * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 配置项创建成功 -
200 配置项更改撤销成功 -
400 请求参数错误 -
403 权限不足 -
*/ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPostWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull OpenItemDTO openItemDTO) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPostValidateBeforeCall(appId, env, clusterName, namespaceName, openItemDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse revertItemsWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String operator) throws ApiException { + okhttp3.Call localVarCall = revertItemsValidateBeforeCall(appId, env, clusterName, namespaceName, operator, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 创建新的配置项 (asynchronously) - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items + * 撤销配置项更改 (new added) (asynchronously) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param openItemDTO (required) + * @param operator 操作人用户名 (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 配置项创建成功 -
200 配置项更改撤销成功 -
400 请求参数错误 -
403 权限不足 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPostAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call revertItemsAsync(String appId, String env, String clusterName, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPostValidateBeforeCall(appId, env, clusterName, namespaceName, openItemDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = revertItemsValidateBeforeCall(appId, env, clusterName, namespaceName, operator, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost - * @param appId (required) - * @param env (required) + * Build call for syncItems + * @param appId 应用ID (required) + * @param env 环境标识 (required) * @param clusterName (required) * @param namespaceName (required) + * @param operator 操作人用户名 (required) + * @param openNamespaceSyncModel (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 配置项更改撤销成功 -
200 配置项同步成功 -
400 请求参数错误 -
403 权限不足 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPostCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call syncItemsCall(String appId, String env, String clusterName, String namespaceName, String operator, OpenNamespaceSyncModel openNamespaceSyncModel, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1921,10 +1847,10 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = openNamespaceSyncModel; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) @@ -1936,6 +1862,10 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (operator != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); + } + final String[] localVarAccepts = { "application/json" }; @@ -1945,6 +1875,7 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } final String[] localVarContentTypes = { + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1956,124 +1887,139 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPostValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { + private okhttp3.Call syncItemsValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String operator, OpenNamespaceSyncModel openNamespaceSyncModel, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling syncItems(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling syncItems(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling syncItems(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling syncItems(Async)"); } - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPostCall(appId, env, clusterName, namespaceName, _callback); + // verify the required parameter 'operator' is set + if (operator == null) { + throw new ApiException("Missing the required parameter 'operator' when calling syncItems(Async)"); + } + + // verify the required parameter 'openNamespaceSyncModel' is set + if (openNamespaceSyncModel == null) { + throw new ApiException("Missing the required parameter 'openNamespaceSyncModel' when calling syncItems(Async)"); + } + + return syncItemsCall(appId, env, clusterName, namespaceName, operator, openNamespaceSyncModel, _callback); } /** - * 撤销配置项更改 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert - * @param appId (required) - * @param env (required) + * 同步配置项到多个命名空间 (new added) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync: + * @param appId 应用ID (required) + * @param env 环境标识 (required) * @param clusterName (required) * @param namespaceName (required) - * @return OpenapiV1AppsGet401Response + * @param operator 操作人用户名 (required) + * @param openNamespaceSyncModel (required) + * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 配置项更改撤销成功 -
200 配置项同步成功 -
400 请求参数错误 -
403 权限不足 -
*/ - public OpenapiV1AppsGet401Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPostWithHttpInfo(appId, env, clusterName, namespaceName); + public Object syncItems(String appId, String env, String clusterName, String namespaceName, String operator, OpenNamespaceSyncModel openNamespaceSyncModel) throws ApiException { + ApiResponse localVarResp = syncItemsWithHttpInfo(appId, env, clusterName, namespaceName, operator, openNamespaceSyncModel); return localVarResp.getData(); } /** - * 撤销配置项更改 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert - * @param appId (required) - * @param env (required) + * 同步配置项到多个命名空间 (new added) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync: + * @param appId 应用ID (required) + * @param env 环境标识 (required) * @param clusterName (required) * @param namespaceName (required) - * @return ApiResponse<OpenapiV1AppsGet401Response> + * @param operator 操作人用户名 (required) + * @param openNamespaceSyncModel (required) + * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 配置项更改撤销成功 -
200 配置项同步成功 -
400 请求参数错误 -
403 权限不足 -
*/ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPostWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPostValidateBeforeCall(appId, env, clusterName, namespaceName, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse syncItemsWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String operator, OpenNamespaceSyncModel openNamespaceSyncModel) throws ApiException { + okhttp3.Call localVarCall = syncItemsValidateBeforeCall(appId, env, clusterName, namespaceName, operator, openNamespaceSyncModel, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 撤销配置项更改 (asynchronously) - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert - * @param appId (required) - * @param env (required) + * 同步配置项到多个命名空间 (new added) (asynchronously) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync: + * @param appId 应用ID (required) + * @param env 环境标识 (required) * @param clusterName (required) * @param namespaceName (required) + * @param operator 操作人用户名 (required) + * @param openNamespaceSyncModel (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 配置项更改撤销成功 -
200 配置项同步成功 -
400 请求参数错误 -
403 权限不足 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPostAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call syncItemsAsync(String appId, String env, String clusterName, String namespaceName, String operator, OpenNamespaceSyncModel openNamespaceSyncModel, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPostValidateBeforeCall(appId, env, clusterName, namespaceName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = syncItemsValidateBeforeCall(appId, env, clusterName, namespaceName, operator, openNamespaceSyncModel, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost + * Build call for updateItem * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceSyncModel (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key (required) + * @param createIfNotExists (required) + * @param openItemDTO (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 配置项同步成功 -
200 配置项更新成功 -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPostCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceSyncModel namespaceSyncModel, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateItemCall(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2087,14 +2033,15 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp basePath = null; } - Object localVarPostBody = namespaceSyncModel; + Object localVarPostBody = openItemDTO; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); + .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) + .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2102,6 +2049,10 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (createIfNotExists != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("createIfNotExists", createIfNotExists)); + } + final String[] localVarAccepts = { "application/json" }; @@ -2119,135 +2070,348 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPostValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceSyncModel namespaceSyncModel, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateItemValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling updateItem(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling updateItem(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling updateItem(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling updateItem(Async)"); } - // verify the required parameter 'namespaceSyncModel' is set - if (namespaceSyncModel == null) { - throw new ApiException("Missing the required parameter 'namespaceSyncModel' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost(Async)"); + // verify the required parameter 'key' is set + if (key == null) { + throw new ApiException("Missing the required parameter 'key' when calling updateItem(Async)"); } - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPostCall(appId, env, clusterName, namespaceName, namespaceSyncModel, _callback); + // verify the required parameter 'createIfNotExists' is set + if (createIfNotExists == null) { + throw new ApiException("Missing the required parameter 'createIfNotExists' when calling updateItem(Async)"); + } + + // verify the required parameter 'openItemDTO' is set + if (openItemDTO == null) { + throw new ApiException("Missing the required parameter 'openItemDTO' when calling updateItem(Async)"); + } + + return updateItemCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, _callback); } /** - * 同步配置项到多个命名空间 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync + * 更新配置项 (original openapi) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceSyncModel (required) - * @return OpenapiV1AppsGet401Response + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key (required) + * @param createIfNotExists (required) + * @param openItemDTO (required) + * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 配置项同步成功 -
200 配置项更新成功 -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
*/ - public OpenapiV1AppsGet401Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceSyncModel namespaceSyncModel) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPostWithHttpInfo(appId, env, clusterName, namespaceName, namespaceSyncModel); + public Object updateItem(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO) throws ApiException { + ApiResponse localVarResp = updateItemWithHttpInfo(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); return localVarResp.getData(); } /** - * 同步配置项到多个命名空间 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync + * 更新配置项 (original openapi) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceSyncModel (required) - * @return ApiResponse<OpenapiV1AppsGet401Response> + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key (required) + * @param createIfNotExists (required) + * @param openItemDTO (required) + * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 配置项同步成功 -
200 配置项更新成功 -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
*/ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPostWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceSyncModel namespaceSyncModel) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPostValidateBeforeCall(appId, env, clusterName, namespaceName, namespaceSyncModel, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse updateItemWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO) throws ApiException { + okhttp3.Call localVarCall = updateItemValidateBeforeCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 同步配置项到多个命名空间 (asynchronously) - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync + * 更新配置项 (original openapi) (asynchronously) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceSyncModel (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key (required) + * @param createIfNotExists (required) + * @param openItemDTO (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- + + + + +
Status Code Description Response Headers
200 配置项同步成功 -
200 配置项更新成功 -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
+ */ + public okhttp3.Call updateItemAsync(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateItemValidateBeforeCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateItemByEncodedKey + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名(需要URL编码) (required) + * @param createIfNotExists 若不存在则创建(true/false) (required) + * @param openItemDTO (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 配置项更新成功(编码key) -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
+ */ + public okhttp3.Call updateItemByEncodedKeyCall(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = openItemDTO; + + // create path and map variables + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" + .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) + .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) + .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) + .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (createIfNotExists != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("createIfNotExists", createIfNotExists)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateItemByEncodedKeyValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling updateItemByEncodedKey(Async)"); + } + + // verify the required parameter 'env' is set + if (env == null) { + throw new ApiException("Missing the required parameter 'env' when calling updateItemByEncodedKey(Async)"); + } + + // verify the required parameter 'clusterName' is set + if (clusterName == null) { + throw new ApiException("Missing the required parameter 'clusterName' when calling updateItemByEncodedKey(Async)"); + } + + // verify the required parameter 'namespaceName' is set + if (namespaceName == null) { + throw new ApiException("Missing the required parameter 'namespaceName' when calling updateItemByEncodedKey(Async)"); + } + + // verify the required parameter 'key' is set + if (key == null) { + throw new ApiException("Missing the required parameter 'key' when calling updateItemByEncodedKey(Async)"); + } + + // verify the required parameter 'createIfNotExists' is set + if (createIfNotExists == null) { + throw new ApiException("Missing the required parameter 'createIfNotExists' when calling updateItemByEncodedKey(Async)"); + } + + // verify the required parameter 'openItemDTO' is set + if (openItemDTO == null) { + throw new ApiException("Missing the required parameter 'openItemDTO' when calling updateItemByEncodedKey(Async)"); + } + + return updateItemByEncodedKeyCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, _callback); + + } + + /** + * 通过编码的key更新配置项 (original openapi) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名(需要URL编码) (required) + * @param createIfNotExists 若不存在则创建(true/false) (required) + * @param openItemDTO (required) + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 配置项更新成功(编码key) -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPostAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceSyncModel namespaceSyncModel, final ApiCallback _callback) throws ApiException { + public Object updateItemByEncodedKey(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO) throws ApiException { + ApiResponse localVarResp = updateItemByEncodedKeyWithHttpInfo(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); + return localVarResp.getData(); + } - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPostValidateBeforeCall(appId, env, clusterName, namespaceName, namespaceSyncModel, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + /** + * 通过编码的key更新配置项 (original openapi) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名(需要URL编码) (required) + * @param createIfNotExists 若不存在则创建(true/false) (required) + * @param openItemDTO (required) + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 配置项更新成功(编码key) -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
+ */ + public ApiResponse updateItemByEncodedKeyWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO) throws ApiException { + okhttp3.Call localVarCall = updateItemByEncodedKeyValidateBeforeCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * 通过编码的key更新配置项 (original openapi) (asynchronously) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名(需要URL编码) (required) + * @param createIfNotExists 若不存在则创建(true/false) (required) + * @param openItemDTO (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 配置项更新成功(编码key) -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
+ */ + public okhttp3.Call updateItemByEncodedKeyAsync(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateItemByEncodedKeyValidateBeforeCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost + * Build call for validateItems * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param namespaceTextModel (required) + * @param openNamespaceTextModel (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 配置文本语法验证通过 -
400 配置文本语法错误 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePostCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceTextModel namespaceTextModel, final ApiCallback _callback) throws ApiException { + public okhttp3.Call validateItemsCall(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2261,10 +2425,10 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp basePath = null; } - Object localVarPostBody = namespaceTextModel; + Object localVarPostBody = openNamespaceTextModel; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) @@ -2297,106 +2461,103 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePostValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceTextModel namespaceTextModel, final ApiCallback _callback) throws ApiException { + private okhttp3.Call validateItemsValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling validateItems(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling validateItems(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling validateItems(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling validateItems(Async)"); } - // verify the required parameter 'namespaceTextModel' is set - if (namespaceTextModel == null) { - throw new ApiException("Missing the required parameter 'namespaceTextModel' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost(Async)"); + // verify the required parameter 'openNamespaceTextModel' is set + if (openNamespaceTextModel == null) { + throw new ApiException("Missing the required parameter 'openNamespaceTextModel' when calling validateItems(Async)"); } - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePostCall(appId, env, clusterName, namespaceName, namespaceTextModel, _callback); + return validateItemsCall(appId, env, clusterName, namespaceName, openNamespaceTextModel, _callback); } /** - * 验证配置文本语法 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate + * 验证配置文本语法 (new added) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param namespaceTextModel (required) - * @return OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response + * @param openNamespaceTextModel (required) + * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 配置文本语法验证通过 -
400 配置文本语法错误 -
*/ - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceTextModel namespaceTextModel) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePostWithHttpInfo(appId, env, clusterName, namespaceName, namespaceTextModel); + public Object validateItems(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel) throws ApiException { + ApiResponse localVarResp = validateItemsWithHttpInfo(appId, env, clusterName, namespaceName, openNamespaceTextModel); return localVarResp.getData(); } /** - * 验证配置文本语法 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate + * 验证配置文本语法 (new added) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param namespaceTextModel (required) - * @return ApiResponse<OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response> + * @param openNamespaceTextModel (required) + * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 配置文本语法验证通过 -
400 配置文本语法错误 -
*/ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePostWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceTextModel namespaceTextModel) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePostValidateBeforeCall(appId, env, clusterName, namespaceName, namespaceTextModel, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse validateItemsWithHttpInfo(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel) throws ApiException { + okhttp3.Call localVarCall = validateItemsValidateBeforeCall(appId, env, clusterName, namespaceName, openNamespaceTextModel, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 验证配置文本语法 (asynchronously) - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate + * 验证配置文本语法 (new added) (asynchronously) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param namespaceTextModel (required) + * @param openNamespaceTextModel (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 配置文本语法验证通过 -
400 配置文本语法错误 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePostAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceTextModel namespaceTextModel, final ApiCallback _callback) throws ApiException { + public okhttp3.Call validateItemsAsync(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePostValidateBeforeCall(appId, env, clusterName, namespaceName, namespaceTextModel, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = validateItemsValidateBeforeCall(appId, env, clusterName, namespaceName, openNamespaceTextModel, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/java-client/src/main/java/org/openapitools/client/api/NamespaceBranchManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/NamespaceBranchManagementApi.java index 08b4321f..a62a6564 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 @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -27,19 +27,17 @@ import java.io.IOException; -import org.openapitools.client.model.NamespaceGrayDelReleaseDTO; import org.openapitools.client.model.NamespaceReleaseDTO; import org.openapitools.client.model.OpenGrayReleaseRuleDTO; -import org.openapitools.client.model.OpenItemDTO; import org.openapitools.client.model.OpenNamespaceDTO; import org.openapitools.client.model.OpenReleaseDTO; -import org.openapitools.client.model.OpenapiV1AppsGet401Response; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.ws.rs.core.GenericType; public class NamespaceBranchManagementApi { private ApiClient localVarApiClient; @@ -79,23 +77,22 @@ public void setCustomBaseUrl(String customBaseUrl) { } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param operator (required) + * Build call for createBranch + * @param appId app标识 (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 命名空间分支创建成功 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPostCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String operator, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createBranchCall(String appId, String env, String clusterName, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -112,7 +109,7 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) @@ -148,125 +145,121 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPostValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String operator, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createBranchValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling createBranch(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling createBranch(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling createBranch(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling createBranch(Async)"); } // verify the required parameter 'operator' is set if (operator == null) { - throw new ApiException("Missing the required parameter 'operator' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost(Async)"); + throw new ApiException("Missing the required parameter 'operator' when calling createBranch(Async)"); } - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPostCall(appId, env, clusterName, namespaceName, operator, _callback); + return createBranchCall(appId, env, clusterName, namespaceName, operator, _callback); } /** - * 创建命名空间分支 - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param operator (required) + * 创建命名空间分支 (original openapi) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches + * @param appId app标识 (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (required) * @return OpenNamespaceDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 命名空间分支创建成功 -
*/ - public OpenNamespaceDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String operator) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPostWithHttpInfo(appId, env, clusterName, namespaceName, operator); + public OpenNamespaceDTO createBranch(String appId, String env, String clusterName, String namespaceName, String operator) throws ApiException { + ApiResponse localVarResp = createBranchWithHttpInfo(appId, env, clusterName, namespaceName, operator); return localVarResp.getData(); } /** - * 创建命名空间分支 - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param operator (required) + * 创建命名空间分支 (original openapi) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches + * @param appId app标识 (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (required) * @return ApiResponse<OpenNamespaceDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 命名空间分支创建成功 -
*/ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPostWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String operator) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPostValidateBeforeCall(appId, env, clusterName, namespaceName, operator, null); + public ApiResponse createBranchWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String operator) throws ApiException { + okhttp3.Call localVarCall = createBranchValidateBeforeCall(appId, env, clusterName, namespaceName, operator, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 创建命名空间分支 (asynchronously) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param operator (required) + * 创建命名空间分支 (original openapi) (asynchronously) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches + * @param appId app标识 (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 命名空间分支创建成功 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPostAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String operator, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createBranchAsync(String appId, String env, String clusterName, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPostValidateBeforeCall(appId, env, clusterName, namespaceName, operator, _callback); + okhttp3.Call localVarCall = createBranchValidateBeforeCall(appId, env, clusterName, namespaceName, operator, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param operator (required) + * Build call for deleteBranch + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param operator 操作人用户名 (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 分支删除成功 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDeleteCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull String operator, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteBranchCall(String env, String appId, String clusterName, String namespaceName, String branchName, String operator, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -320,133 +313,128 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDeleteValidateBeforeCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull String operator, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteBranchValidateBeforeCall(String env, String appId, String clusterName, String namespaceName, String branchName, String operator, final ApiCallback _callback) throws ApiException { // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling deleteBranch(Async)"); } // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling deleteBranch(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling deleteBranch(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling deleteBranch(Async)"); } // verify the required parameter 'branchName' is set if (branchName == null) { - throw new ApiException("Missing the required parameter 'branchName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete(Async)"); + throw new ApiException("Missing the required parameter 'branchName' when calling deleteBranch(Async)"); } // verify the required parameter 'operator' is set if (operator == null) { - throw new ApiException("Missing the required parameter 'operator' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete(Async)"); + throw new ApiException("Missing the required parameter 'operator' when calling deleteBranch(Async)"); } - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDeleteCall(env, appId, clusterName, namespaceName, branchName, operator, _callback); + return deleteBranchCall(env, appId, clusterName, namespaceName, branchName, operator, _callback); } /** - * 删除命名空间分支 + * 删除命名空间分支 (original openapi) * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param operator (required) + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param operator 操作人用户名 (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 分支删除成功 -
*/ - public Object openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull String operator) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDeleteWithHttpInfo(env, appId, clusterName, namespaceName, branchName, operator); + public Object deleteBranch(String env, String appId, String clusterName, String namespaceName, String branchName, String operator) throws ApiException { + ApiResponse localVarResp = deleteBranchWithHttpInfo(env, appId, clusterName, namespaceName, branchName, operator); return localVarResp.getData(); } /** - * 删除命名空间分支 + * 删除命名空间分支 (original openapi) * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param operator (required) + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param operator 操作人用户名 (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 分支删除成功 -
*/ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDeleteWithHttpInfo(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull String operator) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDeleteValidateBeforeCall(env, appId, clusterName, namespaceName, branchName, operator, null); + public ApiResponse deleteBranchWithHttpInfo(String env, String appId, String clusterName, String namespaceName, String branchName, String operator) throws ApiException { + okhttp3.Call localVarCall = deleteBranchValidateBeforeCall(env, appId, clusterName, namespaceName, branchName, operator, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 删除命名空间分支 (asynchronously) + * 删除命名空间分支 (original openapi) (asynchronously) * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param operator (required) + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param operator 操作人用户名 (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 分支删除成功 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDeleteAsync(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull String operator, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteBranchAsync(String env, String appId, String clusterName, String namespaceName, String branchName, String operator, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDeleteValidateBeforeCall(env, appId, clusterName, namespaceName, branchName, operator, _callback); + okhttp3.Call localVarCall = deleteBranchValidateBeforeCall(env, appId, clusterName, namespaceName, branchName, operator, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param namespaceGrayDelReleaseDTO (required) + * Build call for findBranch + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 -
200 成功获取分支信息 -
404 分支不存在 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPostCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call findBranchCall(String appId, String env, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -460,15 +448,14 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp basePath = null; } - Object localVarPostBody = namespaceGrayDelReleaseDTO; + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "branchName" + "}", localVarApiClient.escapeString(branchName.toString())); + .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -485,7 +472,6 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } final String[] localVarContentTypes = { - "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -493,136 +479,119 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPostValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO, final ApiCallback _callback) throws ApiException { + private okhttp3.Call findBranchValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling findBranch(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling findBranch(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling findBranch(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost(Async)"); - } - - // verify the required parameter 'branchName' is set - if (branchName == null) { - throw new ApiException("Missing the required parameter 'branchName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost(Async)"); - } - - // verify the required parameter 'namespaceGrayDelReleaseDTO' is set - if (namespaceGrayDelReleaseDTO == null) { - throw new ApiException("Missing the required parameter 'namespaceGrayDelReleaseDTO' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling findBranch(Async)"); } - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPostCall(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO, _callback); + return findBranchCall(appId, env, clusterName, namespaceName, _callback); } /** - * 创建灰度删除发布 - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param namespaceGrayDelReleaseDTO (required) - * @return OpenReleaseDTO + * 获取命名空间分支信息 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @return OpenNamespaceDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 -
200 成功获取分支信息 -
404 分支不存在 -
*/ - public OpenReleaseDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPostWithHttpInfo(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO); + public OpenNamespaceDTO findBranch(String appId, String env, String clusterName, String namespaceName) throws ApiException { + ApiResponse localVarResp = findBranchWithHttpInfo(appId, env, clusterName, namespaceName); return localVarResp.getData(); } /** - * 创建灰度删除发布 - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param namespaceGrayDelReleaseDTO (required) - * @return ApiResponse<OpenReleaseDTO> + * 获取命名空间分支信息 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @return ApiResponse<OpenNamespaceDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 -
200 成功获取分支信息 -
404 分支不存在 -
*/ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPostWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPostValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse findBranchWithHttpInfo(String appId, String env, String clusterName, String namespaceName) throws ApiException { + okhttp3.Call localVarCall = findBranchValidateBeforeCall(appId, env, clusterName, namespaceName, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 创建灰度删除发布 (asynchronously) - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param namespaceGrayDelReleaseDTO (required) + * 获取命名空间分支信息 (original openapi) (asynchronously) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 -
200 成功获取分支信息 -
404 分支不存在 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPostAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call findBranchAsync(String appId, String env, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPostValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = findBranchValidateBeforeCall(appId, env, clusterName, namespaceName, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) + * Build call for getBranchGrayRules + * @param appId app标识 (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功获取灰度发布规则 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getBranchGrayRulesCall(String appId, String env, String clusterName, String namespaceName, String branchName, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -639,7 +608,7 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) @@ -672,687 +641,123 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getBranchGrayRulesValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String branchName, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling getBranchGrayRules(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling getBranchGrayRules(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling getBranchGrayRules(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling getBranchGrayRules(Async)"); } // verify the required parameter 'branchName' is set if (branchName == null) { - throw new ApiException("Missing the required parameter 'branchName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet(Async)"); + throw new ApiException("Missing the required parameter 'branchName' when calling getBranchGrayRules(Async)"); } - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGetCall(appId, env, clusterName, namespaceName, branchName, _callback); + return getBranchGrayRulesCall(appId, env, clusterName, namespaceName, branchName, _callback); } /** - * 获取分支灰度发布规则 - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) + * 获取分支灰度发布规则 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules + * @param appId app标识 (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) * @return OpenGrayReleaseRuleDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功获取灰度发布规则 -
*/ - public OpenGrayReleaseRuleDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGetWithHttpInfo(appId, env, clusterName, namespaceName, branchName); + public OpenGrayReleaseRuleDTO getBranchGrayRules(String appId, String env, String clusterName, String namespaceName, String branchName) throws ApiException { + ApiResponse localVarResp = getBranchGrayRulesWithHttpInfo(appId, env, clusterName, namespaceName, branchName); return localVarResp.getData(); } /** - * 获取分支灰度发布规则 - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) + * 获取分支灰度发布规则 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules + * @param appId app标识 (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) * @return ApiResponse<OpenGrayReleaseRuleDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功获取灰度发布规则 -
*/ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGetValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, null); + public ApiResponse getBranchGrayRulesWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String branchName) throws ApiException { + okhttp3.Call localVarCall = getBranchGrayRulesValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取分支灰度发布规则 (asynchronously) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) + * 获取分支灰度发布规则 (original openapi) (asynchronously) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules + * @param appId app标识 (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功获取灰度发布规则 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getBranchGrayRulesAsync(String appId, String env, String clusterName, String namespaceName, String branchName, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGetValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, _callback); + okhttp3.Call localVarCall = getBranchGrayRulesValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param operator (required) - * @param openGrayReleaseRuleDTO (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPutCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull String operator, @javax.annotation.Nonnull OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = openGrayReleaseRuleDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "branchName" + "}", localVarApiClient.escapeString(branchName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - if (operator != null) { - localVarHeaderParams.put("operator", localVarApiClient.parameterToString(operator)); - } - - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPutValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull String operator, @javax.annotation.Nonnull OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut(Async)"); - } - - // verify the required parameter 'branchName' is set - if (branchName == null) { - throw new ApiException("Missing the required parameter 'branchName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut(Async)"); - } - - // verify the required parameter 'operator' is set - if (operator == null) { - throw new ApiException("Missing the required parameter 'operator' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut(Async)"); - } - - // verify the required parameter 'openGrayReleaseRuleDTO' is set - if (openGrayReleaseRuleDTO == null) { - throw new ApiException("Missing the required parameter 'openGrayReleaseRuleDTO' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPutCall(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO, _callback); - - } - - /** - * 更新分支灰度发布规则 - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param operator (required) - * @param openGrayReleaseRuleDTO (required) - * @return Object - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public Object openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull String operator, @javax.annotation.Nonnull OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPutWithHttpInfo(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO); - return localVarResp.getData(); - } - - /** - * 更新分支灰度发布规则 - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param operator (required) - * @param openGrayReleaseRuleDTO (required) - * @return ApiResponse<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPutWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull String operator, @javax.annotation.Nonnull OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPutValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 更新分支灰度发布规则 (asynchronously) - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param operator (required) - * @param openGrayReleaseRuleDTO (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPutAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull String operator, @javax.annotation.Nonnull OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPutValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取分支下的配置项列表 -
404 分支不存在 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "branchName" + "}", localVarApiClient.escapeString(branchName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet(Async)"); - } - - // verify the required parameter 'branchName' is set - if (branchName == null) { - throw new ApiException("Missing the required parameter 'branchName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGetCall(appId, env, clusterName, namespaceName, branchName, _callback); - - } - - /** - * 获取分支下的配置项 - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @return List<OpenItemDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取分支下的配置项列表 -
404 分支不存在 -
- */ - public List openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName) throws ApiException { - ApiResponse> localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGetWithHttpInfo(appId, env, clusterName, namespaceName, branchName); - return localVarResp.getData(); - } - - /** - * 获取分支下的配置项 - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @return ApiResponse<List<OpenItemDTO>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取分支下的配置项列表 -
404 分支不存在 -
- */ - public ApiResponse> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGetValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取分支下的配置项 (asynchronously) - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取分支下的配置项列表 -
404 分支不存在 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGetValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param deleteBranch (required) + * Build call for mergeBranch + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param deleteBranch 合并后是否删除分支(true/false) (required) + * @param operator 操作人用户名 (required) * @param namespaceReleaseDTO (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- -
Status Code Description Response Headers
200 分支合并成功 -
400 合并参数错误 -
403 权限不足 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePostCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull Boolean deleteBranch, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = namespaceReleaseDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "branchName" + "}", localVarApiClient.escapeString(branchName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (deleteBranch != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("deleteBranch", deleteBranch)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePostValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull Boolean deleteBranch, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(Async)"); - } - - // verify the required parameter 'branchName' is set - if (branchName == null) { - throw new ApiException("Missing the required parameter 'branchName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(Async)"); - } - - // verify the required parameter 'deleteBranch' is set - if (deleteBranch == null) { - throw new ApiException("Missing the required parameter 'deleteBranch' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(Async)"); - } - - // verify the required parameter 'namespaceReleaseDTO' is set - if (namespaceReleaseDTO == null) { - throw new ApiException("Missing the required parameter 'namespaceReleaseDTO' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePostCall(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, _callback); - - } - - /** - * 合并分支 - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param deleteBranch (required) - * @param namespaceReleaseDTO (required) - * @return OpenReleaseDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 分支合并成功 -
400 合并参数错误 -
403 权限不足 -
- */ - public OpenReleaseDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull Boolean deleteBranch, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePostWithHttpInfo(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO); - return localVarResp.getData(); - } - - /** - * 合并分支 - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param deleteBranch (required) - * @param namespaceReleaseDTO (required) - * @return ApiResponse<OpenReleaseDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 分支合并成功 -
400 合并参数错误 -
403 权限不足 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePostWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull Boolean deleteBranch, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePostValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 合并分支 (asynchronously) - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param deleteBranch (required) - * @param namespaceReleaseDTO (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 分支合并成功 -
400 合并参数错误 -
403 权限不足 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePostAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull Boolean deleteBranch, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePostValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param deleteBranch (required) - * @param xApolloOperator (required) - * @param namespaceReleaseDTO (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatchCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull Boolean deleteBranch, @javax.annotation.Nonnull String xApolloOperator, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call mergeBranchCall(String env, String appId, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, String operator, NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1386,6 +791,10 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp localVarQueryParams.addAll(localVarApiClient.parameterToPair("deleteBranch", deleteBranch)); } + if (operator != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); + } + final String[] localVarAccepts = { "application/json" }; @@ -1402,159 +811,151 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp localVarHeaderParams.put("Content-Type", localVarContentType); } - if (xApolloOperator != null) { - localVarHeaderParams.put("X-Apollo-Operator", localVarApiClient.parameterToString(xApolloOperator)); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatchValidateBeforeCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull Boolean deleteBranch, @javax.annotation.Nonnull String xApolloOperator, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { + private okhttp3.Call mergeBranchValidateBeforeCall(String env, String appId, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, String operator, NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling mergeBranch(Async)"); } // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling mergeBranch(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling mergeBranch(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling mergeBranch(Async)"); } // verify the required parameter 'branchName' is set if (branchName == null) { - throw new ApiException("Missing the required parameter 'branchName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(Async)"); + throw new ApiException("Missing the required parameter 'branchName' when calling mergeBranch(Async)"); } // verify the required parameter 'deleteBranch' is set if (deleteBranch == null) { - throw new ApiException("Missing the required parameter 'deleteBranch' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(Async)"); + throw new ApiException("Missing the required parameter 'deleteBranch' when calling mergeBranch(Async)"); } - // verify the required parameter 'xApolloOperator' is set - if (xApolloOperator == null) { - throw new ApiException("Missing the required parameter 'xApolloOperator' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(Async)"); + // verify the required parameter 'operator' is set + if (operator == null) { + throw new ApiException("Missing the required parameter 'operator' when calling mergeBranch(Async)"); } // verify the required parameter 'namespaceReleaseDTO' is set if (namespaceReleaseDTO == null) { - throw new ApiException("Missing the required parameter 'namespaceReleaseDTO' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(Async)"); + throw new ApiException("Missing the required parameter 'namespaceReleaseDTO' when calling mergeBranch(Async)"); } - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatchCall(env, appId, clusterName, namespaceName, branchName, deleteBranch, xApolloOperator, namespaceReleaseDTO, _callback); + return mergeBranchCall(env, appId, clusterName, namespaceName, branchName, deleteBranch, operator, namespaceReleaseDTO, _callback); } /** - * 合并分支到主分支 + * 合并分支到主分支 (new added) * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param deleteBranch (required) - * @param xApolloOperator (required) + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param deleteBranch 合并后是否删除分支(true/false) (required) + * @param operator 操作人用户名 (required) * @param namespaceReleaseDTO (required) * @return OpenReleaseDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 分支合并成功 -
*/ - public OpenReleaseDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull Boolean deleteBranch, @javax.annotation.Nonnull String xApolloOperator, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatchWithHttpInfo(env, appId, clusterName, namespaceName, branchName, deleteBranch, xApolloOperator, namespaceReleaseDTO); + public OpenReleaseDTO mergeBranch(String env, String appId, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, String operator, NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { + ApiResponse localVarResp = mergeBranchWithHttpInfo(env, appId, clusterName, namespaceName, branchName, deleteBranch, operator, namespaceReleaseDTO); return localVarResp.getData(); } /** - * 合并分支到主分支 + * 合并分支到主分支 (new added) * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param deleteBranch (required) - * @param xApolloOperator (required) + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param deleteBranch 合并后是否删除分支(true/false) (required) + * @param operator 操作人用户名 (required) * @param namespaceReleaseDTO (required) * @return ApiResponse<OpenReleaseDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 分支合并成功 -
*/ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatchWithHttpInfo(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull Boolean deleteBranch, @javax.annotation.Nonnull String xApolloOperator, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatchValidateBeforeCall(env, appId, clusterName, namespaceName, branchName, deleteBranch, xApolloOperator, namespaceReleaseDTO, null); + public ApiResponse mergeBranchWithHttpInfo(String env, String appId, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, String operator, NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { + okhttp3.Call localVarCall = mergeBranchValidateBeforeCall(env, appId, clusterName, namespaceName, branchName, deleteBranch, operator, namespaceReleaseDTO, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 合并分支到主分支 (asynchronously) + * 合并分支到主分支 (new added) (asynchronously) * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param deleteBranch (required) - * @param xApolloOperator (required) + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param deleteBranch 合并后是否删除分支(true/false) (required) + * @param operator 操作人用户名 (required) * @param namespaceReleaseDTO (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 分支合并成功 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatchAsync(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull Boolean deleteBranch, @javax.annotation.Nonnull String xApolloOperator, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call mergeBranchAsync(String env, String appId, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, String operator, NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatchValidateBeforeCall(env, appId, clusterName, namespaceName, branchName, deleteBranch, xApolloOperator, namespaceReleaseDTO, _callback); + okhttp3.Call localVarCall = mergeBranchValidateBeforeCall(env, appId, clusterName, namespaceName, branchName, deleteBranch, operator, namespaceReleaseDTO, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param namespaceReleaseDTO (required) + * Build call for updateBranchRules + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param operator 操作人用户名 (required) + * @param openGrayReleaseRuleDTO (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 灰度规则更新成功 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPostCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateBranchRulesCall(String appId, String env, String clusterName, String namespaceName, String branchName, String operator, OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1568,10 +969,10 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp basePath = null; } - Object localVarPostBody = namespaceReleaseDTO; + Object localVarPostBody = openGrayReleaseRuleDTO; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) @@ -1584,6 +985,10 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (operator != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); + } + final String[] localVarAccepts = { "application/json" }; @@ -1601,115 +1006,120 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPostValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateBranchRulesValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String branchName, String operator, OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling updateBranchRules(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling updateBranchRules(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling updateBranchRules(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling updateBranchRules(Async)"); } // verify the required parameter 'branchName' is set if (branchName == null) { - throw new ApiException("Missing the required parameter 'branchName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost(Async)"); + throw new ApiException("Missing the required parameter 'branchName' when calling updateBranchRules(Async)"); } - // verify the required parameter 'namespaceReleaseDTO' is set - if (namespaceReleaseDTO == null) { - throw new ApiException("Missing the required parameter 'namespaceReleaseDTO' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost(Async)"); + // verify the required parameter 'operator' is set + if (operator == null) { + throw new ApiException("Missing the required parameter 'operator' when calling updateBranchRules(Async)"); } - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPostCall(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO, _callback); + // verify the required parameter 'openGrayReleaseRuleDTO' is set + if (openGrayReleaseRuleDTO == null) { + throw new ApiException("Missing the required parameter 'openGrayReleaseRuleDTO' when calling updateBranchRules(Async)"); + } + + return updateBranchRulesCall(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO, _callback); } /** - * 创建灰度发布 - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param namespaceReleaseDTO (required) - * @return OpenReleaseDTO + * 更新分支灰度发布规则 (original openapi) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param operator 操作人用户名 (required) + * @param openGrayReleaseRuleDTO (required) + * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 灰度规则更新成功 -
*/ - public OpenReleaseDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPostWithHttpInfo(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO); + public Object updateBranchRules(String appId, String env, String clusterName, String namespaceName, String branchName, String operator, OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO) throws ApiException { + ApiResponse localVarResp = updateBranchRulesWithHttpInfo(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO); return localVarResp.getData(); } /** - * 创建灰度发布 - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param namespaceReleaseDTO (required) - * @return ApiResponse<OpenReleaseDTO> + * 更新分支灰度发布规则 (original openapi) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param operator 操作人用户名 (required) + * @param openGrayReleaseRuleDTO (required) + * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 灰度规则更新成功 -
*/ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPostWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPostValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse updateBranchRulesWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String branchName, String operator, OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO) throws ApiException { + okhttp3.Call localVarCall = updateBranchRulesValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 创建灰度发布 (asynchronously) - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param namespaceReleaseDTO (required) + * 更新分支灰度发布规则 (original openapi) (asynchronously) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param operator 操作人用户名 (required) + * @param openGrayReleaseRuleDTO (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 灰度规则更新成功 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPostAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateBranchRulesAsync(String appId, String env, String clusterName, String namespaceName, String branchName, String operator, OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPostValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = updateBranchRulesValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/java-client/src/main/java/org/openapitools/client/api/NamespaceManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/NamespaceManagementApi.java index 4618f64d..1886b81e 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 @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -30,13 +30,13 @@ import org.openapitools.client.model.OpenAppNamespaceDTO; import org.openapitools.client.model.OpenNamespaceDTO; import org.openapitools.client.model.OpenNamespaceLockDTO; -import org.openapitools.client.model.OpenapiV1AppsGet401Response; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.ws.rs.core.GenericType; public class NamespaceManagementApi { private ApiClient localVarApiClient; @@ -76,19 +76,617 @@ public void setCustomBaseUrl(String customBaseUrl) { } /** - * Build call for openapiV1AppnamespacesGet - * @param publicOnly (required) + * Build call for checkNamespaceIntegrity + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
+ + +
Status Code Description Response Headers
200 缺失的命名空间名称列表 -
+ */ + public okhttp3.Call checkNamespaceIntegrityCall(String appId, String env, String clusterName, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check" + .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) + .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call checkNamespaceIntegrityValidateBeforeCall(String appId, String env, String clusterName, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling checkNamespaceIntegrity(Async)"); + } + + // verify the required parameter 'env' is set + if (env == null) { + throw new ApiException("Missing the required parameter 'env' when calling checkNamespaceIntegrity(Async)"); + } + + // verify the required parameter 'clusterName' is set + if (clusterName == null) { + throw new ApiException("Missing the required parameter 'clusterName' when calling checkNamespaceIntegrity(Async)"); + } + + return checkNamespaceIntegrityCall(appId, env, clusterName, _callback); + + } + + /** + * 检查缺失的Namespace (new added) + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @return List<String> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 缺失的命名空间名称列表 -
+ */ + public List checkNamespaceIntegrity(String appId, String env, String clusterName) throws ApiException { + ApiResponse> localVarResp = checkNamespaceIntegrityWithHttpInfo(appId, env, clusterName); + return localVarResp.getData(); + } + + /** + * 检查缺失的Namespace (new added) + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @return ApiResponse<List<String>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 缺失的命名空间名称列表 -
+ */ + public ApiResponse> checkNamespaceIntegrityWithHttpInfo(String appId, String env, String clusterName) throws ApiException { + okhttp3.Call localVarCall = checkNamespaceIntegrityValidateBeforeCall(appId, env, clusterName, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * 检查缺失的Namespace (new added) (asynchronously) + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 缺失的命名空间名称列表 -
+ */ + public okhttp3.Call checkNamespaceIntegrityAsync(String appId, String env, String clusterName, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = checkNamespaceIntegrityValidateBeforeCall(appId, env, clusterName, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createNamespace + * @param appId (required) + * @param openAppNamespaceDTO (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 AppNamespace创建成功 -
400 请求参数错误 -
403 权限不足 -
+ */ + public okhttp3.Call createNamespaceCall(String appId, OpenAppNamespaceDTO openAppNamespaceDTO, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = openAppNamespaceDTO; + + // create path and map variables + String localVarPath = "/openapi/v1/apps/{appId}/appnamespaces" + .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createNamespaceValidateBeforeCall(String appId, OpenAppNamespaceDTO openAppNamespaceDTO, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling createNamespace(Async)"); + } + + // verify the required parameter 'openAppNamespaceDTO' is set + if (openAppNamespaceDTO == null) { + throw new ApiException("Missing the required parameter 'openAppNamespaceDTO' when calling createNamespace(Async)"); + } + + return createNamespaceCall(appId, openAppNamespaceDTO, _callback); + + } + + /** + * 创建AppNamespace (original openapi) + * POST /openapi/v1/apps/{appId}/appnamespaces + * @param appId (required) + * @param openAppNamespaceDTO (required) + * @return OpenAppNamespaceDTO + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 AppNamespace创建成功 -
400 请求参数错误 -
403 权限不足 -
+ */ + public OpenAppNamespaceDTO createNamespace(String appId, OpenAppNamespaceDTO openAppNamespaceDTO) throws ApiException { + ApiResponse localVarResp = createNamespaceWithHttpInfo(appId, openAppNamespaceDTO); + return localVarResp.getData(); + } + + /** + * 创建AppNamespace (original openapi) + * POST /openapi/v1/apps/{appId}/appnamespaces + * @param appId (required) + * @param openAppNamespaceDTO (required) + * @return ApiResponse<OpenAppNamespaceDTO> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 AppNamespace创建成功 -
400 请求参数错误 -
403 权限不足 -
+ */ + public ApiResponse createNamespaceWithHttpInfo(String appId, OpenAppNamespaceDTO openAppNamespaceDTO) throws ApiException { + okhttp3.Call localVarCall = createNamespaceValidateBeforeCall(appId, openAppNamespaceDTO, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * 创建AppNamespace (original openapi) (asynchronously) + * POST /openapi/v1/apps/{appId}/appnamespaces + * @param appId (required) + * @param openAppNamespaceDTO (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 AppNamespace创建成功 -
400 请求参数错误 -
403 权限不足 -
+ */ + public okhttp3.Call createNamespaceAsync(String appId, OpenAppNamespaceDTO openAppNamespaceDTO, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createNamespaceValidateBeforeCall(appId, openAppNamespaceDTO, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteAppNamespace + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (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 AppNamespace删除成功 -
+ */ + public okhttp3.Call deleteAppNamespaceCall(String appId, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}" + .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (operator != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteAppNamespaceValidateBeforeCall(String appId, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling deleteAppNamespace(Async)"); + } + + // verify the required parameter 'namespaceName' is set + if (namespaceName == null) { + throw new ApiException("Missing the required parameter 'namespaceName' when calling deleteAppNamespace(Async)"); + } + + // verify the required parameter 'operator' is set + if (operator == null) { + throw new ApiException("Missing the required parameter 'operator' when calling deleteAppNamespace(Async)"); + } + + return deleteAppNamespaceCall(appId, namespaceName, operator, _callback); + + } + + /** + * 删除AppNamespace (new added) + * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (required) + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 AppNamespace删除成功 -
+ */ + public Object deleteAppNamespace(String appId, String namespaceName, String operator) throws ApiException { + ApiResponse localVarResp = deleteAppNamespaceWithHttpInfo(appId, namespaceName, operator); + return localVarResp.getData(); + } + + /** + * 删除AppNamespace (new added) + * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (required) + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 AppNamespace删除成功 -
+ */ + public ApiResponse deleteAppNamespaceWithHttpInfo(String appId, String namespaceName, String operator) throws ApiException { + okhttp3.Call localVarCall = deleteAppNamespaceValidateBeforeCall(appId, namespaceName, operator, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * 删除AppNamespace (new added) (asynchronously) + * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 AppNamespace删除成功 -
+ */ + public okhttp3.Call deleteAppNamespaceAsync(String appId, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteAppNamespaceValidateBeforeCall(appId, namespaceName, operator, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteNamespaceLinks + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 解除关联成功 -
+ */ + public okhttp3.Call deleteNamespaceLinksCall(String appId, String env, String clusterName, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links" + .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) + .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) + .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (operator != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteNamespaceLinksValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling deleteNamespaceLinks(Async)"); + } + + // verify the required parameter 'env' is set + if (env == null) { + throw new ApiException("Missing the required parameter 'env' when calling deleteNamespaceLinks(Async)"); + } + + // verify the required parameter 'clusterName' is set + if (clusterName == null) { + throw new ApiException("Missing the required parameter 'clusterName' when calling deleteNamespaceLinks(Async)"); + } + + // verify the required parameter 'namespaceName' is set + if (namespaceName == null) { + throw new ApiException("Missing the required parameter 'namespaceName' when calling deleteNamespaceLinks(Async)"); + } + + // verify the required parameter 'operator' is set + if (operator == null) { + throw new ApiException("Missing the required parameter 'operator' when calling deleteNamespaceLinks(Async)"); + } + + return deleteNamespaceLinksCall(appId, env, clusterName, namespaceName, operator, _callback); + + } + + /** + * 删除关联的Namespace (new added) + * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (required) + * @return Object + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 解除关联成功 -
+ */ + public Object deleteNamespaceLinks(String appId, String env, String clusterName, String namespaceName, String operator) throws ApiException { + ApiResponse localVarResp = deleteNamespaceLinksWithHttpInfo(appId, env, clusterName, namespaceName, operator); + return localVarResp.getData(); + } + + /** + * 删除关联的Namespace (new added) + * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (required) + * @return ApiResponse<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 解除关联成功 -
+ */ + public ApiResponse deleteNamespaceLinksWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String operator) throws ApiException { + okhttp3.Call localVarCall = deleteNamespaceLinksValidateBeforeCall(appId, env, clusterName, namespaceName, operator, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * 删除关联的Namespace (new added) (asynchronously) + * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 解除关联成功 -
+ */ + public okhttp3.Call deleteNamespaceLinksAsync(String appId, String env, String clusterName, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteNamespaceLinksValidateBeforeCall(appId, env, clusterName, namespaceName, operator, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for findNamespaces + * @param appId (required) + * @param env (required) + * @param clusterName (required) + * @param fillItemDetail (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details +
Status Code Description Response Headers
200 -
*/ - public okhttp3.Call openapiV1AppnamespacesGetCall(@javax.annotation.Nonnull Boolean publicOnly, final ApiCallback _callback) throws ApiException { + public okhttp3.Call findNamespacesCall(String appId, String env, String clusterName, Boolean fillItemDetail, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -105,7 +703,10 @@ public okhttp3.Call openapiV1AppnamespacesGetCall(@javax.annotation.Nonnull Bool Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/appnamespaces"; + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces" + .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) + .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -113,8 +714,8 @@ public okhttp3.Call openapiV1AppnamespacesGetCall(@javax.annotation.Nonnull Bool Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (publicOnly != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("publicOnly", publicOnly)); + if (fillItemDetail != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fillItemDetail", fillItemDetail)); } final String[] localVarAccepts = { @@ -137,88 +738,109 @@ public okhttp3.Call openapiV1AppnamespacesGetCall(@javax.annotation.Nonnull Bool } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppnamespacesGetValidateBeforeCall(@javax.annotation.Nonnull Boolean publicOnly, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'publicOnly' is set - if (publicOnly == null) { - throw new ApiException("Missing the required parameter 'publicOnly' when calling openapiV1AppnamespacesGet(Async)"); + private okhttp3.Call findNamespacesValidateBeforeCall(String appId, String env, String clusterName, Boolean fillItemDetail, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling findNamespaces(Async)"); + } + + // verify the required parameter 'env' is set + if (env == null) { + throw new ApiException("Missing the required parameter 'env' when calling findNamespaces(Async)"); + } + + // verify the required parameter 'clusterName' is set + if (clusterName == null) { + throw new ApiException("Missing the required parameter 'clusterName' when calling findNamespaces(Async)"); + } + + // verify the required parameter 'fillItemDetail' is set + if (fillItemDetail == null) { + throw new ApiException("Missing the required parameter 'fillItemDetail' when calling findNamespaces(Async)"); } - return openapiV1AppnamespacesGetCall(publicOnly, _callback); + return findNamespacesCall(appId, env, clusterName, fillItemDetail, _callback); } /** - * 获取所有公共AppNamespace - * GET /openapi/v1/appnamespaces?public=true - * @param publicOnly (required) - * @return List<OpenAppNamespaceDTO> + * 获取指定集群下的所有Namespace (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces + * @param appId (required) + * @param env (required) + * @param clusterName (required) + * @param fillItemDetail (required) + * @return List<OpenNamespaceDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 -
*/ - public List openapiV1AppnamespacesGet(@javax.annotation.Nonnull Boolean publicOnly) throws ApiException { - ApiResponse> localVarResp = openapiV1AppnamespacesGetWithHttpInfo(publicOnly); + public List findNamespaces(String appId, String env, String clusterName, Boolean fillItemDetail) throws ApiException { + ApiResponse> localVarResp = findNamespacesWithHttpInfo(appId, env, clusterName, fillItemDetail); return localVarResp.getData(); } /** - * 获取所有公共AppNamespace - * GET /openapi/v1/appnamespaces?public=true - * @param publicOnly (required) - * @return ApiResponse<List<OpenAppNamespaceDTO>> + * 获取指定集群下的所有Namespace (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces + * @param appId (required) + * @param env (required) + * @param clusterName (required) + * @param fillItemDetail (required) + * @return ApiResponse<List<OpenNamespaceDTO>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 -
*/ - public ApiResponse> openapiV1AppnamespacesGetWithHttpInfo(@javax.annotation.Nonnull Boolean publicOnly) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppnamespacesGetValidateBeforeCall(publicOnly, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse> findNamespacesWithHttpInfo(String appId, String env, String clusterName, Boolean fillItemDetail) throws ApiException { + okhttp3.Call localVarCall = findNamespacesValidateBeforeCall(appId, env, clusterName, fillItemDetail, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取所有公共AppNamespace (asynchronously) - * GET /openapi/v1/appnamespaces?public=true - * @param publicOnly (required) + * 获取指定集群下的所有Namespace (original openapi) (asynchronously) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces + * @param appId (required) + * @param env (required) + * @param clusterName (required) + * @param fillItemDetail (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 -
*/ - public okhttp3.Call openapiV1AppnamespacesGetAsync(@javax.annotation.Nonnull Boolean publicOnly, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call findNamespacesAsync(String appId, String env, String clusterName, Boolean fillItemDetail, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppnamespacesGetValidateBeforeCall(publicOnly, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + okhttp3.Call localVarCall = findNamespacesValidateBeforeCall(appId, env, clusterName, fillItemDetail, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1AppsAppIdAppnamespacesGet - * @param appId (required) + * Build call for getAppNamespace + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功获取AppNamespace -
*/ - public okhttp3.Call openapiV1AppsAppIdAppnamespacesGetCall(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAppNamespaceCall(String appId, String namespaceName, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -235,8 +857,9 @@ public okhttp3.Call openapiV1AppsAppIdAppnamespacesGetCall(@javax.annotation.Non Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/appnamespaces" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); + String localVarPath = "/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}" + .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -264,89 +887,92 @@ public okhttp3.Call openapiV1AppsAppIdAppnamespacesGetCall(@javax.annotation.Non } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdAppnamespacesGetValidateBeforeCall(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getAppNamespaceValidateBeforeCall(String appId, String namespaceName, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdAppnamespacesGet(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling getAppNamespace(Async)"); + } + + // verify the required parameter 'namespaceName' is set + if (namespaceName == null) { + throw new ApiException("Missing the required parameter 'namespaceName' when calling getAppNamespace(Async)"); } - return openapiV1AppsAppIdAppnamespacesGetCall(appId, _callback); + return getAppNamespaceCall(appId, namespaceName, _callback); } /** - * 获取指定应用的AppNamespace - * GET /openapi/v1/apps/{appId}/appnamespaces - * @param appId (required) - * @return List<OpenAppNamespaceDTO> + * 获取指定的AppNamespace (new added) + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @return OpenAppNamespaceDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功获取AppNamespace -
*/ - public List openapiV1AppsAppIdAppnamespacesGet(@javax.annotation.Nonnull String appId) throws ApiException { - ApiResponse> localVarResp = openapiV1AppsAppIdAppnamespacesGetWithHttpInfo(appId); + public OpenAppNamespaceDTO getAppNamespace(String appId, String namespaceName) throws ApiException { + ApiResponse localVarResp = getAppNamespaceWithHttpInfo(appId, namespaceName); return localVarResp.getData(); } /** - * 获取指定应用的AppNamespace - * GET /openapi/v1/apps/{appId}/appnamespaces - * @param appId (required) - * @return ApiResponse<List<OpenAppNamespaceDTO>> + * 获取指定的AppNamespace (new added) + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @return ApiResponse<OpenAppNamespaceDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功获取AppNamespace -
*/ - public ApiResponse> openapiV1AppsAppIdAppnamespacesGetWithHttpInfo(@javax.annotation.Nonnull String appId) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdAppnamespacesGetValidateBeforeCall(appId, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse getAppNamespaceWithHttpInfo(String appId, String namespaceName) throws ApiException { + okhttp3.Call localVarCall = getAppNamespaceValidateBeforeCall(appId, namespaceName, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取指定应用的AppNamespace (asynchronously) - * GET /openapi/v1/apps/{appId}/appnamespaces - * @param appId (required) + * 获取指定的AppNamespace (new added) (asynchronously) + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功获取AppNamespace -
*/ - public okhttp3.Call openapiV1AppsAppIdAppnamespacesGetAsync(@javax.annotation.Nonnull String appId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getAppNamespaceAsync(String appId, String namespaceName, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdAppnamespacesGetValidateBeforeCall(appId, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + okhttp3.Call localVarCall = getAppNamespaceValidateBeforeCall(appId, namespaceName, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1AppsAppIdAppnamespacesNamespaceNameGet - * @param appId (required) - * @param namespaceName (required) + * Build call for getAppNamespaces + * @param publicOnly (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 -
*/ - public okhttp3.Call openapiV1AppsAppIdAppnamespacesNamespaceNameGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAppNamespacesCall(Boolean publicOnly, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -363,9 +989,7 @@ public okhttp3.Call openapiV1AppsAppIdAppnamespacesNamespaceNameGetCall(@javax.a Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); + String localVarPath = "/openapi/v1/appnamespaces"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -373,6 +997,10 @@ public okhttp3.Call openapiV1AppsAppIdAppnamespacesNamespaceNameGetCall(@javax.a Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (publicOnly != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("publicOnly", publicOnly)); + } + final String[] localVarAccepts = { "application/json" }; @@ -393,99 +1021,84 @@ public okhttp3.Call openapiV1AppsAppIdAppnamespacesNamespaceNameGetCall(@javax.a } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdAppnamespacesNamespaceNameGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdAppnamespacesNamespaceNameGet(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1AppsAppIdAppnamespacesNamespaceNameGet(Async)"); + private okhttp3.Call getAppNamespacesValidateBeforeCall(Boolean publicOnly, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'publicOnly' is set + if (publicOnly == null) { + throw new ApiException("Missing the required parameter 'publicOnly' when calling getAppNamespaces(Async)"); } - return openapiV1AppsAppIdAppnamespacesNamespaceNameGetCall(appId, namespaceName, _callback); + return getAppNamespacesCall(publicOnly, _callback); } /** - * 获取指定的AppNamespace - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * @param appId (required) - * @param namespaceName (required) - * @return OpenAppNamespaceDTO + * 获取所有公共AppNamespace (new added) + * GET /openapi/v1/appnamespaces?public=true + * @param publicOnly (required) + * @return List<OpenAppNamespaceDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 -
*/ - public OpenAppNamespaceDTO openapiV1AppsAppIdAppnamespacesNamespaceNameGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String namespaceName) throws ApiException { - ApiResponse localVarResp = openapiV1AppsAppIdAppnamespacesNamespaceNameGetWithHttpInfo(appId, namespaceName); + public List getAppNamespaces(Boolean publicOnly) throws ApiException { + ApiResponse> localVarResp = getAppNamespacesWithHttpInfo(publicOnly); return localVarResp.getData(); } /** - * 获取指定的AppNamespace - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * @param appId (required) - * @param namespaceName (required) - * @return ApiResponse<OpenAppNamespaceDTO> + * 获取所有公共AppNamespace (new added) + * GET /openapi/v1/appnamespaces?public=true + * @param publicOnly (required) + * @return ApiResponse<List<OpenAppNamespaceDTO>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 -
*/ - public ApiResponse openapiV1AppsAppIdAppnamespacesNamespaceNameGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String namespaceName) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdAppnamespacesNamespaceNameGetValidateBeforeCall(appId, namespaceName, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse> getAppNamespacesWithHttpInfo(Boolean publicOnly) throws ApiException { + okhttp3.Call localVarCall = getAppNamespacesValidateBeforeCall(publicOnly, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取指定的AppNamespace (asynchronously) - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * @param appId (required) - * @param namespaceName (required) + * 获取所有公共AppNamespace (new added) (asynchronously) + * GET /openapi/v1/appnamespaces?public=true + * @param publicOnly (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 -
*/ - public okhttp3.Call openapiV1AppsAppIdAppnamespacesNamespaceNameGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAppNamespacesAsync(Boolean publicOnly, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdAppnamespacesNamespaceNameGetValidateBeforeCall(appId, namespaceName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getAppNamespacesValidateBeforeCall(publicOnly, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1AppsAppIdAppnamespacesPost + * Build call for getAppNamespacesByApp * @param appId (required) - * @param openAppNamespaceDTO (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- - - +
Status Code Description Response Headers
200 AppNamespace创建成功 -
400 请求参数错误 -
403 权限不足 -
200 -
*/ - public okhttp3.Call openapiV1AppsAppIdAppnamespacesPostCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenAppNamespaceDTO openAppNamespaceDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAppNamespacesByAppCall(String appId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -499,7 +1112,7 @@ public okhttp3.Call openapiV1AppsAppIdAppnamespacesPostCall(@javax.annotation.No basePath = null; } - Object localVarPostBody = openAppNamespaceDTO; + Object localVarPostBody = null; // create path and map variables String localVarPath = "/openapi/v1/apps/{appId}/appnamespaces" @@ -520,7 +1133,6 @@ public okhttp3.Call openapiV1AppsAppIdAppnamespacesPostCall(@javax.annotation.No } final String[] localVarContentTypes = { - "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -528,108 +1140,91 @@ public okhttp3.Call openapiV1AppsAppIdAppnamespacesPostCall(@javax.annotation.No } String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdAppnamespacesPostValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenAppNamespaceDTO openAppNamespaceDTO, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getAppNamespacesByAppValidateBeforeCall(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 openapiV1AppsAppIdAppnamespacesPost(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling getAppNamespacesByApp(Async)"); } - // verify the required parameter 'openAppNamespaceDTO' is set - if (openAppNamespaceDTO == null) { - throw new ApiException("Missing the required parameter 'openAppNamespaceDTO' when calling openapiV1AppsAppIdAppnamespacesPost(Async)"); - } - - return openapiV1AppsAppIdAppnamespacesPostCall(appId, openAppNamespaceDTO, _callback); + return getAppNamespacesByAppCall(appId, _callback); } /** - * 创建AppNamespace - * POST /openapi/v1/apps/{appId}/appnamespaces + * 获取指定应用的AppNamespace (new added) + * GET /openapi/v1/apps/{appId}/appnamespaces * @param appId (required) - * @param openAppNamespaceDTO (required) - * @return OpenAppNamespaceDTO + * @return List<OpenAppNamespaceDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- - - +
Status Code Description Response Headers
200 AppNamespace创建成功 -
400 请求参数错误 -
403 权限不足 -
200 -
*/ - public OpenAppNamespaceDTO openapiV1AppsAppIdAppnamespacesPost(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenAppNamespaceDTO openAppNamespaceDTO) throws ApiException { - ApiResponse localVarResp = openapiV1AppsAppIdAppnamespacesPostWithHttpInfo(appId, openAppNamespaceDTO); + public List getAppNamespacesByApp(String appId) throws ApiException { + ApiResponse> localVarResp = getAppNamespacesByAppWithHttpInfo(appId); return localVarResp.getData(); } /** - * 创建AppNamespace - * POST /openapi/v1/apps/{appId}/appnamespaces + * 获取指定应用的AppNamespace (new added) + * GET /openapi/v1/apps/{appId}/appnamespaces * @param appId (required) - * @param openAppNamespaceDTO (required) - * @return ApiResponse<OpenAppNamespaceDTO> + * @return ApiResponse<List<OpenAppNamespaceDTO>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- - - +
Status Code Description Response Headers
200 AppNamespace创建成功 -
400 请求参数错误 -
403 权限不足 -
200 -
*/ - public ApiResponse openapiV1AppsAppIdAppnamespacesPostWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenAppNamespaceDTO openAppNamespaceDTO) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdAppnamespacesPostValidateBeforeCall(appId, openAppNamespaceDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse> getAppNamespacesByAppWithHttpInfo(String appId) throws ApiException { + okhttp3.Call localVarCall = getAppNamespacesByAppValidateBeforeCall(appId, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 创建AppNamespace (asynchronously) - * POST /openapi/v1/apps/{appId}/appnamespaces + * 获取指定应用的AppNamespace (new added) (asynchronously) + * GET /openapi/v1/apps/{appId}/appnamespaces * @param appId (required) - * @param openAppNamespaceDTO (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- - - +
Status Code Description Response Headers
200 AppNamespace创建成功 -
400 请求参数错误 -
403 权限不足 -
200 -
*/ - public okhttp3.Call openapiV1AppsAppIdAppnamespacesPostAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenAppNamespaceDTO openAppNamespaceDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAppNamespacesByAppAsync(String appId, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdAppnamespacesPostValidateBeforeCall(appId, openAppNamespaceDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getAppNamespacesByAppValidateBeforeCall(appId, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet + * Build call for getNamespaceLock * @param appId (required) * @param env (required) * @param clusterName (required) + * @param namespaceName (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 -
*/ - public okhttp3.Call openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getNamespaceLockCall(String appId, String env, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -646,10 +1241,11 @@ public okhttp3.Call openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegr Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())); + .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) + .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -677,107 +1273,108 @@ public okhttp3.Call openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegr } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getNamespaceLockValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling getNamespaceLock(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling getNamespaceLock(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling getNamespaceLock(Async)"); + } + + // verify the required parameter 'namespaceName' is set + if (namespaceName == null) { + throw new ApiException("Missing the required parameter 'namespaceName' when calling getNamespaceLock(Async)"); } - return openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGetCall(appId, env, clusterName, _callback); + return getNamespaceLockCall(appId, env, clusterName, namespaceName, _callback); } /** - * 检查缺失的Namespace - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check + * 获取Namespace的锁状态 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock * @param appId (required) * @param env (required) * @param clusterName (required) - * @return List<String> + * @param namespaceName (required) + * @return OpenNamespaceLockDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 -
*/ - public List openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName) throws ApiException { - ApiResponse> localVarResp = openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGetWithHttpInfo(appId, env, clusterName); + public OpenNamespaceLockDTO getNamespaceLock(String appId, String env, String clusterName, String namespaceName) throws ApiException { + ApiResponse localVarResp = getNamespaceLockWithHttpInfo(appId, env, clusterName, namespaceName); return localVarResp.getData(); } /** - * 检查缺失的Namespace - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check + * 获取Namespace的锁状态 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock * @param appId (required) * @param env (required) * @param clusterName (required) - * @return ApiResponse<List<String>> + * @param namespaceName (required) + * @return ApiResponse<OpenNamespaceLockDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 -
*/ - public ApiResponse> openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGetValidateBeforeCall(appId, env, clusterName, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse getNamespaceLockWithHttpInfo(String appId, String env, String clusterName, String namespaceName) throws ApiException { + okhttp3.Call localVarCall = getNamespaceLockValidateBeforeCall(appId, env, clusterName, namespaceName, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 检查缺失的Namespace (asynchronously) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check + * 获取Namespace的锁状态 (original openapi) (asynchronously) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock * @param appId (required) * @param env (required) * @param clusterName (required) + * @param namespaceName (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 -
*/ - public okhttp3.Call openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getNamespaceLockAsync(String appId, String env, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGetValidateBeforeCall(appId, env, clusterName, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + okhttp3.Call localVarCall = getNamespaceLockValidateBeforeCall(appId, env, clusterName, namespaceName, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) + * Build call for getNamespacesReleaseStatus + * @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 - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功获取发布状态映射 -
*/ - public okhttp3.Call openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getNamespacesReleaseStatusCall(String appId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -794,11 +1391,8 @@ public okhttp3.Call openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamesp Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); + String localVarPath = "/openapi/v1/apps/{appId}/namespaces/releases/status" + .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -826,115 +1420,87 @@ public okhttp3.Call openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamesp } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getNamespacesReleaseStatusValidateBeforeCall(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 openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling getNamespacesReleaseStatus(Async)"); } - return openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGetCall(appId, env, clusterName, namespaceName, _callback); + return getNamespacesReleaseStatusCall(appId, _callback); } /** - * 获取关联的公共Namespace - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return OpenNamespaceDTO + * 获取应用下所有Namespace的发布状态 (new added) + * GET /openapi/v1/apps/{appId}/namespaces/releases/status + * @param appId 应用ID (required) + * @return Map<String, Map<String, Boolean>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功获取发布状态映射 -
*/ - public OpenNamespaceDTO openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName) throws ApiException { - ApiResponse localVarResp = openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGetWithHttpInfo(appId, env, clusterName, namespaceName); + public Map> getNamespacesReleaseStatus(String appId) throws ApiException { + ApiResponse>> localVarResp = getNamespacesReleaseStatusWithHttpInfo(appId); return localVarResp.getData(); } /** - * 获取关联的公共Namespace - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return ApiResponse<OpenNamespaceDTO> + * 获取应用下所有Namespace的发布状态 (new added) + * GET /openapi/v1/apps/{appId}/namespaces/releases/status + * @param appId 应用ID (required) + * @return ApiResponse<Map<String, Map<String, Boolean>>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功获取发布状态映射 -
*/ - public ApiResponse openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGetValidateBeforeCall(appId, env, clusterName, namespaceName, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse>> getNamespacesReleaseStatusWithHttpInfo(String appId) throws ApiException { + okhttp3.Call localVarCall = getNamespacesReleaseStatusValidateBeforeCall(appId, null); + Type localVarReturnType = new TypeToken>>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取关联的公共Namespace (asynchronously) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) + * 获取应用下所有Namespace的发布状态 (new added) (asynchronously) + * GET /openapi/v1/apps/{appId}/namespaces/releases/status + * @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 - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功获取发布状态映射 -
*/ - public okhttp3.Call openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getNamespacesReleaseStatusAsync(String appId, final ApiCallback>> _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGetValidateBeforeCall(appId, env, clusterName, namespaceName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getNamespacesReleaseStatusValidateBeforeCall(appId, _callback); + Type localVarReturnType = new TypeToken>>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet - * @param env (required) - * @param publicNamespaceName (required) - * @param page (required) - * @param size (required) + * Build call for getPublicAppNamespaceInstances + * @param env 环境标识 (required) + * @param publicNamespaceName 公共命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功获取实例列表 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGetCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String publicNamespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getPublicAppNamespaceInstancesCall(String env, String publicNamespaceName, Integer page, Integer size, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -989,115 +1555,111 @@ public okhttp3.Call openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGetValidateBeforeCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String publicNamespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getPublicAppNamespaceInstancesValidateBeforeCall(String env, String publicNamespaceName, Integer page, Integer size, final ApiCallback _callback) throws ApiException { // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling getPublicAppNamespaceInstances(Async)"); } // verify the required parameter 'publicNamespaceName' is set if (publicNamespaceName == null) { - throw new ApiException("Missing the required parameter 'publicNamespaceName' when calling openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet(Async)"); + throw new ApiException("Missing the required parameter 'publicNamespaceName' when calling getPublicAppNamespaceInstances(Async)"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException("Missing the required parameter 'page' when calling openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet(Async)"); + throw new ApiException("Missing the required parameter 'page' when calling getPublicAppNamespaceInstances(Async)"); } // verify the required parameter 'size' is set if (size == null) { - throw new ApiException("Missing the required parameter 'size' when calling openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet(Async)"); + throw new ApiException("Missing the required parameter 'size' when calling getPublicAppNamespaceInstances(Async)"); } - return openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGetCall(env, publicNamespaceName, page, size, _callback); + return getPublicAppNamespaceInstancesCall(env, publicNamespaceName, page, size, _callback); } /** - * 获取公共AppNamespace的所有实例 + * 获取公共AppNamespace的所有实例 (new added) * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - * @param env (required) - * @param publicNamespaceName (required) - * @param page (required) - * @param size (required) + * @param env 环境标识 (required) + * @param publicNamespaceName 公共命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) * @return List<OpenNamespaceDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功获取实例列表 -
*/ - public List openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String publicNamespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size) throws ApiException { - ApiResponse> localVarResp = openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGetWithHttpInfo(env, publicNamespaceName, page, size); + public List getPublicAppNamespaceInstances(String env, String publicNamespaceName, Integer page, Integer size) throws ApiException { + ApiResponse> localVarResp = getPublicAppNamespaceInstancesWithHttpInfo(env, publicNamespaceName, page, size); return localVarResp.getData(); } /** - * 获取公共AppNamespace的所有实例 + * 获取公共AppNamespace的所有实例 (new added) * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - * @param env (required) - * @param publicNamespaceName (required) - * @param page (required) - * @param size (required) + * @param env 环境标识 (required) + * @param publicNamespaceName 公共命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) * @return ApiResponse<List<OpenNamespaceDTO>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功获取实例列表 -
*/ - public ApiResponse> openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGetWithHttpInfo(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String publicNamespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGetValidateBeforeCall(env, publicNamespaceName, page, size, null); + public ApiResponse> getPublicAppNamespaceInstancesWithHttpInfo(String env, String publicNamespaceName, Integer page, Integer size) throws ApiException { + okhttp3.Call localVarCall = getPublicAppNamespaceInstancesValidateBeforeCall(env, publicNamespaceName, page, size, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取公共AppNamespace的所有实例 (asynchronously) + * 获取公共AppNamespace的所有实例 (new added) (asynchronously) * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - * @param env (required) - * @param publicNamespaceName (required) - * @param page (required) - * @param size (required) + * @param env 环境标识 (required) + * @param publicNamespaceName 公共命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功获取实例列表 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGetAsync(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String publicNamespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getPublicAppNamespaceInstancesAsync(String env, String publicNamespaceName, Integer page, Integer size, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGetValidateBeforeCall(env, publicNamespaceName, page, size, _callback); + okhttp3.Call localVarCall = getPublicAppNamespaceInstancesValidateBeforeCall(env, publicNamespaceName, page, size, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param fillItemDetail (required) + * Build call for getPublicNamespaceAssociation + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功获取关联的公共Namespace -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull Boolean fillItemDetail, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getPublicNamespaceAssociationCall(String appId, String env, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1114,10 +1676,11 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetCal Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces" + String localVarPath = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())); + .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) + .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1125,10 +1688,6 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetCal Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (fillItemDetail != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("fillItemDetail", fillItemDetail)); - } - final String[] localVarAccepts = { "application/json" }; @@ -1149,115 +1708,112 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetCal } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull Boolean fillItemDetail, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getPublicNamespaceAssociationValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling getPublicNamespaceAssociation(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling getPublicNamespaceAssociation(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling getPublicNamespaceAssociation(Async)"); } - // verify the required parameter 'fillItemDetail' is set - if (fillItemDetail == null) { - throw new ApiException("Missing the required parameter 'fillItemDetail' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet(Async)"); + // verify the required parameter 'namespaceName' is set + if (namespaceName == null) { + throw new ApiException("Missing the required parameter 'namespaceName' when calling getPublicNamespaceAssociation(Async)"); } - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetCall(appId, env, clusterName, fillItemDetail, _callback); + return getPublicNamespaceAssociationCall(appId, env, clusterName, namespaceName, _callback); } /** - * 获取指定集群下的所有Namespace - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param fillItemDetail (required) - * @return List<OpenNamespaceDTO> + * 获取关联的公共Namespace (new added) + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @return OpenNamespaceDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功获取关联的公共Namespace -
*/ - public List openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull Boolean fillItemDetail) throws ApiException { - ApiResponse> localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetWithHttpInfo(appId, env, clusterName, fillItemDetail); + public OpenNamespaceDTO getPublicNamespaceAssociation(String appId, String env, String clusterName, String namespaceName) throws ApiException { + ApiResponse localVarResp = getPublicNamespaceAssociationWithHttpInfo(appId, env, clusterName, namespaceName); return localVarResp.getData(); } /** - * 获取指定集群下的所有Namespace - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param fillItemDetail (required) - * @return ApiResponse<List<OpenNamespaceDTO>> + * 获取关联的公共Namespace (new added) + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @return ApiResponse<OpenNamespaceDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功获取关联的公共Namespace -
*/ - public ApiResponse> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull Boolean fillItemDetail) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetValidateBeforeCall(appId, env, clusterName, fillItemDetail, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse getPublicNamespaceAssociationWithHttpInfo(String appId, String env, String clusterName, String namespaceName) throws ApiException { + okhttp3.Call localVarCall = getPublicNamespaceAssociationValidateBeforeCall(appId, env, clusterName, namespaceName, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取指定集群下的所有Namespace (asynchronously) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param fillItemDetail (required) + * 获取关联的公共Namespace (new added) (asynchronously) + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功获取关联的公共Namespace -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull Boolean fillItemDetail, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getPublicNamespaceAssociationAsync(String appId, String env, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetValidateBeforeCall(appId, env, clusterName, fillItemDetail, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + okhttp3.Call localVarCall = getPublicNamespaceAssociationValidateBeforeCall(appId, env, clusterName, namespaceName, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet + * Build call for loadNamespace * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) + * @param fillItemDetail (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call loadNamespaceCall(String appId, String env, String clusterName, String namespaceName, Boolean fillItemDetail, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1274,7 +1830,7 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) @@ -1286,6 +1842,10 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (fillItemDetail != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fillItemDetail", fillItemDetail)); + } + final String[] localVarAccepts = { "application/json" }; @@ -1306,95 +1866,100 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { + private okhttp3.Call loadNamespaceValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, Boolean fillItemDetail, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling loadNamespace(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling loadNamespace(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling loadNamespace(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling loadNamespace(Async)"); + } + + // verify the required parameter 'fillItemDetail' is set + if (fillItemDetail == null) { + throw new ApiException("Missing the required parameter 'fillItemDetail' when calling loadNamespace(Async)"); } - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGetCall(appId, env, clusterName, namespaceName, _callback); + return loadNamespaceCall(appId, env, clusterName, namespaceName, fillItemDetail, _callback); } /** - * 获取Namespace的锁状态 - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock + * 获取指定的Namespace (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @return OpenNamespaceLockDTO + * @param fillItemDetail (required) + * @return OpenNamespaceDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 -
*/ - public OpenNamespaceLockDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGetWithHttpInfo(appId, env, clusterName, namespaceName); + public OpenNamespaceDTO loadNamespace(String appId, String env, String clusterName, String namespaceName, Boolean fillItemDetail) throws ApiException { + ApiResponse localVarResp = loadNamespaceWithHttpInfo(appId, env, clusterName, namespaceName, fillItemDetail); return localVarResp.getData(); } /** - * 获取Namespace的锁状态 - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock + * 获取指定的Namespace (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @return ApiResponse<OpenNamespaceLockDTO> + * @param fillItemDetail (required) + * @return ApiResponse<OpenNamespaceDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 -
*/ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGetValidateBeforeCall(appId, env, clusterName, namespaceName, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse loadNamespaceWithHttpInfo(String appId, String env, String clusterName, String namespaceName, Boolean fillItemDetail) throws ApiException { + okhttp3.Call localVarCall = loadNamespaceValidateBeforeCall(appId, env, clusterName, namespaceName, fillItemDetail, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取Namespace的锁状态 (asynchronously) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock + * 获取指定的Namespace (original openapi) (asynchronously) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) + * @param fillItemDetail (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call loadNamespaceAsync(String appId, String env, String clusterName, String namespaceName, Boolean fillItemDetail, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGetValidateBeforeCall(appId, env, clusterName, namespaceName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = loadNamespaceValidateBeforeCall(appId, env, clusterName, namespaceName, fillItemDetail, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/java-client/src/main/java/org/openapitools/client/api/OrganizationManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/OrganizationManagementApi.java index 7047747f..97f60cad 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 @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -28,13 +28,13 @@ import org.openapitools.client.model.OpenOrganizationDto; -import org.openapitools.client.model.OpenapiV1AppsGet401Response; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.ws.rs.core.GenericType; public class OrganizationManagementApi { private ApiClient localVarApiClient; @@ -74,19 +74,18 @@ public void setCustomBaseUrl(String customBaseUrl) { } /** - * Build call for openapiV1OrganizationsGet + * Build call for getOrganization * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 成功获取组织列表 -
401 未授权访问 -
*/ - public okhttp3.Call openapiV1OrganizationsGetCall(final ApiCallback _callback) throws ApiException { + public okhttp3.Call getOrganizationCall(final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -131,65 +130,62 @@ public okhttp3.Call openapiV1OrganizationsGetCall(final ApiCallback _callback) t } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1OrganizationsGetValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return openapiV1OrganizationsGetCall(_callback); + private okhttp3.Call getOrganizationValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getOrganizationCall(_callback); } /** - * 获取所有组织信息 + * 获取所有组织信息 (original openapi) * GET /openapi/v1/organizations * @return List<OpenOrganizationDto> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 成功获取组织列表 -
401 未授权访问 -
*/ - public List openapiV1OrganizationsGet() throws ApiException { - ApiResponse> localVarResp = openapiV1OrganizationsGetWithHttpInfo(); + public List getOrganization() throws ApiException { + ApiResponse> localVarResp = getOrganizationWithHttpInfo(); return localVarResp.getData(); } /** - * 获取所有组织信息 + * 获取所有组织信息 (original openapi) * GET /openapi/v1/organizations * @return ApiResponse<List<OpenOrganizationDto>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 成功获取组织列表 -
401 未授权访问 -
*/ - public ApiResponse> openapiV1OrganizationsGetWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = openapiV1OrganizationsGetValidateBeforeCall(null); + public ApiResponse> getOrganizationWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getOrganizationValidateBeforeCall(null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取所有组织信息 (asynchronously) + * 获取所有组织信息 (original openapi) (asynchronously) * GET /openapi/v1/organizations * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 成功获取组织列表 -
401 未授权访问 -
*/ - public okhttp3.Call openapiV1OrganizationsGetAsync(final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getOrganizationAsync(final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1OrganizationsGetValidateBeforeCall(_callback); + okhttp3.Call localVarCall = getOrganizationValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/java-client/src/main/java/org/openapitools/client/api/ReleaseManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/ReleaseManagementApi.java index 3326841f..4076dfa8 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 @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -27,17 +27,17 @@ import java.io.IOException; -import org.openapitools.client.model.ListReleaseBO; +import org.openapitools.client.model.NamespaceGrayDelReleaseDTO; import org.openapitools.client.model.NamespaceReleaseDTO; +import org.openapitools.client.model.OpenReleaseBO; import org.openapitools.client.model.OpenReleaseDTO; -import org.openapitools.client.model.OpenapiV1AppsGet401Response; -import org.openapitools.client.model.OpenapiV1EnvsEnvReleasesCompareGet200Response; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.ws.rs.core.GenericType; public class ReleaseManagementApi { private ApiClient localVarApiClient; @@ -77,24 +77,23 @@ public void setCustomBaseUrl(String customBaseUrl) { } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet + * Build call for createGrayDelRelease * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param page (required) - * @param size (required) + * @param branchName (required) + * @param namespaceGrayDelReleaseDTO (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createGrayDelReleaseCall(String appId, String env, String clusterName, String namespaceName, String branchName, NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -108,14 +107,15 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = namespaceGrayDelReleaseDTO; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); + .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) + .replace("{" + "branchName" + "}", localVarApiClient.escapeString(branchName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -123,14 +123,6 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp 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" }; @@ -140,6 +132,7 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } final String[] localVarContentTypes = { + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -147,137 +140,133 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createGrayDelReleaseValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String branchName, NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling createGrayDelRelease(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling createGrayDelRelease(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling createGrayDelRelease(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling createGrayDelRelease(Async)"); } - // verify the required parameter 'page' is set - if (page == null) { - throw new ApiException("Missing the required parameter 'page' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet(Async)"); + // verify the required parameter 'branchName' is set + if (branchName == null) { + throw new ApiException("Missing the required parameter 'branchName' when calling createGrayDelRelease(Async)"); } - // verify the required parameter 'size' is set - if (size == null) { - throw new ApiException("Missing the required parameter 'size' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet(Async)"); + // verify the required parameter 'namespaceGrayDelReleaseDTO' is set + if (namespaceGrayDelReleaseDTO == null) { + throw new ApiException("Missing the required parameter 'namespaceGrayDelReleaseDTO' when calling createGrayDelRelease(Async)"); } - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGetCall(appId, env, clusterName, namespaceName, page, size, _callback); + return createGrayDelReleaseCall(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO, _callback); } /** - * 获取活跃发布(分页) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active + * 创建灰度删除发布 (original openapi) + * * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param page (required) - * @param size (required) - * @return List<OpenReleaseDTO> + * @param branchName (required) + * @param namespaceGrayDelReleaseDTO (required) + * @return OpenReleaseDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 -
*/ - public List openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size) throws ApiException { - ApiResponse> localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGetWithHttpInfo(appId, env, clusterName, namespaceName, page, size); + public OpenReleaseDTO createGrayDelRelease(String appId, String env, String clusterName, String namespaceName, String branchName, NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO) throws ApiException { + ApiResponse localVarResp = createGrayDelReleaseWithHttpInfo(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO); return localVarResp.getData(); } /** - * 获取活跃发布(分页) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active + * 创建灰度删除发布 (original openapi) + * * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param page (required) - * @param size (required) - * @return ApiResponse<List<OpenReleaseDTO>> + * @param branchName (required) + * @param namespaceGrayDelReleaseDTO (required) + * @return ApiResponse<OpenReleaseDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 -
*/ - public ApiResponse> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGetValidateBeforeCall(appId, env, clusterName, namespaceName, page, size, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse createGrayDelReleaseWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String branchName, NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO) throws ApiException { + okhttp3.Call localVarCall = createGrayDelReleaseValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取活跃发布(分页) (asynchronously) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active + * 创建灰度删除发布 (original openapi) (asynchronously) + * * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param page (required) - * @param size (required) + * @param branchName (required) + * @param namespaceGrayDelReleaseDTO (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
Status Code Description Response Headers
200 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call createGrayDelReleaseAsync(String appId, String env, String clusterName, String namespaceName, String branchName, NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGetValidateBeforeCall(appId, env, clusterName, namespaceName, page, size, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + okhttp3.Call localVarCall = createGrayDelReleaseValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (required) - * @param size (required) + * Build call for createGrayRelease + * @param appId app标识 (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param namespaceReleaseDTO (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 灰度发布创建成功 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createGrayReleaseCall(String appId, String env, String clusterName, String namespaceName, String branchName, NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -291,14 +280,15 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = namespaceReleaseDTO; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); + .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) + .replace("{" + "branchName" + "}", localVarApiClient.escapeString(branchName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -306,14 +296,6 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp 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" }; @@ -323,6 +305,7 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } final String[] localVarContentTypes = { + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -330,136 +313,134 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createGrayReleaseValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String branchName, NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling createGrayRelease(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling createGrayRelease(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling createGrayRelease(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling createGrayRelease(Async)"); } - // verify the required parameter 'page' is set - if (page == null) { - throw new ApiException("Missing the required parameter 'page' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet(Async)"); + // verify the required parameter 'branchName' is set + if (branchName == null) { + throw new ApiException("Missing the required parameter 'branchName' when calling createGrayRelease(Async)"); } - // verify the required parameter 'size' is set - if (size == null) { - throw new ApiException("Missing the required parameter 'size' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet(Async)"); + // verify the required parameter 'namespaceReleaseDTO' is set + if (namespaceReleaseDTO == null) { + throw new ApiException("Missing the required parameter 'namespaceReleaseDTO' when calling createGrayRelease(Async)"); } - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGetCall(appId, env, clusterName, namespaceName, page, size, _callback); + return createGrayReleaseCall(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO, _callback); } /** - * 获取所有发布(分页) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (required) - * @param size (required) - * @return List<ListReleaseBO> + * 创建灰度发布 (original openapi) + * 创建灰度发布 + * @param appId app标识 (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param namespaceReleaseDTO (required) + * @return OpenReleaseDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 灰度发布创建成功 -
*/ - public List openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size) throws ApiException { - ApiResponse> localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGetWithHttpInfo(appId, env, clusterName, namespaceName, page, size); + public OpenReleaseDTO createGrayRelease(String appId, String env, String clusterName, String namespaceName, String branchName, NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { + ApiResponse localVarResp = createGrayReleaseWithHttpInfo(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO); return localVarResp.getData(); } /** - * 获取所有发布(分页) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (required) - * @param size (required) - * @return ApiResponse<List<ListReleaseBO>> + * 创建灰度发布 (original openapi) + * 创建灰度发布 + * @param appId app标识 (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param namespaceReleaseDTO (required) + * @return ApiResponse<OpenReleaseDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 灰度发布创建成功 -
*/ - public ApiResponse> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGetValidateBeforeCall(appId, env, clusterName, namespaceName, page, size, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse createGrayReleaseWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String branchName, NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { + okhttp3.Call localVarCall = createGrayReleaseValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取所有发布(分页) (asynchronously) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (required) - * @param size (required) + * 创建灰度发布 (original openapi) (asynchronously) + * 创建灰度发布 + * @param appId app标识 (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param namespaceReleaseDTO (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 灰度发布创建成功 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call createGrayReleaseAsync(String appId, String env, String clusterName, String namespaceName, String branchName, NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGetValidateBeforeCall(appId, env, clusterName, namespaceName, page, size, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + okhttp3.Call localVarCall = createGrayReleaseValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet - * @param appId (required) - * @param env (required) + * Build call for createRelease + * @param appId app标识 (required) + * @param env 环境标识 (required) * @param clusterName (required) - * @param namespaceName (required) + * @param namespaceName 命名空间名称 (required) + * @param namespaceReleaseDTO (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- - + + +
Status Code Description Response Headers
200 成功获取最新活跃发布 -
404 未找到活跃发布 -
200 发布创建成功 -
400 发布参数错误 -
403 权限不足 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createReleaseCall(String appId, String env, String clusterName, String namespaceName, NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -473,10 +454,10 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = namespaceReleaseDTO; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) @@ -497,6 +478,7 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } final String[] localVarContentTypes = { + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -504,125 +486,131 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createReleaseValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling createRelease(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling createRelease(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling createRelease(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling createRelease(Async)"); + } + + // verify the required parameter 'namespaceReleaseDTO' is set + if (namespaceReleaseDTO == null) { + throw new ApiException("Missing the required parameter 'namespaceReleaseDTO' when calling createRelease(Async)"); } - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGetCall(appId, env, clusterName, namespaceName, _callback); + return createReleaseCall(appId, env, clusterName, namespaceName, namespaceReleaseDTO, _callback); } /** - * 获取最新活跃发布 - * - * @param appId (required) - * @param env (required) + * 创建发布 (original openapi) + * 创建发布 + * @param appId app标识 (required) + * @param env 环境标识 (required) * @param clusterName (required) - * @param namespaceName (required) + * @param namespaceName 命名空间名称 (required) + * @param namespaceReleaseDTO (required) * @return OpenReleaseDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- - + + +
Status Code Description Response Headers
200 成功获取最新活跃发布 -
404 未找到活跃发布 -
200 发布创建成功 -
400 发布参数错误 -
403 权限不足 -
*/ - public OpenReleaseDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGetWithHttpInfo(appId, env, clusterName, namespaceName); + public OpenReleaseDTO createRelease(String appId, String env, String clusterName, String namespaceName, NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { + ApiResponse localVarResp = createReleaseWithHttpInfo(appId, env, clusterName, namespaceName, namespaceReleaseDTO); return localVarResp.getData(); } /** - * 获取最新活跃发布 - * - * @param appId (required) - * @param env (required) + * 创建发布 (original openapi) + * 创建发布 + * @param appId app标识 (required) + * @param env 环境标识 (required) * @param clusterName (required) - * @param namespaceName (required) + * @param namespaceName 命名空间名称 (required) + * @param namespaceReleaseDTO (required) * @return ApiResponse<OpenReleaseDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- - + + +
Status Code Description Response Headers
200 成功获取最新活跃发布 -
404 未找到活跃发布 -
200 发布创建成功 -
400 发布参数错误 -
403 权限不足 -
*/ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGetValidateBeforeCall(appId, env, clusterName, namespaceName, null); + public ApiResponse createReleaseWithHttpInfo(String appId, String env, String clusterName, String namespaceName, NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { + okhttp3.Call localVarCall = createReleaseValidateBeforeCall(appId, env, clusterName, namespaceName, namespaceReleaseDTO, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取最新活跃发布 (asynchronously) - * - * @param appId (required) - * @param env (required) + * 创建发布 (original openapi) (asynchronously) + * 创建发布 + * @param appId app标识 (required) + * @param env 环境标识 (required) * @param clusterName (required) - * @param namespaceName (required) + * @param namespaceName 命名空间名称 (required) + * @param namespaceReleaseDTO (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- - + + +
Status Code Description Response Headers
200 成功获取最新活跃发布 -
404 未找到活跃发布 -
200 发布创建成功 -
400 发布参数错误 -
403 权限不足 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createReleaseAsync(String appId, String env, String clusterName, String namespaceName, NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGetValidateBeforeCall(appId, env, clusterName, namespaceName, _callback); + okhttp3.Call localVarCall = createReleaseValidateBeforeCall(appId, env, clusterName, namespaceName, namespaceReleaseDTO, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceReleaseDTO (required) + * Build call for findActiveReleases + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- - - +
Status Code Description Response Headers
200 发布创建成功 -
400 发布参数错误 -
403 权限不足 -
200 成功获取活跃发布列表 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPostCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call findActiveReleasesCall(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -636,10 +624,10 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp basePath = null; } - Object localVarPostBody = namespaceReleaseDTO; + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) @@ -651,6 +639,14 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp 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" }; @@ -660,7 +656,6 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } final String[] localVarContentTypes = { - "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -668,132 +663,133 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPostValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { + private okhttp3.Call findActiveReleasesValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling findActiveReleases(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling findActiveReleases(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling findActiveReleases(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling findActiveReleases(Async)"); } - // verify the required parameter 'namespaceReleaseDTO' is set - if (namespaceReleaseDTO == null) { - throw new ApiException("Missing the required parameter 'namespaceReleaseDTO' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost(Async)"); + // verify the required parameter 'page' is set + if (page == null) { + throw new ApiException("Missing the required parameter 'page' when calling findActiveReleases(Async)"); + } + + // verify the required parameter 'size' is set + if (size == null) { + throw new ApiException("Missing the required parameter 'size' when calling findActiveReleases(Async)"); } - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPostCall(appId, env, clusterName, namespaceName, namespaceReleaseDTO, _callback); + return findActiveReleasesCall(appId, env, clusterName, namespaceName, page, size, _callback); } /** - * 创建发布 - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceReleaseDTO (required) - * @return OpenReleaseDTO + * 获取活跃发布(分页) (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) + * @return List<OpenReleaseDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- - - +
Status Code Description Response Headers
200 发布创建成功 -
400 发布参数错误 -
403 权限不足 -
200 成功获取活跃发布列表 -
*/ - public OpenReleaseDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPostWithHttpInfo(appId, env, clusterName, namespaceName, namespaceReleaseDTO); + public List findActiveReleases(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size) throws ApiException { + ApiResponse> localVarResp = findActiveReleasesWithHttpInfo(appId, env, clusterName, namespaceName, page, size); return localVarResp.getData(); } /** - * 创建发布 - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceReleaseDTO (required) - * @return ApiResponse<OpenReleaseDTO> + * 获取活跃发布(分页) (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) + * @return ApiResponse<List<OpenReleaseDTO>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- - - +
Status Code Description Response Headers
200 发布创建成功 -
400 发布参数错误 -
403 权限不足 -
200 成功获取活跃发布列表 -
*/ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPostWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPostValidateBeforeCall(appId, env, clusterName, namespaceName, namespaceReleaseDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse> findActiveReleasesWithHttpInfo(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size) throws ApiException { + okhttp3.Call localVarCall = findActiveReleasesValidateBeforeCall(appId, env, clusterName, namespaceName, page, size, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 创建发布 (asynchronously) - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceReleaseDTO (required) + * 获取活跃发布(分页) (new added) (asynchronously) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- - - +
Status Code Description Response Headers
200 发布创建成功 -
400 发布参数错误 -
403 权限不足 -
200 成功获取活跃发布列表 -
*/ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPostAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call findActiveReleasesAsync(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPostValidateBeforeCall(appId, env, clusterName, namespaceName, namespaceReleaseDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = findActiveReleasesValidateBeforeCall(appId, env, clusterName, namespaceName, page, size, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvReleasesCompareGet - * @param env (required) - * @param baseReleaseId (required) - * @param toCompareReleaseId (required) + * Build call for findAllReleases + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功获取发布列表 -
*/ - public okhttp3.Call openapiV1EnvsEnvReleasesCompareGetCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer baseReleaseId, @javax.annotation.Nonnull Integer toCompareReleaseId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call findAllReleasesCall(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -810,8 +806,11 @@ public okhttp3.Call openapiV1EnvsEnvReleasesCompareGetCall(@javax.annotation.Non Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/releases/compare" - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())); + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all" + .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) + .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) + .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -819,12 +818,12 @@ public okhttp3.Call openapiV1EnvsEnvReleasesCompareGetCall(@javax.annotation.Non Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (baseReleaseId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("baseReleaseId", baseReleaseId)); + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); } - if (toCompareReleaseId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("toCompareReleaseId", toCompareReleaseId)); + if (size != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size)); } final String[] localVarAccepts = { @@ -847,105 +846,125 @@ public okhttp3.Call openapiV1EnvsEnvReleasesCompareGetCall(@javax.annotation.Non } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvReleasesCompareGetValidateBeforeCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer baseReleaseId, @javax.annotation.Nonnull Integer toCompareReleaseId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call findAllReleasesValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling findAllReleases(Async)"); + } + // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvReleasesCompareGet(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling findAllReleases(Async)"); + } + + // verify the required parameter 'clusterName' is set + if (clusterName == null) { + throw new ApiException("Missing the required parameter 'clusterName' when calling findAllReleases(Async)"); + } + + // verify the required parameter 'namespaceName' is set + if (namespaceName == null) { + throw new ApiException("Missing the required parameter 'namespaceName' when calling findAllReleases(Async)"); } - // verify the required parameter 'baseReleaseId' is set - if (baseReleaseId == null) { - throw new ApiException("Missing the required parameter 'baseReleaseId' when calling openapiV1EnvsEnvReleasesCompareGet(Async)"); + // verify the required parameter 'page' is set + if (page == null) { + throw new ApiException("Missing the required parameter 'page' when calling findAllReleases(Async)"); } - // verify the required parameter 'toCompareReleaseId' is set - if (toCompareReleaseId == null) { - throw new ApiException("Missing the required parameter 'toCompareReleaseId' when calling openapiV1EnvsEnvReleasesCompareGet(Async)"); + // verify the required parameter 'size' is set + if (size == null) { + throw new ApiException("Missing the required parameter 'size' when calling findAllReleases(Async)"); } - return openapiV1EnvsEnvReleasesCompareGetCall(env, baseReleaseId, toCompareReleaseId, _callback); + return findAllReleasesCall(appId, env, clusterName, namespaceName, page, size, _callback); } /** - * 对比发布 - * GET /openapi/v1/envs/{env}/releases/compare - * @param env (required) - * @param baseReleaseId (required) - * @param toCompareReleaseId (required) - * @return OpenapiV1EnvsEnvReleasesCompareGet200Response + * 获取所有发布(分页) (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) + * @return List<OpenReleaseBO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功获取发布列表 -
*/ - public OpenapiV1EnvsEnvReleasesCompareGet200Response openapiV1EnvsEnvReleasesCompareGet(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer baseReleaseId, @javax.annotation.Nonnull Integer toCompareReleaseId) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvReleasesCompareGetWithHttpInfo(env, baseReleaseId, toCompareReleaseId); + public List findAllReleases(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size) throws ApiException { + ApiResponse> localVarResp = findAllReleasesWithHttpInfo(appId, env, clusterName, namespaceName, page, size); return localVarResp.getData(); } /** - * 对比发布 - * GET /openapi/v1/envs/{env}/releases/compare - * @param env (required) - * @param baseReleaseId (required) - * @param toCompareReleaseId (required) - * @return ApiResponse<OpenapiV1EnvsEnvReleasesCompareGet200Response> + * 获取所有发布(分页) (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) + * @return ApiResponse<List<OpenReleaseBO>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功获取发布列表 -
*/ - public ApiResponse openapiV1EnvsEnvReleasesCompareGetWithHttpInfo(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer baseReleaseId, @javax.annotation.Nonnull Integer toCompareReleaseId) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvReleasesCompareGetValidateBeforeCall(env, baseReleaseId, toCompareReleaseId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse> findAllReleasesWithHttpInfo(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size) throws ApiException { + okhttp3.Call localVarCall = findAllReleasesValidateBeforeCall(appId, env, clusterName, namespaceName, page, size, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 对比发布 (asynchronously) - * GET /openapi/v1/envs/{env}/releases/compare - * @param env (required) - * @param baseReleaseId (required) - * @param toCompareReleaseId (required) + * 获取所有发布(分页) (new added) (asynchronously) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功获取发布列表 -
*/ - public okhttp3.Call openapiV1EnvsEnvReleasesCompareGetAsync(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer baseReleaseId, @javax.annotation.Nonnull Integer toCompareReleaseId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call findAllReleasesAsync(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvReleasesCompareGetValidateBeforeCall(env, baseReleaseId, toCompareReleaseId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = findAllReleasesValidateBeforeCall(appId, env, clusterName, namespaceName, page, size, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvReleasesReleaseIdGet - * @param env (required) - * @param releaseId (required) + * Build call for getReleaseById + * @param env 环境标识 (required) + * @param releaseId 发布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 - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功获取发布详情 -
*/ - public okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdGetCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getReleaseByIdCall(String env, Integer releaseId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -992,98 +1011,445 @@ public okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdGetCall(@javax.annotation.N } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdGetValidateBeforeCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getReleaseByIdValidateBeforeCall(String env, Integer releaseId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvReleasesReleaseIdGet(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling getReleaseById(Async)"); } // verify the required parameter 'releaseId' is set if (releaseId == null) { - throw new ApiException("Missing the required parameter 'releaseId' when calling openapiV1EnvsEnvReleasesReleaseIdGet(Async)"); + throw new ApiException("Missing the required parameter 'releaseId' when calling getReleaseById(Async)"); } - return openapiV1EnvsEnvReleasesReleaseIdGetCall(env, releaseId, _callback); + return getReleaseByIdCall(env, releaseId, _callback); } /** - * 获取发布详情 + * 获取发布详情 (new added) * GET /openapi/v1/envs/{env}/releases/{releaseId} - * @param env (required) - * @param releaseId (required) + * @param env 环境标识 (required) + * @param releaseId 发布ID (required) * @return OpenReleaseDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功获取发布详情 -
*/ - public OpenReleaseDTO openapiV1EnvsEnvReleasesReleaseIdGet(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvReleasesReleaseIdGetWithHttpInfo(env, releaseId); + public OpenReleaseDTO getReleaseById(String env, Integer releaseId) throws ApiException { + ApiResponse localVarResp = getReleaseByIdWithHttpInfo(env, releaseId); return localVarResp.getData(); } /** - * 获取发布详情 + * 获取发布详情 (new added) * GET /openapi/v1/envs/{env}/releases/{releaseId} - * @param env (required) - * @param releaseId (required) + * @param env 环境标识 (required) + * @param releaseId 发布ID (required) * @return ApiResponse<OpenReleaseDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功获取发布详情 -
*/ - public ApiResponse openapiV1EnvsEnvReleasesReleaseIdGetWithHttpInfo(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvReleasesReleaseIdGetValidateBeforeCall(env, releaseId, null); + public ApiResponse getReleaseByIdWithHttpInfo(String env, Integer releaseId) throws ApiException { + okhttp3.Call localVarCall = getReleaseByIdValidateBeforeCall(env, releaseId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取发布详情 (asynchronously) + * 获取发布详情 (new added) (asynchronously) * GET /openapi/v1/envs/{env}/releases/{releaseId} - * @param env (required) - * @param releaseId (required) + * @param env 环境标识 (required) + * @param releaseId 发布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 - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 成功获取发布详情 -
*/ - public okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdGetAsync(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getReleaseByIdAsync(String env, Integer releaseId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvReleasesReleaseIdGetValidateBeforeCall(env, releaseId, _callback); + okhttp3.Call localVarCall = getReleaseByIdValidateBeforeCall(env, releaseId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvReleasesReleaseIdRollbackPut - * @param env (required) - * @param releaseId (required) - * @param operator (required) + * Build call for loadLatestActiveRelease + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - +
Response Details
- + +
Status Code Description Response Headers
200 -
200 成功获取最新活跃发布 -
404 未找到活跃发布 -
*/ - public okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdRollbackPutCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId, @javax.annotation.Nonnull String operator, final ApiCallback _callback) throws ApiException { + public okhttp3.Call loadLatestActiveReleaseCall(String appId, String env, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest" + .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) + .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) + .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call loadLatestActiveReleaseValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling loadLatestActiveRelease(Async)"); + } + + // verify the required parameter 'env' is set + if (env == null) { + throw new ApiException("Missing the required parameter 'env' when calling loadLatestActiveRelease(Async)"); + } + + // verify the required parameter 'clusterName' is set + if (clusterName == null) { + throw new ApiException("Missing the required parameter 'clusterName' when calling loadLatestActiveRelease(Async)"); + } + + // verify the required parameter 'namespaceName' is set + if (namespaceName == null) { + throw new ApiException("Missing the required parameter 'namespaceName' when calling loadLatestActiveRelease(Async)"); + } + + return loadLatestActiveReleaseCall(appId, env, clusterName, namespaceName, _callback); + + } + + /** + * 获取最新活跃发布 (original openapi) + * 查询命名空间最新活跃发布 + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @return OpenReleaseDTO + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功获取最新活跃发布 -
404 未找到活跃发布 -
+ */ + public OpenReleaseDTO loadLatestActiveRelease(String appId, String env, String clusterName, String namespaceName) throws ApiException { + ApiResponse localVarResp = loadLatestActiveReleaseWithHttpInfo(appId, env, clusterName, namespaceName); + return localVarResp.getData(); + } + + /** + * 获取最新活跃发布 (original openapi) + * 查询命名空间最新活跃发布 + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @return ApiResponse<OpenReleaseDTO> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功获取最新活跃发布 -
404 未找到活跃发布 -
+ */ + public ApiResponse loadLatestActiveReleaseWithHttpInfo(String appId, String env, String clusterName, String namespaceName) throws ApiException { + okhttp3.Call localVarCall = loadLatestActiveReleaseValidateBeforeCall(appId, env, clusterName, namespaceName, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * 获取最新活跃发布 (original openapi) (asynchronously) + * 查询命名空间最新活跃发布 + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 成功获取最新活跃发布 -
404 未找到活跃发布 -
+ */ + public okhttp3.Call loadLatestActiveReleaseAsync(String appId, String env, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = loadLatestActiveReleaseValidateBeforeCall(appId, env, clusterName, namespaceName, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for merge + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param deleteBranch 合并后是否删除分支(true/false) (required) + * @param namespaceReleaseDTO (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 分支合并成功 -
400 合并参数错误 -
403 权限不足 -
+ */ + public okhttp3.Call mergeCall(String appId, String env, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = namespaceReleaseDTO; + + // create path and map variables + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge" + .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) + .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) + .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) + .replace("{" + "branchName" + "}", localVarApiClient.escapeString(branchName.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (deleteBranch != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("deleteBranch", deleteBranch)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call mergeValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling merge(Async)"); + } + + // verify the required parameter 'env' is set + if (env == null) { + throw new ApiException("Missing the required parameter 'env' when calling merge(Async)"); + } + + // verify the required parameter 'clusterName' is set + if (clusterName == null) { + throw new ApiException("Missing the required parameter 'clusterName' when calling merge(Async)"); + } + + // verify the required parameter 'namespaceName' is set + if (namespaceName == null) { + throw new ApiException("Missing the required parameter 'namespaceName' when calling merge(Async)"); + } + + // verify the required parameter 'branchName' is set + if (branchName == null) { + throw new ApiException("Missing the required parameter 'branchName' when calling merge(Async)"); + } + + // verify the required parameter 'deleteBranch' is set + if (deleteBranch == null) { + throw new ApiException("Missing the required parameter 'deleteBranch' when calling merge(Async)"); + } + + // verify the required parameter 'namespaceReleaseDTO' is set + if (namespaceReleaseDTO == null) { + throw new ApiException("Missing the required parameter 'namespaceReleaseDTO' when calling merge(Async)"); + } + + return mergeCall(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, _callback); + + } + + /** + * 合并分支 (original openapi) + * 合并灰度分支并可选择删除分支 + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param deleteBranch 合并后是否删除分支(true/false) (required) + * @param namespaceReleaseDTO (required) + * @return OpenReleaseDTO + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 分支合并成功 -
400 合并参数错误 -
403 权限不足 -
+ */ + public OpenReleaseDTO merge(String appId, String env, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { + ApiResponse localVarResp = mergeWithHttpInfo(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO); + return localVarResp.getData(); + } + + /** + * 合并分支 (original openapi) + * 合并灰度分支并可选择删除分支 + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param deleteBranch 合并后是否删除分支(true/false) (required) + * @param namespaceReleaseDTO (required) + * @return ApiResponse<OpenReleaseDTO> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 分支合并成功 -
400 合并参数错误 -
403 权限不足 -
+ */ + public ApiResponse mergeWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { + okhttp3.Call localVarCall = mergeValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * 合并分支 (original openapi) (asynchronously) + * 合并灰度分支并可选择删除分支 + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param deleteBranch 合并后是否删除分支(true/false) (required) + * @param namespaceReleaseDTO (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 分支合并成功 -
400 合并参数错误 -
403 权限不足 -
+ */ + public okhttp3.Call mergeAsync(String appId, String env, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = mergeValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for rollback + * @param env 环境标识 (required) + * @param releaseId 发布ID (required) + * @param operator 操作人用户名 (required) + * @param _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 rollbackCall(String env, Long releaseId, String operator, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1134,86 +1500,83 @@ public okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdRollbackPutCall(@javax.anno } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdRollbackPutValidateBeforeCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId, @javax.annotation.Nonnull String operator, final ApiCallback _callback) throws ApiException { + private okhttp3.Call rollbackValidateBeforeCall(String env, Long releaseId, String operator, final ApiCallback _callback) throws ApiException { // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvReleasesReleaseIdRollbackPut(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling rollback(Async)"); } // verify the required parameter 'releaseId' is set if (releaseId == null) { - throw new ApiException("Missing the required parameter 'releaseId' when calling openapiV1EnvsEnvReleasesReleaseIdRollbackPut(Async)"); + throw new ApiException("Missing the required parameter 'releaseId' when calling rollback(Async)"); } // verify the required parameter 'operator' is set if (operator == null) { - throw new ApiException("Missing the required parameter 'operator' when calling openapiV1EnvsEnvReleasesReleaseIdRollbackPut(Async)"); + throw new ApiException("Missing the required parameter 'operator' when calling rollback(Async)"); } - return openapiV1EnvsEnvReleasesReleaseIdRollbackPutCall(env, releaseId, operator, _callback); + return rollbackCall(env, releaseId, operator, _callback); } /** - * 回滚发布 - * - * @param env (required) - * @param releaseId (required) - * @param operator (required) + * 回滚发布 (original openapi) + * 回滚到指定的发布版本 + * @param env 环境标识 (required) + * @param releaseId 发布ID (required) + * @param operator 操作人用户名 (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 发布回滚成功 -
*/ - public Object openapiV1EnvsEnvReleasesReleaseIdRollbackPut(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId, @javax.annotation.Nonnull String operator) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvReleasesReleaseIdRollbackPutWithHttpInfo(env, releaseId, operator); + public Object rollback(String env, Long releaseId, String operator) throws ApiException { + ApiResponse localVarResp = rollbackWithHttpInfo(env, releaseId, operator); return localVarResp.getData(); } /** - * 回滚发布 - * - * @param env (required) - * @param releaseId (required) - * @param operator (required) + * 回滚发布 (original openapi) + * 回滚到指定的发布版本 + * @param env 环境标识 (required) + * @param releaseId 发布ID (required) + * @param operator 操作人用户名 (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 发布回滚成功 -
*/ - public ApiResponse openapiV1EnvsEnvReleasesReleaseIdRollbackPutWithHttpInfo(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId, @javax.annotation.Nonnull String operator) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvReleasesReleaseIdRollbackPutValidateBeforeCall(env, releaseId, operator, null); + public ApiResponse rollbackWithHttpInfo(String env, Long releaseId, String operator) throws ApiException { + okhttp3.Call localVarCall = rollbackValidateBeforeCall(env, releaseId, operator, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 回滚发布 (asynchronously) - * - * @param env (required) - * @param releaseId (required) - * @param operator (required) + * 回滚发布 (original openapi) (asynchronously) + * 回滚到指定的发布版本 + * @param env 环境标识 (required) + * @param releaseId 发布ID (required) + * @param operator 操作人用户名 (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - +
Response Details
- +
Status Code Description Response Headers
200 -
200 发布回滚成功 -
*/ - public okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdRollbackPutAsync(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId, @javax.annotation.Nonnull String operator, final ApiCallback _callback) throws ApiException { + public okhttp3.Call rollbackAsync(String env, Long releaseId, String operator, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvReleasesReleaseIdRollbackPutValidateBeforeCall(env, releaseId, operator, _callback); + okhttp3.Call localVarCall = rollbackValidateBeforeCall(env, releaseId, operator, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/java-client/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/java-client/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java index d0a9f347..846a18e6 100644 --- a/java-client/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ b/java-client/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/java-client/src/main/java/org/openapitools/client/auth/Authentication.java b/java-client/src/main/java/org/openapitools/client/auth/Authentication.java index c5a7052f..be0bea17 100644 --- a/java-client/src/main/java/org/openapitools/client/auth/Authentication.java +++ b/java-client/src/main/java/org/openapitools/client/auth/Authentication.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -20,7 +20,6 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public interface Authentication { /** * Apply authentication settings to header and query params. diff --git a/java-client/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/java-client/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java index ad03f3a7..8fc7589b 100644 --- a/java-client/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +++ b/java-client/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -22,6 +22,8 @@ import java.util.Map; import java.util.List; +import java.io.UnsupportedEncodingException; + public class HttpBasicAuth implements Authentication { private String username; private String password; diff --git a/java-client/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/java-client/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java index 77725ea0..e7e456a4 100644 --- a/java-client/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +++ b/java-client/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -17,15 +17,13 @@ import org.openapitools.client.Pair; import java.net.URI; -import java.util.List; import java.util.Map; -import java.util.Optional; -import java.util.function.Supplier; +import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") public class HttpBearerAuth implements Authentication { private final String scheme; - private Supplier tokenSupplier; + private String bearerToken; public HttpBearerAuth(String scheme) { this.scheme = scheme; @@ -37,7 +35,7 @@ public HttpBearerAuth(String scheme) { * @return The bearer token */ public String getBearerToken() { - return tokenSupplier.get(); + return bearerToken; } /** @@ -46,22 +44,12 @@ public String getBearerToken() { * @param bearerToken The bearer token to send in the Authorization header */ public void setBearerToken(String bearerToken) { - this.tokenSupplier = () -> bearerToken; - } - - /** - * Sets the supplier of tokens, which together with the scheme, will be sent as the value of the Authorization header. - * - * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header - */ - public void setBearerToken(Supplier tokenSupplier) { - this.tokenSupplier = tokenSupplier; + this.bearerToken = bearerToken; } @Override public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { - String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null); if (bearerToken == null) { return; } diff --git a/java-client/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java b/java-client/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java index 6ec91f4f..0572878b 100644 --- a/java-client/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java +++ b/java-client/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -17,11 +17,14 @@ import java.util.Objects; import java.lang.reflect.Type; import java.util.Map; +import javax.ws.rs.core.GenericType; + +//import com.fasterxml.jackson.annotation.JsonValue; /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object @@ -43,7 +46,7 @@ public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { * * @return an instance of the actual schema/object */ - public abstract Map> getSchemas(); + public abstract Map getSchemas(); /** * Get the actual instance diff --git a/java-client/src/main/java/org/openapitools/client/model/Change.java b/java-client/src/main/java/org/openapitools/client/model/Change.java deleted file mode 100644 index 9c6cbfbf..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/Change.java +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.EntityPairKVEntity; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Change - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class Change { - /** - * - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - ADDED("ADDED"), - - MODIFIED("MODIFIED"), - - DELETED("DELETED"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; - - public static final String SERIALIZED_NAME_ENTITY = "entity"; - @SerializedName(SERIALIZED_NAME_ENTITY) - @javax.annotation.Nullable - private EntityPairKVEntity entity; - - public Change() { - } - - public Change type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; - } - - /** - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - } - - - public Change entity(@javax.annotation.Nullable EntityPairKVEntity entity) { - this.entity = entity; - return this; - } - - /** - * Get entity - * @return entity - */ - @javax.annotation.Nullable - public EntityPairKVEntity getEntity() { - return entity; - } - - public void setEntity(@javax.annotation.Nullable EntityPairKVEntity entity) { - this.entity = entity; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Change change = (Change) o; - return Objects.equals(this.type, change.type) && - Objects.equals(this.entity, change.entity); - } - - @Override - public int hashCode() { - return Objects.hash(type, entity); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Change {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" entity: ").append(toIndentedString(entity)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("type", "entity")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Change - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Change.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Change is not found in the empty JSON string", Change.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Change.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Change` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - // validate the optional field `entity` - if (jsonObj.get("entity") != null && !jsonObj.get("entity").isJsonNull()) { - EntityPairKVEntity.validateJsonElement(jsonObj.get("entity")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Change.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Change' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Change.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Change value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Change read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Change given an JSON string - * - * @param jsonString JSON string - * @return An instance of Change - * @throws IOException if the JSON string is invalid with respect to Change - */ - public static Change fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Change.class); - } - - /** - * Convert an instance of Change to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/ClusterDTO.java b/java-client/src/main/java/org/openapitools/client/model/ClusterDTO.java deleted file mode 100644 index 2c159635..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/ClusterDTO.java +++ /dev/null @@ -1,496 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ClusterDTO - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class ClusterDTO { - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - @javax.annotation.Nullable - private String dataChangeCreatedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - @javax.annotation.Nullable - private String dataChangeLastModifiedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME = "dataChangeCreatedByDisplayName"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME) - @javax.annotation.Nullable - private String dataChangeCreatedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME = "dataChangeLastModifiedByDisplayName"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME) - @javax.annotation.Nullable - private String dataChangeLastModifiedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - @javax.annotation.Nullable - private String dataChangeCreatedTime; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - @javax.annotation.Nullable - private String dataChangeLastModifiedTime; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nullable - private Long id; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_APP_ID = "appId"; - @SerializedName(SERIALIZED_NAME_APP_ID) - @javax.annotation.Nonnull - private String appId; - - public static final String SERIALIZED_NAME_PARENT_CLUSTER_ID = "parentClusterId"; - @SerializedName(SERIALIZED_NAME_PARENT_CLUSTER_ID) - @javax.annotation.Nullable - private Long parentClusterId; - - public static final String SERIALIZED_NAME_COMMENT = "comment"; - @SerializedName(SERIALIZED_NAME_COMMENT) - @javax.annotation.Nullable - private String comment; - - public ClusterDTO() { - } - - public ClusterDTO dataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * - * @return dataChangeCreatedBy - */ - @javax.annotation.Nullable - public String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - public void setDataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - - public ClusterDTO dataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * - * @return dataChangeLastModifiedBy - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - public void setDataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - - public ClusterDTO dataChangeCreatedByDisplayName(@javax.annotation.Nullable String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - return this; - } - - /** - * - * @return dataChangeCreatedByDisplayName - */ - @javax.annotation.Nullable - public String getDataChangeCreatedByDisplayName() { - return dataChangeCreatedByDisplayName; - } - - public void setDataChangeCreatedByDisplayName(@javax.annotation.Nullable String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - } - - - public ClusterDTO dataChangeLastModifiedByDisplayName(@javax.annotation.Nullable String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - return this; - } - - /** - * - * @return dataChangeLastModifiedByDisplayName - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedByDisplayName() { - return dataChangeLastModifiedByDisplayName; - } - - public void setDataChangeLastModifiedByDisplayName(@javax.annotation.Nullable String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - } - - - public ClusterDTO dataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - return this; - } - - /** - * - * @return dataChangeCreatedTime - */ - @javax.annotation.Nullable - public String getDataChangeCreatedTime() { - return dataChangeCreatedTime; - } - - public void setDataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - - public ClusterDTO dataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - return this; - } - - /** - * - * @return dataChangeLastModifiedTime - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedTime() { - return dataChangeLastModifiedTime; - } - - public void setDataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - - public ClusterDTO id(@javax.annotation.Nullable Long id) { - this.id = id; - return this; - } - - /** - * - * @return id - */ - @javax.annotation.Nullable - public Long getId() { - return id; - } - - public void setId(@javax.annotation.Nullable Long id) { - this.id = id; - } - - - public ClusterDTO name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - - public ClusterDTO appId(@javax.annotation.Nonnull String appId) { - this.appId = appId; - return this; - } - - /** - * - * @return appId - */ - @javax.annotation.Nonnull - public String getAppId() { - return appId; - } - - public void setAppId(@javax.annotation.Nonnull String appId) { - this.appId = appId; - } - - - public ClusterDTO parentClusterId(@javax.annotation.Nullable Long parentClusterId) { - this.parentClusterId = parentClusterId; - return this; - } - - /** - * - * @return parentClusterId - */ - @javax.annotation.Nullable - public Long getParentClusterId() { - return parentClusterId; - } - - public void setParentClusterId(@javax.annotation.Nullable Long parentClusterId) { - this.parentClusterId = parentClusterId; - } - - - public ClusterDTO comment(@javax.annotation.Nullable String comment) { - this.comment = comment; - return this; - } - - /** - * - * @return comment - */ - @javax.annotation.Nullable - public String getComment() { - return comment; - } - - public void setComment(@javax.annotation.Nullable String comment) { - this.comment = comment; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClusterDTO clusterDTO = (ClusterDTO) o; - return Objects.equals(this.dataChangeCreatedBy, clusterDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeLastModifiedBy, clusterDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, clusterDTO.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, clusterDTO.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, clusterDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, clusterDTO.dataChangeLastModifiedTime) && - Objects.equals(this.id, clusterDTO.id) && - Objects.equals(this.name, clusterDTO.name) && - Objects.equals(this.appId, clusterDTO.appId) && - Objects.equals(this.parentClusterId, clusterDTO.parentClusterId) && - Objects.equals(this.comment, clusterDTO.comment); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, id, name, appId, parentClusterId, comment); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ClusterDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).append("\n"); - sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); - sb.append(" dataChangeLastModifiedByDisplayName: ").append(toIndentedString(dataChangeLastModifiedByDisplayName)).append("\n"); - sb.append(" dataChangeCreatedTime: ").append(toIndentedString(dataChangeCreatedTime)).append("\n"); - sb.append(" dataChangeLastModifiedTime: ").append(toIndentedString(dataChangeLastModifiedTime)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" parentClusterId: ").append(toIndentedString(parentClusterId)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "id", "name", "appId", "parentClusterId", "comment")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("name", "appId")); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ClusterDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ClusterDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ClusterDTO is not found in the empty JSON string", ClusterDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ClusterDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ClusterDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ClusterDTO.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("dataChangeCreatedBy") != null && !jsonObj.get("dataChangeCreatedBy").isJsonNull()) && !jsonObj.get("dataChangeCreatedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedBy").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedBy") != null && !jsonObj.get("dataChangeLastModifiedBy").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedBy").toString())); - } - if ((jsonObj.get("dataChangeCreatedByDisplayName") != null && !jsonObj.get("dataChangeCreatedByDisplayName").isJsonNull()) && !jsonObj.get("dataChangeCreatedByDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedByDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedByDisplayName").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedByDisplayName") != null && !jsonObj.get("dataChangeLastModifiedByDisplayName").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedByDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedByDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedByDisplayName").toString())); - } - if ((jsonObj.get("dataChangeCreatedTime") != null && !jsonObj.get("dataChangeCreatedTime").isJsonNull()) && !jsonObj.get("dataChangeCreatedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedTime").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedTime") != null && !jsonObj.get("dataChangeLastModifiedTime").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedTime").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if (!jsonObj.get("appId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); - } - if ((jsonObj.get("comment") != null && !jsonObj.get("comment").isJsonNull()) && !jsonObj.get("comment").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `comment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comment").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ClusterDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ClusterDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ClusterDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ClusterDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ClusterDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ClusterDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of ClusterDTO - * @throws IOException if the JSON string is invalid with respect to ClusterDTO - */ - public static ClusterDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ClusterDTO.class); - } - - /** - * Convert an instance of ClusterDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/EntityPairKVEntity.java b/java-client/src/main/java/org/openapitools/client/model/EntityPairKVEntity.java deleted file mode 100644 index aafa8bbb..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/EntityPairKVEntity.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.KVEntity; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * EntityPairKVEntity - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class EntityPairKVEntity { - public static final String SERIALIZED_NAME_FIRST_ENTITY = "firstEntity"; - @SerializedName(SERIALIZED_NAME_FIRST_ENTITY) - @javax.annotation.Nullable - private KVEntity firstEntity; - - public static final String SERIALIZED_NAME_SECOND_ENTITY = "secondEntity"; - @SerializedName(SERIALIZED_NAME_SECOND_ENTITY) - @javax.annotation.Nullable - private KVEntity secondEntity; - - public EntityPairKVEntity() { - } - - public EntityPairKVEntity firstEntity(@javax.annotation.Nullable KVEntity firstEntity) { - this.firstEntity = firstEntity; - return this; - } - - /** - * Get firstEntity - * @return firstEntity - */ - @javax.annotation.Nullable - public KVEntity getFirstEntity() { - return firstEntity; - } - - public void setFirstEntity(@javax.annotation.Nullable KVEntity firstEntity) { - this.firstEntity = firstEntity; - } - - - public EntityPairKVEntity secondEntity(@javax.annotation.Nullable KVEntity secondEntity) { - this.secondEntity = secondEntity; - return this; - } - - /** - * Get secondEntity - * @return secondEntity - */ - @javax.annotation.Nullable - public KVEntity getSecondEntity() { - return secondEntity; - } - - public void setSecondEntity(@javax.annotation.Nullable KVEntity secondEntity) { - this.secondEntity = secondEntity; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EntityPairKVEntity entityPairKVEntity = (EntityPairKVEntity) o; - return Objects.equals(this.firstEntity, entityPairKVEntity.firstEntity) && - Objects.equals(this.secondEntity, entityPairKVEntity.secondEntity); - } - - @Override - public int hashCode() { - return Objects.hash(firstEntity, secondEntity); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EntityPairKVEntity {\n"); - sb.append(" firstEntity: ").append(toIndentedString(firstEntity)).append("\n"); - sb.append(" secondEntity: ").append(toIndentedString(secondEntity)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("firstEntity", "secondEntity")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to EntityPairKVEntity - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!EntityPairKVEntity.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in EntityPairKVEntity is not found in the empty JSON string", EntityPairKVEntity.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!EntityPairKVEntity.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EntityPairKVEntity` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `firstEntity` - if (jsonObj.get("firstEntity") != null && !jsonObj.get("firstEntity").isJsonNull()) { - KVEntity.validateJsonElement(jsonObj.get("firstEntity")); - } - // validate the optional field `secondEntity` - if (jsonObj.get("secondEntity") != null && !jsonObj.get("secondEntity").isJsonNull()) { - KVEntity.validateJsonElement(jsonObj.get("secondEntity")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!EntityPairKVEntity.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'EntityPairKVEntity' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(EntityPairKVEntity.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, EntityPairKVEntity value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public EntityPairKVEntity read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of EntityPairKVEntity given an JSON string - * - * @param jsonString JSON string - * @return An instance of EntityPairKVEntity - * @throws IOException if the JSON string is invalid with respect to EntityPairKVEntity - */ - public static EntityPairKVEntity fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, EntityPairKVEntity.class); - } - - /** - * Convert an instance of EntityPairKVEntity to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/ItemDTO.java b/java-client/src/main/java/org/openapitools/client/model/ItemDTO.java deleted file mode 100644 index 3014c56f..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/ItemDTO.java +++ /dev/null @@ -1,541 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ItemDTO - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class ItemDTO { - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - @javax.annotation.Nullable - private String dataChangeCreatedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - @javax.annotation.Nullable - private String dataChangeLastModifiedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME = "dataChangeCreatedByDisplayName"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME) - @javax.annotation.Nullable - private String dataChangeCreatedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME = "dataChangeLastModifiedByDisplayName"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME) - @javax.annotation.Nullable - private String dataChangeLastModifiedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - @javax.annotation.Nullable - private String dataChangeCreatedTime; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - @javax.annotation.Nullable - private String dataChangeLastModifiedTime; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nullable - private Long id; - - public static final String SERIALIZED_NAME_NAMESPACE_ID = "namespaceId"; - @SerializedName(SERIALIZED_NAME_NAMESPACE_ID) - @javax.annotation.Nullable - private Long namespaceId; - - public static final String SERIALIZED_NAME_KEY = "key"; - @SerializedName(SERIALIZED_NAME_KEY) - @javax.annotation.Nullable - private String key; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private Integer type; - - public static final String SERIALIZED_NAME_VALUE = "value"; - @SerializedName(SERIALIZED_NAME_VALUE) - @javax.annotation.Nullable - private String value; - - public static final String SERIALIZED_NAME_COMMENT = "comment"; - @SerializedName(SERIALIZED_NAME_COMMENT) - @javax.annotation.Nullable - private String comment; - - public static final String SERIALIZED_NAME_LINE_NUM = "lineNum"; - @SerializedName(SERIALIZED_NAME_LINE_NUM) - @javax.annotation.Nullable - private Integer lineNum; - - public ItemDTO() { - } - - public ItemDTO dataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * - * @return dataChangeCreatedBy - */ - @javax.annotation.Nullable - public String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - public void setDataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - - public ItemDTO dataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * - * @return dataChangeLastModifiedBy - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - public void setDataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - - public ItemDTO dataChangeCreatedByDisplayName(@javax.annotation.Nullable String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - return this; - } - - /** - * - * @return dataChangeCreatedByDisplayName - */ - @javax.annotation.Nullable - public String getDataChangeCreatedByDisplayName() { - return dataChangeCreatedByDisplayName; - } - - public void setDataChangeCreatedByDisplayName(@javax.annotation.Nullable String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - } - - - public ItemDTO dataChangeLastModifiedByDisplayName(@javax.annotation.Nullable String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - return this; - } - - /** - * - * @return dataChangeLastModifiedByDisplayName - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedByDisplayName() { - return dataChangeLastModifiedByDisplayName; - } - - public void setDataChangeLastModifiedByDisplayName(@javax.annotation.Nullable String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - } - - - public ItemDTO dataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - return this; - } - - /** - * - * @return dataChangeCreatedTime - */ - @javax.annotation.Nullable - public String getDataChangeCreatedTime() { - return dataChangeCreatedTime; - } - - public void setDataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - - public ItemDTO dataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - return this; - } - - /** - * - * @return dataChangeLastModifiedTime - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedTime() { - return dataChangeLastModifiedTime; - } - - public void setDataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - - public ItemDTO id(@javax.annotation.Nullable Long id) { - this.id = id; - return this; - } - - /** - * - * @return id - */ - @javax.annotation.Nullable - public Long getId() { - return id; - } - - public void setId(@javax.annotation.Nullable Long id) { - this.id = id; - } - - - public ItemDTO namespaceId(@javax.annotation.Nullable Long namespaceId) { - this.namespaceId = namespaceId; - return this; - } - - /** - * - * @return namespaceId - */ - @javax.annotation.Nullable - public Long getNamespaceId() { - return namespaceId; - } - - public void setNamespaceId(@javax.annotation.Nullable Long namespaceId) { - this.namespaceId = namespaceId; - } - - - public ItemDTO key(@javax.annotation.Nullable String key) { - this.key = key; - return this; - } - - /** - * - * @return key - */ - @javax.annotation.Nullable - public String getKey() { - return key; - } - - public void setKey(@javax.annotation.Nullable String key) { - this.key = key; - } - - - public ItemDTO type(@javax.annotation.Nullable Integer type) { - this.type = type; - return this; - } - - /** - * - * @return type - */ - @javax.annotation.Nullable - public Integer getType() { - return type; - } - - public void setType(@javax.annotation.Nullable Integer type) { - this.type = type; - } - - - public ItemDTO value(@javax.annotation.Nullable String value) { - this.value = value; - return this; - } - - /** - * - * @return value - */ - @javax.annotation.Nullable - public String getValue() { - return value; - } - - public void setValue(@javax.annotation.Nullable String value) { - this.value = value; - } - - - public ItemDTO comment(@javax.annotation.Nullable String comment) { - this.comment = comment; - return this; - } - - /** - * - * @return comment - */ - @javax.annotation.Nullable - public String getComment() { - return comment; - } - - public void setComment(@javax.annotation.Nullable String comment) { - this.comment = comment; - } - - - public ItemDTO lineNum(@javax.annotation.Nullable Integer lineNum) { - this.lineNum = lineNum; - return this; - } - - /** - * - * @return lineNum - */ - @javax.annotation.Nullable - public Integer getLineNum() { - return lineNum; - } - - public void setLineNum(@javax.annotation.Nullable Integer lineNum) { - this.lineNum = lineNum; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ItemDTO itemDTO = (ItemDTO) o; - return Objects.equals(this.dataChangeCreatedBy, itemDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeLastModifiedBy, itemDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, itemDTO.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, itemDTO.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, itemDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, itemDTO.dataChangeLastModifiedTime) && - Objects.equals(this.id, itemDTO.id) && - Objects.equals(this.namespaceId, itemDTO.namespaceId) && - Objects.equals(this.key, itemDTO.key) && - Objects.equals(this.type, itemDTO.type) && - Objects.equals(this.value, itemDTO.value) && - Objects.equals(this.comment, itemDTO.comment) && - Objects.equals(this.lineNum, itemDTO.lineNum); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, id, namespaceId, key, type, value, comment, lineNum); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ItemDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).append("\n"); - sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); - sb.append(" dataChangeLastModifiedByDisplayName: ").append(toIndentedString(dataChangeLastModifiedByDisplayName)).append("\n"); - sb.append(" dataChangeCreatedTime: ").append(toIndentedString(dataChangeCreatedTime)).append("\n"); - sb.append(" dataChangeLastModifiedTime: ").append(toIndentedString(dataChangeLastModifiedTime)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" namespaceId: ").append(toIndentedString(namespaceId)).append("\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append(" lineNum: ").append(toIndentedString(lineNum)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "id", "namespaceId", "key", "type", "value", "comment", "lineNum")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ItemDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ItemDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ItemDTO is not found in the empty JSON string", ItemDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ItemDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ItemDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("dataChangeCreatedBy") != null && !jsonObj.get("dataChangeCreatedBy").isJsonNull()) && !jsonObj.get("dataChangeCreatedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedBy").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedBy") != null && !jsonObj.get("dataChangeLastModifiedBy").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedBy").toString())); - } - if ((jsonObj.get("dataChangeCreatedByDisplayName") != null && !jsonObj.get("dataChangeCreatedByDisplayName").isJsonNull()) && !jsonObj.get("dataChangeCreatedByDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedByDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedByDisplayName").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedByDisplayName") != null && !jsonObj.get("dataChangeLastModifiedByDisplayName").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedByDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedByDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedByDisplayName").toString())); - } - if ((jsonObj.get("dataChangeCreatedTime") != null && !jsonObj.get("dataChangeCreatedTime").isJsonNull()) && !jsonObj.get("dataChangeCreatedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedTime").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedTime") != null && !jsonObj.get("dataChangeLastModifiedTime").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedTime").toString())); - } - if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) && !jsonObj.get("key").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); - } - if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) && !jsonObj.get("value").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); - } - if ((jsonObj.get("comment") != null && !jsonObj.get("comment").isJsonNull()) && !jsonObj.get("comment").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `comment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comment").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ItemDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ItemDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ItemDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ItemDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ItemDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ItemDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of ItemDTO - * @throws IOException if the JSON string is invalid with respect to ItemDTO - */ - public static ItemDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ItemDTO.class); - } - - /** - * Convert an instance of ItemDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/KVEntity.java b/java-client/src/main/java/org/openapitools/client/model/KVEntity.java index bebc0fac..9de12ed5 100644 --- a/java-client/src/main/java/org/openapitools/client/model/KVEntity.java +++ b/java-client/src/main/java/org/openapitools/client/model/KVEntity.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -37,10 +37,12 @@ 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; @@ -48,55 +50,57 @@ /** * KVEntity */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") public class KVEntity { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) - @javax.annotation.Nullable private String key; public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) - @javax.annotation.Nullable private String value; public KVEntity() { } - public KVEntity key(@javax.annotation.Nullable String key) { + public KVEntity key(String key) { + this.key = key; return this; } - /** - * + /** + * 键 * @return key - */ + **/ @javax.annotation.Nullable public String getKey() { return key; } - public void setKey(@javax.annotation.Nullable String key) { + + public void setKey(String key) { this.key = key; } - public KVEntity value(@javax.annotation.Nullable String value) { + public KVEntity value(String value) { + this.value = value; return this; } - /** - * + /** + * 值 * @return value - */ + **/ @javax.annotation.Nullable public String getValue() { return value; } - public void setValue(@javax.annotation.Nullable String value) { + + public void setValue(String value) { this.value = value; } @@ -147,33 +151,34 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("key", "value")); + openapiFields = new HashSet(); + openapiFields.add("key"); + openapiFields.add("value"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to KVEntity - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!KVEntity.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + 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 KVEntity + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!KVEntity.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in KVEntity is not found in the empty JSON string", KVEntity.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { + for (Entry entry : entries) { if (!KVEntity.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `KVEntity` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `KVEntity` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) && !jsonObj.get("key").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); } @@ -202,33 +207,32 @@ public void write(JsonWriter out, KVEntity value) throws IOException { @Override public KVEntity read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); } } - /** - * Create an instance of KVEntity given an JSON string - * - * @param jsonString JSON string - * @return An instance of KVEntity - * @throws IOException if the JSON string is invalid with respect to KVEntity - */ + /** + * Create an instance of KVEntity given an JSON string + * + * @param jsonString JSON string + * @return An instance of KVEntity + * @throws IOException if the JSON string is invalid with respect to KVEntity + */ public static KVEntity fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, KVEntity.class); } - /** - * Convert an instance of KVEntity to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of KVEntity to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } } - diff --git a/java-client/src/main/java/org/openapitools/client/model/MapString.java b/java-client/src/main/java/org/openapitools/client/model/MapString.java deleted file mode 100644 index eabeaf98..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/MapString.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * 字符串映射对象,用于表示键值对的配置数据结构 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class MapString { - public static final String SERIALIZED_NAME_KEY = "key"; - @SerializedName(SERIALIZED_NAME_KEY) - @javax.annotation.Nullable - private String key; - - public MapString() { - } - - public MapString key(@javax.annotation.Nullable String key) { - this.key = key; - return this; - } - - /** - * Get key - * @return key - */ - @javax.annotation.Nullable - public String getKey() { - return key; - } - - public void setKey(@javax.annotation.Nullable String key) { - this.key = key; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MapString mapString = (MapString) o; - return Objects.equals(this.key, mapString.key); - } - - @Override - public int hashCode() { - return Objects.hash(key); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MapString {\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("key")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MapString - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MapString.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MapString is not found in the empty JSON string", MapString.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MapString.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MapString` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) && !jsonObj.get("key").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MapString.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MapString' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(MapString.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, MapString value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MapString read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of MapString given an JSON string - * - * @param jsonString JSON string - * @return An instance of MapString - * @throws IOException if the JSON string is invalid with respect to MapString - */ - public static MapString fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MapString.class); - } - - /** - * Convert an instance of MapString to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/MultiResponseEntity.java b/java-client/src/main/java/org/openapitools/client/model/MultiResponseEntity.java new file mode 100644 index 00000000..7b0955ab --- /dev/null +++ b/java-client/src/main/java/org/openapitools/client/model/MultiResponseEntity.java @@ -0,0 +1,262 @@ +/* + * Apollo OpenAPI + *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
+ * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.RichResponseEntity; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * A response container holding multiple RichResponseEntity objects + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +public class MultiResponseEntity { + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private Integer code; + + public static final String SERIALIZED_NAME_ENTITIES = "entities"; + @SerializedName(SERIALIZED_NAME_ENTITIES) + private List entities = new ArrayList<>(); + + public MultiResponseEntity() { + } + + public MultiResponseEntity code(Integer code) { + + this.code = code; + return this; + } + + /** + * Overall HTTP status code + * @return code + **/ + @javax.annotation.Nonnull + public Integer getCode() { + return code; + } + + + public void setCode(Integer code) { + this.code = code; + } + + + public MultiResponseEntity entities(List entities) { + + this.entities = entities; + return this; + } + + public MultiResponseEntity addEntitiesItem(RichResponseEntity entitiesItem) { + if (this.entities == null) { + this.entities = new ArrayList<>(); + } + this.entities.add(entitiesItem); + return this; + } + + /** + * List of rich response entities + * @return entities + **/ + @javax.annotation.Nonnull + public List getEntities() { + return entities; + } + + + public void setEntities(List entities) { + this.entities = entities; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MultiResponseEntity multiResponseEntity = (MultiResponseEntity) o; + return Objects.equals(this.code, multiResponseEntity.code) && + Objects.equals(this.entities, multiResponseEntity.entities); + } + + @Override + public int hashCode() { + return Objects.hash(code, entities); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MultiResponseEntity {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" entities: ").append(toIndentedString(entities)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + 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("entities"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("code"); + openapiRequiredFields.add("entities"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to MultiResponseEntity + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!MultiResponseEntity.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in MultiResponseEntity is not found in the empty JSON string", MultiResponseEntity.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!MultiResponseEntity.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MultiResponseEntity` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : MultiResponseEntity.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + // ensure the json data is an array + if (!jsonObj.get("entities").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `entities` to be an array in the JSON string but got `%s`", jsonObj.get("entities").toString())); + } + + JsonArray jsonArrayentities = jsonObj.getAsJsonArray("entities"); + // validate the required field `entities` (array) + for (int i = 0; i < jsonArrayentities.size(); i++) { + RichResponseEntity.validateJsonObject(jsonArrayentities.get(i).getAsJsonObject()); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MultiResponseEntity.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MultiResponseEntity' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MultiResponseEntity.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MultiResponseEntity value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MultiResponseEntity read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of MultiResponseEntity given an JSON string + * + * @param jsonString JSON string + * @return An instance of MultiResponseEntity + * @throws IOException if the JSON string is invalid with respect to MultiResponseEntity + */ + public static MultiResponseEntity fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MultiResponseEntity.class); + } + + /** + * Convert an instance of MultiResponseEntity to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/java-client/src/main/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTO.java b/java-client/src/main/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTO.java index 27a2b2fb..d8c95953 100644 --- a/java-client/src/main/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTO.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,6 +14,7 @@ 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; @@ -21,7 +22,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -39,10 +39,12 @@ 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; @@ -50,113 +52,117 @@ /** * 命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") public class NamespaceGrayDelReleaseDTO { public static final String SERIALIZED_NAME_RELEASE_TITLE = "releaseTitle"; @SerializedName(SERIALIZED_NAME_RELEASE_TITLE) - @javax.annotation.Nullable private String releaseTitle; public static final String SERIALIZED_NAME_RELEASE_COMMENT = "releaseComment"; @SerializedName(SERIALIZED_NAME_RELEASE_COMMENT) - @javax.annotation.Nullable private String releaseComment; public static final String SERIALIZED_NAME_RELEASED_BY = "releasedBy"; @SerializedName(SERIALIZED_NAME_RELEASED_BY) - @javax.annotation.Nullable private String releasedBy; public static final String SERIALIZED_NAME_IS_EMERGENCY_PUBLISH = "isEmergencyPublish"; @SerializedName(SERIALIZED_NAME_IS_EMERGENCY_PUBLISH) - @javax.annotation.Nullable private Boolean isEmergencyPublish; public static final String SERIALIZED_NAME_GRAY_DEL_KEYS = "grayDelKeys"; @SerializedName(SERIALIZED_NAME_GRAY_DEL_KEYS) - @javax.annotation.Nullable - private List grayDelKeys = new ArrayList<>(); + private List grayDelKeys; public NamespaceGrayDelReleaseDTO() { } - public NamespaceGrayDelReleaseDTO releaseTitle(@javax.annotation.Nullable String releaseTitle) { + public NamespaceGrayDelReleaseDTO releaseTitle(String releaseTitle) { + this.releaseTitle = releaseTitle; return this; } - /** + /** * 发布标题,用于标识这次灰度删除发布的名称或版本号 * @return releaseTitle - */ + **/ @javax.annotation.Nullable public String getReleaseTitle() { return releaseTitle; } - public void setReleaseTitle(@javax.annotation.Nullable String releaseTitle) { + + public void setReleaseTitle(String releaseTitle) { this.releaseTitle = releaseTitle; } - public NamespaceGrayDelReleaseDTO releaseComment(@javax.annotation.Nullable String releaseComment) { + public NamespaceGrayDelReleaseDTO releaseComment(String releaseComment) { + this.releaseComment = releaseComment; return this; } - /** + /** * 发布备注,详细描述本次灰度删除发布的目的和删除的配置项 * @return releaseComment - */ + **/ @javax.annotation.Nullable public String getReleaseComment() { return releaseComment; } - public void setReleaseComment(@javax.annotation.Nullable String releaseComment) { + + public void setReleaseComment(String releaseComment) { this.releaseComment = releaseComment; } - public NamespaceGrayDelReleaseDTO releasedBy(@javax.annotation.Nullable String releasedBy) { + public NamespaceGrayDelReleaseDTO releasedBy(String releasedBy) { + this.releasedBy = releasedBy; return this; } - /** + /** * 发布操作者用户名,记录是谁执行了这次灰度删除发布操作 * @return releasedBy - */ + **/ @javax.annotation.Nullable public String getReleasedBy() { return releasedBy; } - public void setReleasedBy(@javax.annotation.Nullable String releasedBy) { + + public void setReleasedBy(String releasedBy) { this.releasedBy = releasedBy; } - public NamespaceGrayDelReleaseDTO isEmergencyPublish(@javax.annotation.Nullable Boolean isEmergencyPublish) { + public NamespaceGrayDelReleaseDTO isEmergencyPublish(Boolean isEmergencyPublish) { + this.isEmergencyPublish = isEmergencyPublish; return this; } - /** + /** * 是否为紧急发布,紧急发布可能会跳过某些审核流程 * @return isEmergencyPublish - */ + **/ @javax.annotation.Nullable public Boolean getIsEmergencyPublish() { return isEmergencyPublish; } - public void setIsEmergencyPublish(@javax.annotation.Nullable Boolean isEmergencyPublish) { + + public void setIsEmergencyPublish(Boolean isEmergencyPublish) { this.isEmergencyPublish = isEmergencyPublish; } - public NamespaceGrayDelReleaseDTO grayDelKeys(@javax.annotation.Nullable List grayDelKeys) { + public NamespaceGrayDelReleaseDTO grayDelKeys(List grayDelKeys) { + this.grayDelKeys = grayDelKeys; return this; } @@ -169,16 +175,17 @@ public NamespaceGrayDelReleaseDTO addGrayDelKeysItem(String grayDelKeysItem) { return this; } - /** + /** * 需要在灰度发布中删除的配置项键名列表 * @return grayDelKeys - */ + **/ @javax.annotation.Nullable public List getGrayDelKeys() { return grayDelKeys; } - public void setGrayDelKeys(@javax.annotation.Nullable List grayDelKeys) { + + public void setGrayDelKeys(List grayDelKeys) { this.grayDelKeys = grayDelKeys; } @@ -235,33 +242,37 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("releaseTitle", "releaseComment", "releasedBy", "isEmergencyPublish", "grayDelKeys")); + openapiFields = new HashSet(); + openapiFields.add("releaseTitle"); + openapiFields.add("releaseComment"); + openapiFields.add("releasedBy"); + openapiFields.add("isEmergencyPublish"); + openapiFields.add("grayDelKeys"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to NamespaceGrayDelReleaseDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!NamespaceGrayDelReleaseDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + /** + * 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 NamespaceGrayDelReleaseDTO + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!NamespaceGrayDelReleaseDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in NamespaceGrayDelReleaseDTO is not found in the empty JSON string", NamespaceGrayDelReleaseDTO.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { + for (Entry entry : entries) { if (!NamespaceGrayDelReleaseDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NamespaceGrayDelReleaseDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NamespaceGrayDelReleaseDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("releaseTitle") != null && !jsonObj.get("releaseTitle").isJsonNull()) && !jsonObj.get("releaseTitle").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `releaseTitle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("releaseTitle").toString())); } @@ -272,7 +283,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `releasedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("releasedBy").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("grayDelKeys") != null && !jsonObj.get("grayDelKeys").isJsonNull() && !jsonObj.get("grayDelKeys").isJsonArray()) { + if (jsonObj.get("grayDelKeys") != null && !jsonObj.get("grayDelKeys").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `grayDelKeys` to be an array in the JSON string but got `%s`", jsonObj.get("grayDelKeys").toString())); } } @@ -297,33 +308,32 @@ public void write(JsonWriter out, NamespaceGrayDelReleaseDTO value) throws IOExc @Override public NamespaceGrayDelReleaseDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); } } - /** - * Create an instance of NamespaceGrayDelReleaseDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of NamespaceGrayDelReleaseDTO - * @throws IOException if the JSON string is invalid with respect to NamespaceGrayDelReleaseDTO - */ + /** + * Create an instance of NamespaceGrayDelReleaseDTO given an JSON string + * + * @param jsonString JSON string + * @return An instance of NamespaceGrayDelReleaseDTO + * @throws IOException if the JSON string is invalid with respect to NamespaceGrayDelReleaseDTO + */ public static NamespaceGrayDelReleaseDTO fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, NamespaceGrayDelReleaseDTO.class); } - /** - * Convert an instance of NamespaceGrayDelReleaseDTO to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of NamespaceGrayDelReleaseDTO to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } } - diff --git a/java-client/src/main/java/org/openapitools/client/model/NamespaceReleaseDTO.java b/java-client/src/main/java/org/openapitools/client/model/NamespaceReleaseDTO.java index 96cb05eb..0eb25a84 100644 --- a/java-client/src/main/java/org/openapitools/client/model/NamespaceReleaseDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/NamespaceReleaseDTO.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -37,10 +37,12 @@ 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; @@ -48,103 +50,107 @@ /** * 命名空间发布请求数据传输对象,用于创建新的配置发布 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") public class NamespaceReleaseDTO { public static final String SERIALIZED_NAME_RELEASE_TITLE = "releaseTitle"; @SerializedName(SERIALIZED_NAME_RELEASE_TITLE) - @javax.annotation.Nullable private String releaseTitle; public static final String SERIALIZED_NAME_RELEASE_COMMENT = "releaseComment"; @SerializedName(SERIALIZED_NAME_RELEASE_COMMENT) - @javax.annotation.Nullable private String releaseComment; public static final String SERIALIZED_NAME_RELEASED_BY = "releasedBy"; @SerializedName(SERIALIZED_NAME_RELEASED_BY) - @javax.annotation.Nullable private String releasedBy; public static final String SERIALIZED_NAME_IS_EMERGENCY_PUBLISH = "isEmergencyPublish"; @SerializedName(SERIALIZED_NAME_IS_EMERGENCY_PUBLISH) - @javax.annotation.Nullable private Boolean isEmergencyPublish; public NamespaceReleaseDTO() { } - public NamespaceReleaseDTO releaseTitle(@javax.annotation.Nullable String releaseTitle) { + public NamespaceReleaseDTO releaseTitle(String releaseTitle) { + this.releaseTitle = releaseTitle; return this; } - /** + /** * 发布标题,用于标识这次发布的名称或版本号 * @return releaseTitle - */ + **/ @javax.annotation.Nullable public String getReleaseTitle() { return releaseTitle; } - public void setReleaseTitle(@javax.annotation.Nullable String releaseTitle) { + + public void setReleaseTitle(String releaseTitle) { this.releaseTitle = releaseTitle; } - public NamespaceReleaseDTO releaseComment(@javax.annotation.Nullable String releaseComment) { + public NamespaceReleaseDTO releaseComment(String releaseComment) { + this.releaseComment = releaseComment; return this; } - /** + /** * 发布备注,详细描述本次发布的变更内容和目的 * @return releaseComment - */ + **/ @javax.annotation.Nullable public String getReleaseComment() { return releaseComment; } - public void setReleaseComment(@javax.annotation.Nullable String releaseComment) { + + public void setReleaseComment(String releaseComment) { this.releaseComment = releaseComment; } - public NamespaceReleaseDTO releasedBy(@javax.annotation.Nullable String releasedBy) { + public NamespaceReleaseDTO releasedBy(String releasedBy) { + this.releasedBy = releasedBy; return this; } - /** + /** * 发布操作者用户名,记录是谁执行了这次发布操作 * @return releasedBy - */ + **/ @javax.annotation.Nullable public String getReleasedBy() { return releasedBy; } - public void setReleasedBy(@javax.annotation.Nullable String releasedBy) { + + public void setReleasedBy(String releasedBy) { this.releasedBy = releasedBy; } - public NamespaceReleaseDTO isEmergencyPublish(@javax.annotation.Nullable Boolean isEmergencyPublish) { + public NamespaceReleaseDTO isEmergencyPublish(Boolean isEmergencyPublish) { + this.isEmergencyPublish = isEmergencyPublish; return this; } - /** + /** * 是否为紧急发布,紧急发布可能会跳过某些审核流程 * @return isEmergencyPublish - */ + **/ @javax.annotation.Nullable public Boolean getIsEmergencyPublish() { return isEmergencyPublish; } - public void setIsEmergencyPublish(@javax.annotation.Nullable Boolean isEmergencyPublish) { + + public void setIsEmergencyPublish(Boolean isEmergencyPublish) { this.isEmergencyPublish = isEmergencyPublish; } @@ -199,33 +205,36 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("releaseTitle", "releaseComment", "releasedBy", "isEmergencyPublish")); + openapiFields = new HashSet(); + openapiFields.add("releaseTitle"); + openapiFields.add("releaseComment"); + openapiFields.add("releasedBy"); + openapiFields.add("isEmergencyPublish"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to NamespaceReleaseDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!NamespaceReleaseDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + /** + * 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 NamespaceReleaseDTO + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!NamespaceReleaseDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in NamespaceReleaseDTO is not found in the empty JSON string", NamespaceReleaseDTO.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { + for (Entry entry : entries) { if (!NamespaceReleaseDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NamespaceReleaseDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NamespaceReleaseDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("releaseTitle") != null && !jsonObj.get("releaseTitle").isJsonNull()) && !jsonObj.get("releaseTitle").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `releaseTitle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("releaseTitle").toString())); } @@ -257,33 +266,32 @@ public void write(JsonWriter out, NamespaceReleaseDTO value) throws IOException @Override public NamespaceReleaseDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); } } - /** - * Create an instance of NamespaceReleaseDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of NamespaceReleaseDTO - * @throws IOException if the JSON string is invalid with respect to NamespaceReleaseDTO - */ + /** + * Create an instance of NamespaceReleaseDTO given an JSON string + * + * @param jsonString JSON string + * @return An instance of NamespaceReleaseDTO + * @throws IOException if the JSON string is invalid with respect to NamespaceReleaseDTO + */ public static NamespaceReleaseDTO fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, NamespaceReleaseDTO.class); } - /** - * Convert an instance of NamespaceReleaseDTO to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of NamespaceReleaseDTO to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } } - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenAppDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenAppDTO.java index 94166dbe..52396909 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 @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -37,10 +37,12 @@ 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; @@ -48,247 +50,257 @@ /** * Apollo应用信息数据传输对象,包含应用的基本信息和元数据 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") public class OpenAppDTO { public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - @javax.annotation.Nullable private String dataChangeCreatedBy; public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - @javax.annotation.Nullable private String dataChangeLastModifiedBy; public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - @javax.annotation.Nullable private String dataChangeCreatedTime; public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - @javax.annotation.Nullable private String dataChangeLastModifiedTime; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_APP_ID = "appId"; @SerializedName(SERIALIZED_NAME_APP_ID) - @javax.annotation.Nullable private String appId; public static final String SERIALIZED_NAME_ORG_ID = "orgId"; @SerializedName(SERIALIZED_NAME_ORG_ID) - @javax.annotation.Nullable private String orgId; public static final String SERIALIZED_NAME_ORG_NAME = "orgName"; @SerializedName(SERIALIZED_NAME_ORG_NAME) - @javax.annotation.Nullable private String orgName; public static final String SERIALIZED_NAME_OWNER_NAME = "ownerName"; @SerializedName(SERIALIZED_NAME_OWNER_NAME) - @javax.annotation.Nullable private String ownerName; public static final String SERIALIZED_NAME_OWNER_EMAIL = "ownerEmail"; @SerializedName(SERIALIZED_NAME_OWNER_EMAIL) - @javax.annotation.Nullable private String ownerEmail; public OpenAppDTO() { } - public OpenAppDTO dataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { + public OpenAppDTO dataChangeCreatedBy(String dataChangeCreatedBy) { + this.dataChangeCreatedBy = dataChangeCreatedBy; return this; } - /** + /** * 数据创建者用户名,记录是谁创建了这个应用 * @return dataChangeCreatedBy - */ + **/ @javax.annotation.Nullable public String getDataChangeCreatedBy() { return dataChangeCreatedBy; } - public void setDataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { + + public void setDataChangeCreatedBy(String dataChangeCreatedBy) { this.dataChangeCreatedBy = dataChangeCreatedBy; } - public OpenAppDTO dataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { + public OpenAppDTO dataChangeLastModifiedBy(String dataChangeLastModifiedBy) { + this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; return this; } - /** + /** * 数据最后修改者用户名,记录最后一次修改应用信息的用户 * @return dataChangeLastModifiedBy - */ + **/ @javax.annotation.Nullable public String getDataChangeLastModifiedBy() { return dataChangeLastModifiedBy; } - public void setDataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { + + public void setDataChangeLastModifiedBy(String dataChangeLastModifiedBy) { this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; } - public OpenAppDTO dataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { + public OpenAppDTO dataChangeCreatedTime(String dataChangeCreatedTime) { + this.dataChangeCreatedTime = dataChangeCreatedTime; return this; } - /** + /** * 数据创建时间,ISO 8601格式的时间戳 * @return dataChangeCreatedTime - */ + **/ @javax.annotation.Nullable public String getDataChangeCreatedTime() { return dataChangeCreatedTime; } - public void setDataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { + + public void setDataChangeCreatedTime(String dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; } - public OpenAppDTO dataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { + public OpenAppDTO dataChangeLastModifiedTime(String dataChangeLastModifiedTime) { + this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; return this; } - /** + /** * 数据最后修改时间,ISO 8601格式的时间戳 * @return dataChangeLastModifiedTime - */ + **/ @javax.annotation.Nullable public String getDataChangeLastModifiedTime() { return dataChangeLastModifiedTime; } - public void setDataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { + + public void setDataChangeLastModifiedTime(String dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; } - public OpenAppDTO name(@javax.annotation.Nullable String name) { + public OpenAppDTO name(String name) { + this.name = name; return this; } - /** + /** * 应用名称,用于显示的友好名称 * @return name - */ + **/ @javax.annotation.Nullable public String getName() { return name; } - public void setName(@javax.annotation.Nullable String name) { + + public void setName(String name) { this.name = name; } - public OpenAppDTO appId(@javax.annotation.Nullable String appId) { + public OpenAppDTO appId(String appId) { + this.appId = appId; return this; } - /** + /** * 应用唯一标识符,全局唯一的应用ID * @return appId - */ + **/ @javax.annotation.Nullable public String getAppId() { return appId; } - public void setAppId(@javax.annotation.Nullable String appId) { + + public void setAppId(String appId) { this.appId = appId; } - public OpenAppDTO orgId(@javax.annotation.Nullable String orgId) { + public OpenAppDTO orgId(String orgId) { + this.orgId = orgId; return this; } - /** + /** * 组织ID,应用所属组织的唯一标识 * @return orgId - */ + **/ @javax.annotation.Nullable public String getOrgId() { return orgId; } - public void setOrgId(@javax.annotation.Nullable String orgId) { + + public void setOrgId(String orgId) { this.orgId = orgId; } - public OpenAppDTO orgName(@javax.annotation.Nullable String orgName) { + public OpenAppDTO orgName(String orgName) { + this.orgName = orgName; return this; } - /** + /** * 组织名称,应用所属组织的显示名称 * @return orgName - */ + **/ @javax.annotation.Nullable public String getOrgName() { return orgName; } - public void setOrgName(@javax.annotation.Nullable String orgName) { + + public void setOrgName(String orgName) { this.orgName = orgName; } - public OpenAppDTO ownerName(@javax.annotation.Nullable String ownerName) { + public OpenAppDTO ownerName(String ownerName) { + this.ownerName = ownerName; return this; } - /** + /** * 应用负责人姓名,应用的主要负责人 * @return ownerName - */ + **/ @javax.annotation.Nullable public String getOwnerName() { return ownerName; } - public void setOwnerName(@javax.annotation.Nullable String ownerName) { + + public void setOwnerName(String ownerName) { this.ownerName = ownerName; } - public OpenAppDTO ownerEmail(@javax.annotation.Nullable String ownerEmail) { + public OpenAppDTO ownerEmail(String ownerEmail) { + this.ownerEmail = ownerEmail; return this; } - /** + /** * 应用负责人邮箱地址,用于接收应用相关通知 * @return ownerEmail - */ + **/ @javax.annotation.Nullable public String getOwnerEmail() { return ownerEmail; } - public void setOwnerEmail(@javax.annotation.Nullable String ownerEmail) { + + public void setOwnerEmail(String ownerEmail) { this.ownerEmail = ownerEmail; } @@ -355,33 +367,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "orgId", "orgName", "ownerName", "ownerEmail")); + openapiFields = new HashSet(); + openapiFields.add("dataChangeCreatedBy"); + openapiFields.add("dataChangeLastModifiedBy"); + openapiFields.add("dataChangeCreatedTime"); + openapiFields.add("dataChangeLastModifiedTime"); + openapiFields.add("name"); + openapiFields.add("appId"); + openapiFields.add("orgId"); + openapiFields.add("orgName"); + openapiFields.add("ownerName"); + openapiFields.add("ownerEmail"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenAppDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenAppDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + 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 OpenAppDTO + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OpenAppDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in OpenAppDTO is not found in the empty JSON string", OpenAppDTO.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { + for (Entry entry : entries) { if (!OpenAppDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenAppDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenAppDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("dataChangeCreatedBy") != null && !jsonObj.get("dataChangeCreatedBy").isJsonNull()) && !jsonObj.get("dataChangeCreatedBy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedBy").toString())); } @@ -434,33 +455,32 @@ public void write(JsonWriter out, OpenAppDTO value) throws IOException { @Override public OpenAppDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); } } - /** - * Create an instance of OpenAppDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenAppDTO - * @throws IOException if the JSON string is invalid with respect to OpenAppDTO - */ + /** + * Create an instance of OpenAppDTO given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenAppDTO + * @throws IOException if the JSON string is invalid with respect to OpenAppDTO + */ public static OpenAppDTO fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OpenAppDTO.class); } - /** - * Convert an instance of OpenAppDTO to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OpenAppDTO to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } } - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenAppNamespaceDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenAppNamespaceDTO.java index 7d50f934..0cf9bb88 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenAppNamespaceDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenAppNamespaceDTO.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -37,10 +37,12 @@ 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; @@ -48,247 +50,257 @@ /** * Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") public class OpenAppNamespaceDTO { public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - @javax.annotation.Nullable private String dataChangeCreatedBy; public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - @javax.annotation.Nullable private String dataChangeLastModifiedBy; public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - @javax.annotation.Nullable private String dataChangeCreatedTime; public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - @javax.annotation.Nullable private String dataChangeLastModifiedTime; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_APP_ID = "appId"; @SerializedName(SERIALIZED_NAME_APP_ID) - @javax.annotation.Nullable private String appId; public static final String SERIALIZED_NAME_FORMAT = "format"; @SerializedName(SERIALIZED_NAME_FORMAT) - @javax.annotation.Nullable private String format; public static final String SERIALIZED_NAME_IS_PUBLIC = "isPublic"; @SerializedName(SERIALIZED_NAME_IS_PUBLIC) - @javax.annotation.Nullable private Boolean isPublic; public static final String SERIALIZED_NAME_APPEND_NAMESPACE_PREFIX = "appendNamespacePrefix"; @SerializedName(SERIALIZED_NAME_APPEND_NAMESPACE_PREFIX) - @javax.annotation.Nullable private Boolean appendNamespacePrefix = true; public static final String SERIALIZED_NAME_COMMENT = "comment"; @SerializedName(SERIALIZED_NAME_COMMENT) - @javax.annotation.Nullable private String comment; public OpenAppNamespaceDTO() { } - public OpenAppNamespaceDTO dataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { + public OpenAppNamespaceDTO dataChangeCreatedBy(String dataChangeCreatedBy) { + this.dataChangeCreatedBy = dataChangeCreatedBy; return this; } - /** + /** * 命名空间创建者用户名,记录是谁创建了这个应用命名空间 * @return dataChangeCreatedBy - */ + **/ @javax.annotation.Nullable public String getDataChangeCreatedBy() { return dataChangeCreatedBy; } - public void setDataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { + + public void setDataChangeCreatedBy(String dataChangeCreatedBy) { this.dataChangeCreatedBy = dataChangeCreatedBy; } - public OpenAppNamespaceDTO dataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { + public OpenAppNamespaceDTO dataChangeLastModifiedBy(String dataChangeLastModifiedBy) { + this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; return this; } - /** + /** * 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 * @return dataChangeLastModifiedBy - */ + **/ @javax.annotation.Nullable public String getDataChangeLastModifiedBy() { return dataChangeLastModifiedBy; } - public void setDataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { + + public void setDataChangeLastModifiedBy(String dataChangeLastModifiedBy) { this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; } - public OpenAppNamespaceDTO dataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { + public OpenAppNamespaceDTO dataChangeCreatedTime(String dataChangeCreatedTime) { + this.dataChangeCreatedTime = dataChangeCreatedTime; return this; } - /** + /** * 命名空间创建时间,ISO 8601格式的时间戳 * @return dataChangeCreatedTime - */ + **/ @javax.annotation.Nullable public String getDataChangeCreatedTime() { return dataChangeCreatedTime; } - public void setDataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { + + public void setDataChangeCreatedTime(String dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; } - public OpenAppNamespaceDTO dataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { + public OpenAppNamespaceDTO dataChangeLastModifiedTime(String dataChangeLastModifiedTime) { + this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; return this; } - /** + /** * 命名空间最后修改时间,ISO 8601格式的时间戳 * @return dataChangeLastModifiedTime - */ + **/ @javax.annotation.Nullable public String getDataChangeLastModifiedTime() { return dataChangeLastModifiedTime; } - public void setDataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { + + public void setDataChangeLastModifiedTime(String dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; } - public OpenAppNamespaceDTO name(@javax.annotation.Nullable String name) { + public OpenAppNamespaceDTO name(String name) { + this.name = name; return this; } - /** + /** * 命名空间名称,在同一应用内唯一标识一个命名空间 * @return name - */ + **/ @javax.annotation.Nullable public String getName() { return name; } - public void setName(@javax.annotation.Nullable String name) { + + public void setName(String name) { this.name = name; } - public OpenAppNamespaceDTO appId(@javax.annotation.Nullable String appId) { + public OpenAppNamespaceDTO appId(String appId) { + this.appId = appId; return this; } - /** + /** * 所属应用的唯一标识符 * @return appId - */ + **/ @javax.annotation.Nullable public String getAppId() { return appId; } - public void setAppId(@javax.annotation.Nullable String appId) { + + public void setAppId(String appId) { this.appId = appId; } - public OpenAppNamespaceDTO format(@javax.annotation.Nullable String format) { + public OpenAppNamespaceDTO format(String format) { + this.format = format; return this; } - /** + /** * 命名空间格式类型,如properties、xml、json、yml等 * @return format - */ + **/ @javax.annotation.Nullable public String getFormat() { return format; } - public void setFormat(@javax.annotation.Nullable String format) { + + public void setFormat(String format) { this.format = format; } - public OpenAppNamespaceDTO isPublic(@javax.annotation.Nullable Boolean isPublic) { + public OpenAppNamespaceDTO isPublic(Boolean isPublic) { + this.isPublic = isPublic; return this; } - /** + /** * 是否为公共命名空间,公共命名空间可以被其他应用关联使用 * @return isPublic - */ + **/ @javax.annotation.Nullable public Boolean getIsPublic() { return isPublic; } - public void setIsPublic(@javax.annotation.Nullable Boolean isPublic) { + + public void setIsPublic(Boolean isPublic) { this.isPublic = isPublic; } - public OpenAppNamespaceDTO appendNamespacePrefix(@javax.annotation.Nullable Boolean appendNamespacePrefix) { + public OpenAppNamespaceDTO appendNamespacePrefix(Boolean appendNamespacePrefix) { + this.appendNamespacePrefix = appendNamespacePrefix; return this; } - /** + /** * 对于公共命名空间,是否在命名空间名称前添加前缀 * @return appendNamespacePrefix - */ + **/ @javax.annotation.Nullable public Boolean getAppendNamespacePrefix() { return appendNamespacePrefix; } - public void setAppendNamespacePrefix(@javax.annotation.Nullable Boolean appendNamespacePrefix) { + + public void setAppendNamespacePrefix(Boolean appendNamespacePrefix) { this.appendNamespacePrefix = appendNamespacePrefix; } - public OpenAppNamespaceDTO comment(@javax.annotation.Nullable String comment) { + public OpenAppNamespaceDTO comment(String comment) { + this.comment = comment; return this; } - /** + /** * 命名空间备注说明,描述命名空间的用途和包含的配置类型 * @return comment - */ + **/ @javax.annotation.Nullable public String getComment() { return comment; } - public void setComment(@javax.annotation.Nullable String comment) { + + public void setComment(String comment) { this.comment = comment; } @@ -355,33 +367,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "format", "isPublic", "appendNamespacePrefix", "comment")); + openapiFields = new HashSet(); + openapiFields.add("dataChangeCreatedBy"); + openapiFields.add("dataChangeLastModifiedBy"); + openapiFields.add("dataChangeCreatedTime"); + openapiFields.add("dataChangeLastModifiedTime"); + openapiFields.add("name"); + openapiFields.add("appId"); + openapiFields.add("format"); + openapiFields.add("isPublic"); + openapiFields.add("appendNamespacePrefix"); + openapiFields.add("comment"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenAppNamespaceDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenAppNamespaceDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + 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 OpenAppNamespaceDTO + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OpenAppNamespaceDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in OpenAppNamespaceDTO is not found in the empty JSON string", OpenAppNamespaceDTO.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { + for (Entry entry : entries) { if (!OpenAppNamespaceDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenAppNamespaceDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenAppNamespaceDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("dataChangeCreatedBy") != null && !jsonObj.get("dataChangeCreatedBy").isJsonNull()) && !jsonObj.get("dataChangeCreatedBy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedBy").toString())); } @@ -428,33 +449,32 @@ public void write(JsonWriter out, OpenAppNamespaceDTO value) throws IOException @Override public OpenAppNamespaceDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); } } - /** - * Create an instance of OpenAppNamespaceDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenAppNamespaceDTO - * @throws IOException if the JSON string is invalid with respect to OpenAppNamespaceDTO - */ + /** + * Create an instance of OpenAppNamespaceDTO given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenAppNamespaceDTO + * @throws IOException if the JSON string is invalid with respect to OpenAppNamespaceDTO + */ public static OpenAppNamespaceDTO fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OpenAppNamespaceDTO.class); } - /** - * Convert an instance of OpenAppNamespaceDTO to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OpenAppNamespaceDTO to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } } - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenClusterDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenClusterDTO.java index 0cce3938..a83ad015 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenClusterDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenClusterDTO.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -37,10 +37,12 @@ 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; @@ -48,151 +50,157 @@ /** * Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") public class OpenClusterDTO { public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - @javax.annotation.Nullable private String dataChangeCreatedBy; public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - @javax.annotation.Nullable private String dataChangeLastModifiedBy; public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - @javax.annotation.Nullable private String dataChangeCreatedTime; public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - @javax.annotation.Nullable private String dataChangeLastModifiedTime; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_APP_ID = "appId"; @SerializedName(SERIALIZED_NAME_APP_ID) - @javax.annotation.Nullable private String appId; public OpenClusterDTO() { } - public OpenClusterDTO dataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { + public OpenClusterDTO dataChangeCreatedBy(String dataChangeCreatedBy) { + this.dataChangeCreatedBy = dataChangeCreatedBy; return this; } - /** + /** * 集群创建者用户名,记录是谁创建了这个集群 * @return dataChangeCreatedBy - */ + **/ @javax.annotation.Nullable public String getDataChangeCreatedBy() { return dataChangeCreatedBy; } - public void setDataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { + + public void setDataChangeCreatedBy(String dataChangeCreatedBy) { this.dataChangeCreatedBy = dataChangeCreatedBy; } - public OpenClusterDTO dataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { + public OpenClusterDTO dataChangeLastModifiedBy(String dataChangeLastModifiedBy) { + this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; return this; } - /** + /** * 集群最后修改者用户名,记录最后一次修改集群信息的用户 * @return dataChangeLastModifiedBy - */ + **/ @javax.annotation.Nullable public String getDataChangeLastModifiedBy() { return dataChangeLastModifiedBy; } - public void setDataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { + + public void setDataChangeLastModifiedBy(String dataChangeLastModifiedBy) { this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; } - public OpenClusterDTO dataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { + public OpenClusterDTO dataChangeCreatedTime(String dataChangeCreatedTime) { + this.dataChangeCreatedTime = dataChangeCreatedTime; return this; } - /** + /** * 集群创建时间,ISO 8601格式的时间戳 * @return dataChangeCreatedTime - */ + **/ @javax.annotation.Nullable public String getDataChangeCreatedTime() { return dataChangeCreatedTime; } - public void setDataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { + + public void setDataChangeCreatedTime(String dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; } - public OpenClusterDTO dataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { + public OpenClusterDTO dataChangeLastModifiedTime(String dataChangeLastModifiedTime) { + this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; return this; } - /** + /** * 集群最后修改时间,ISO 8601格式的时间戳 * @return dataChangeLastModifiedTime - */ + **/ @javax.annotation.Nullable public String getDataChangeLastModifiedTime() { return dataChangeLastModifiedTime; } - public void setDataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { + + public void setDataChangeLastModifiedTime(String dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; } - public OpenClusterDTO name(@javax.annotation.Nullable String name) { + public OpenClusterDTO name(String name) { + this.name = name; return this; } - /** + /** * 集群名称,在同一应用和环境下唯一标识一个集群 * @return name - */ + **/ @javax.annotation.Nullable public String getName() { return name; } - public void setName(@javax.annotation.Nullable String name) { + + public void setName(String name) { this.name = name; } - public OpenClusterDTO appId(@javax.annotation.Nullable String appId) { + public OpenClusterDTO appId(String appId) { + this.appId = appId; return this; } - /** + /** * 所属应用的唯一标识符 * @return appId - */ + **/ @javax.annotation.Nullable public String getAppId() { return appId; } - public void setAppId(@javax.annotation.Nullable String appId) { + + public void setAppId(String appId) { this.appId = appId; } @@ -251,33 +259,38 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId")); + openapiFields = new HashSet(); + openapiFields.add("dataChangeCreatedBy"); + openapiFields.add("dataChangeLastModifiedBy"); + openapiFields.add("dataChangeCreatedTime"); + openapiFields.add("dataChangeLastModifiedTime"); + openapiFields.add("name"); + openapiFields.add("appId"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenClusterDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenClusterDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + /** + * 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 OpenClusterDTO + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OpenClusterDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in OpenClusterDTO is not found in the empty JSON string", OpenClusterDTO.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { + for (Entry entry : entries) { if (!OpenClusterDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenClusterDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenClusterDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("dataChangeCreatedBy") != null && !jsonObj.get("dataChangeCreatedBy").isJsonNull()) && !jsonObj.get("dataChangeCreatedBy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedBy").toString())); } @@ -318,33 +331,32 @@ public void write(JsonWriter out, OpenClusterDTO value) throws IOException { @Override public OpenClusterDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); } } - /** - * Create an instance of OpenClusterDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenClusterDTO - * @throws IOException if the JSON string is invalid with respect to OpenClusterDTO - */ + /** + * Create an instance of OpenClusterDTO given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenClusterDTO + * @throws IOException if the JSON string is invalid with respect to OpenClusterDTO + */ public static OpenClusterDTO fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OpenClusterDTO.class); } - /** - * Convert an instance of OpenClusterDTO to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OpenClusterDTO to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } } - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenCreateAppDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenCreateAppDTO.java index 76e1229c..69a13731 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 @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,6 +14,7 @@ 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; @@ -21,7 +22,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import org.openapitools.client.model.OpenAppDTO; @@ -40,10 +40,12 @@ 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; @@ -51,46 +53,46 @@ /** * 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") public class OpenCreateAppDTO { public static final String SERIALIZED_NAME_ASSIGN_APP_ROLE_TO_SELF = "assignAppRoleToSelf"; @SerializedName(SERIALIZED_NAME_ASSIGN_APP_ROLE_TO_SELF) - @javax.annotation.Nullable private Boolean assignAppRoleToSelf; public static final String SERIALIZED_NAME_ADMINS = "admins"; @SerializedName(SERIALIZED_NAME_ADMINS) - @javax.annotation.Nullable - private List admins = new ArrayList<>(); + private List admins; public static final String SERIALIZED_NAME_APP = "app"; @SerializedName(SERIALIZED_NAME_APP) - @javax.annotation.Nullable private OpenAppDTO app; public OpenCreateAppDTO() { } - public OpenCreateAppDTO assignAppRoleToSelf(@javax.annotation.Nullable Boolean assignAppRoleToSelf) { + public OpenCreateAppDTO assignAppRoleToSelf(Boolean assignAppRoleToSelf) { + this.assignAppRoleToSelf = assignAppRoleToSelf; return this; } - /** + /** * 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 * @return assignAppRoleToSelf - */ + **/ @javax.annotation.Nullable public Boolean getAssignAppRoleToSelf() { return assignAppRoleToSelf; } - public void setAssignAppRoleToSelf(@javax.annotation.Nullable Boolean assignAppRoleToSelf) { + + public void setAssignAppRoleToSelf(Boolean assignAppRoleToSelf) { this.assignAppRoleToSelf = assignAppRoleToSelf; } - public OpenCreateAppDTO admins(@javax.annotation.Nullable List admins) { + public OpenCreateAppDTO admins(List admins) { + this.admins = admins; return this; } @@ -103,35 +105,38 @@ public OpenCreateAppDTO addAdminsItem(String adminsItem) { return this; } - /** + /** * 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 * @return admins - */ + **/ @javax.annotation.Nullable public List getAdmins() { return admins; } - public void setAdmins(@javax.annotation.Nullable List admins) { + + public void setAdmins(List admins) { this.admins = admins; } - public OpenCreateAppDTO app(@javax.annotation.Nullable OpenAppDTO app) { + public OpenCreateAppDTO app(OpenAppDTO app) { + this.app = app; return this; } - /** + /** * Get app * @return app - */ + **/ @javax.annotation.Nullable public OpenAppDTO getApp() { return app; } - public void setApp(@javax.annotation.Nullable OpenAppDTO app) { + + public void setApp(OpenAppDTO app) { this.app = app; } @@ -184,40 +189,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("assignAppRoleToSelf", "admins", "app")); + openapiFields = new HashSet(); + openapiFields.add("assignAppRoleToSelf"); + openapiFields.add("admins"); + openapiFields.add("app"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenCreateAppDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenCreateAppDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + /** + * 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 OpenCreateAppDTO + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OpenCreateAppDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in OpenCreateAppDTO is not found in the empty JSON string", OpenCreateAppDTO.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { + for (Entry entry : entries) { if (!OpenCreateAppDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenCreateAppDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenCreateAppDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("admins") != null && !jsonObj.get("admins").isJsonNull() && !jsonObj.get("admins").isJsonArray()) { + if (jsonObj.get("admins") != null && !jsonObj.get("admins").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `admins` to be an array in the JSON string but got `%s`", jsonObj.get("admins").toString())); } // validate the optional field `app` if (jsonObj.get("app") != null && !jsonObj.get("app").isJsonNull()) { - OpenAppDTO.validateJsonElement(jsonObj.get("app")); + OpenAppDTO.validateJsonObject(jsonObj.getAsJsonObject("app")); } } @@ -241,33 +248,32 @@ public void write(JsonWriter out, OpenCreateAppDTO value) throws IOException { @Override public OpenCreateAppDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); } } - /** - * Create an instance of OpenCreateAppDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenCreateAppDTO - * @throws IOException if the JSON string is invalid with respect to OpenCreateAppDTO - */ + /** + * Create an instance of OpenCreateAppDTO given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenCreateAppDTO + * @throws IOException if the JSON string is invalid with respect to OpenCreateAppDTO + */ public static OpenCreateAppDTO fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OpenCreateAppDTO.class); } - /** - * Convert an instance of OpenCreateAppDTO to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OpenCreateAppDTO to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } } - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenEnvClusterDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenEnvClusterDTO.java index cb2a804e..6d4b7f67 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenEnvClusterDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenEnvClusterDTO.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,6 +14,7 @@ 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; @@ -21,7 +22,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -39,10 +39,12 @@ 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; @@ -50,41 +52,42 @@ /** * OpenEnvClusterDTO */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") public class OpenEnvClusterDTO { public static final String SERIALIZED_NAME_ENV = "env"; @SerializedName(SERIALIZED_NAME_ENV) - @javax.annotation.Nullable private String env; public static final String SERIALIZED_NAME_CLUSTERS = "clusters"; @SerializedName(SERIALIZED_NAME_CLUSTERS) - @javax.annotation.Nullable - private List clusters = new ArrayList<>(); + private List clusters; public OpenEnvClusterDTO() { } - public OpenEnvClusterDTO env(@javax.annotation.Nullable String env) { + public OpenEnvClusterDTO env(String env) { + this.env = env; return this; } - /** - * + /** + * 环境标识,例如 DEV、FAT、UAT、PROD * @return env - */ + **/ @javax.annotation.Nullable public String getEnv() { return env; } - public void setEnv(@javax.annotation.Nullable String env) { + + public void setEnv(String env) { this.env = env; } - public OpenEnvClusterDTO clusters(@javax.annotation.Nullable List clusters) { + public OpenEnvClusterDTO clusters(List clusters) { + this.clusters = clusters; return this; } @@ -97,16 +100,17 @@ public OpenEnvClusterDTO addClustersItem(String clustersItem) { return this; } - /** - * + /** + * 该环境下的集群名称列表 * @return clusters - */ + **/ @javax.annotation.Nullable public List getClusters() { return clusters; } - public void setClusters(@javax.annotation.Nullable List clusters) { + + public void setClusters(List clusters) { this.clusters = clusters; } @@ -157,38 +161,39 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("env", "clusters")); + openapiFields = new HashSet(); + openapiFields.add("env"); + openapiFields.add("clusters"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenEnvClusterDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenEnvClusterDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + 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 OpenEnvClusterDTO + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OpenEnvClusterDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in OpenEnvClusterDTO is not found in the empty JSON string", OpenEnvClusterDTO.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { + for (Entry entry : entries) { if (!OpenEnvClusterDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenEnvClusterDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenEnvClusterDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("env") != null && !jsonObj.get("env").isJsonNull()) && !jsonObj.get("env").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `env` to be a primitive type in the JSON string but got `%s`", jsonObj.get("env").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("clusters") != null && !jsonObj.get("clusters").isJsonNull() && !jsonObj.get("clusters").isJsonArray()) { + if (jsonObj.get("clusters") != null && !jsonObj.get("clusters").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `clusters` to be an array in the JSON string but got `%s`", jsonObj.get("clusters").toString())); } } @@ -213,33 +218,32 @@ public void write(JsonWriter out, OpenEnvClusterDTO value) throws IOException { @Override public OpenEnvClusterDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); } } - /** - * Create an instance of OpenEnvClusterDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenEnvClusterDTO - * @throws IOException if the JSON string is invalid with respect to OpenEnvClusterDTO - */ + /** + * Create an instance of OpenEnvClusterDTO given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenEnvClusterDTO + * @throws IOException if the JSON string is invalid with respect to OpenEnvClusterDTO + */ public static OpenEnvClusterDTO fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OpenEnvClusterDTO.class); } - /** - * Convert an instance of OpenEnvClusterDTO to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OpenEnvClusterDTO to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } } - diff --git a/java-client/src/main/java/org/openapitools/client/model/EnvClusterInfo.java b/java-client/src/main/java/org/openapitools/client/model/OpenEnvClusterInfo.java similarity index 55% rename from java-client/src/main/java/org/openapitools/client/model/EnvClusterInfo.java rename to java-client/src/main/java/org/openapitools/client/model/OpenEnvClusterInfo.java index 119b05a1..4a8323ca 100644 --- a/java-client/src/main/java/org/openapitools/client/model/EnvClusterInfo.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenEnvClusterInfo.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,6 +14,7 @@ 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; @@ -21,9 +22,8 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; -import org.openapitools.client.model.ClusterDTO; +import org.openapitools.client.model.OpenClusterDTO; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -40,57 +40,60 @@ 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; /** - * EnvClusterInfo + * OpenEnvClusterInfo */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class EnvClusterInfo { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +public class OpenEnvClusterInfo { public static final String SERIALIZED_NAME_ENV = "env"; @SerializedName(SERIALIZED_NAME_ENV) - @javax.annotation.Nullable private String env; public static final String SERIALIZED_NAME_CLUSTERS = "clusters"; @SerializedName(SERIALIZED_NAME_CLUSTERS) - @javax.annotation.Nullable - private List clusters = new ArrayList<>(); + private List clusters; - public EnvClusterInfo() { + public OpenEnvClusterInfo() { } - public EnvClusterInfo env(@javax.annotation.Nullable String env) { + public OpenEnvClusterInfo env(String env) { + this.env = env; return this; } - /** - * + /** + * 环境标识 * @return env - */ + **/ @javax.annotation.Nullable public String getEnv() { return env; } - public void setEnv(@javax.annotation.Nullable String env) { + + public void setEnv(String env) { this.env = env; } - public EnvClusterInfo clusters(@javax.annotation.Nullable List clusters) { + public OpenEnvClusterInfo clusters(List clusters) { + this.clusters = clusters; return this; } - public EnvClusterInfo addClustersItem(ClusterDTO clustersItem) { + public OpenEnvClusterInfo addClustersItem(OpenClusterDTO clustersItem) { if (this.clusters == null) { this.clusters = new ArrayList<>(); } @@ -98,16 +101,17 @@ public EnvClusterInfo addClustersItem(ClusterDTO clustersItem) { return this; } - /** - * + /** + * 集群信息列表 * @return clusters - */ + **/ @javax.annotation.Nullable - public List getClusters() { + public List getClusters() { return clusters; } - public void setClusters(@javax.annotation.Nullable List clusters) { + + public void setClusters(List clusters) { this.clusters = clusters; } @@ -121,9 +125,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - EnvClusterInfo envClusterInfo = (EnvClusterInfo) o; - return Objects.equals(this.env, envClusterInfo.env) && - Objects.equals(this.clusters, envClusterInfo.clusters); + OpenEnvClusterInfo openEnvClusterInfo = (OpenEnvClusterInfo) o; + return Objects.equals(this.env, openEnvClusterInfo.env) && + Objects.equals(this.clusters, openEnvClusterInfo.clusters); } @Override @@ -134,7 +138,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class EnvClusterInfo {\n"); + sb.append("class OpenEnvClusterInfo {\n"); sb.append(" env: ").append(toIndentedString(env)).append("\n"); sb.append(" clusters: ").append(toIndentedString(clusters)).append("\n"); sb.append("}"); @@ -158,33 +162,34 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("env", "clusters")); + openapiFields = new HashSet(); + openapiFields.add("env"); + openapiFields.add("clusters"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to EnvClusterInfo - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!EnvClusterInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in EnvClusterInfo is not found in the empty JSON string", EnvClusterInfo.openapiRequiredFields.toString())); + /** + * 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 OpenEnvClusterInfo + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OpenEnvClusterInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OpenEnvClusterInfo is not found in the empty JSON string", OpenEnvClusterInfo.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!EnvClusterInfo.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EnvClusterInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + for (Entry entry : entries) { + if (!OpenEnvClusterInfo.openapiFields.contains(entry.getKey())) { + 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())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("env") != null && !jsonObj.get("env").isJsonNull()) && !jsonObj.get("env").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `env` to be a primitive type in the JSON string but got `%s`", jsonObj.get("env").toString())); } @@ -198,7 +203,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `clusters` (array) for (int i = 0; i < jsonArrayclusters.size(); i++) { - ClusterDTO.validateJsonElement(jsonArrayclusters.get(i)); + OpenClusterDTO.validateJsonObject(jsonArrayclusters.get(i).getAsJsonObject()); }; } } @@ -208,49 +213,48 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!EnvClusterInfo.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'EnvClusterInfo' and its subtypes + if (!OpenEnvClusterInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpenEnvClusterInfo' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(EnvClusterInfo.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpenEnvClusterInfo.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, EnvClusterInfo value) throws IOException { + public void write(JsonWriter out, OpenEnvClusterInfo value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public EnvClusterInfo read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + public OpenEnvClusterInfo read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); } } - /** - * Create an instance of EnvClusterInfo given an JSON string - * - * @param jsonString JSON string - * @return An instance of EnvClusterInfo - * @throws IOException if the JSON string is invalid with respect to EnvClusterInfo - */ - public static EnvClusterInfo fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, EnvClusterInfo.class); + /** + * Create an instance of OpenEnvClusterInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenEnvClusterInfo + * @throws IOException if the JSON string is invalid with respect to OpenEnvClusterInfo + */ + public static OpenEnvClusterInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpenEnvClusterInfo.class); } - /** - * Convert an instance of EnvClusterInfo to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OpenEnvClusterInfo to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } } - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleDTO.java index 7c63ab9a..d1954326 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleDTO.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,6 +14,7 @@ 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; @@ -21,7 +22,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import org.openapitools.client.model.OpenGrayReleaseRuleItemDTO; @@ -40,10 +40,12 @@ 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; @@ -51,209 +53,217 @@ /** * Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") public class OpenGrayReleaseRuleDTO { public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - @javax.annotation.Nullable private String dataChangeCreatedBy; public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - @javax.annotation.Nullable private String dataChangeLastModifiedBy; public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - @javax.annotation.Nullable private String dataChangeCreatedTime; public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - @javax.annotation.Nullable private String dataChangeLastModifiedTime; public static final String SERIALIZED_NAME_APP_ID = "appId"; @SerializedName(SERIALIZED_NAME_APP_ID) - @javax.annotation.Nullable private String appId; public static final String SERIALIZED_NAME_CLUSTER_NAME = "clusterName"; @SerializedName(SERIALIZED_NAME_CLUSTER_NAME) - @javax.annotation.Nullable private String clusterName; public static final String SERIALIZED_NAME_NAMESPACE_NAME = "namespaceName"; @SerializedName(SERIALIZED_NAME_NAMESPACE_NAME) - @javax.annotation.Nullable private String namespaceName; public static final String SERIALIZED_NAME_BRANCH_NAME = "branchName"; @SerializedName(SERIALIZED_NAME_BRANCH_NAME) - @javax.annotation.Nullable private String branchName; public static final String SERIALIZED_NAME_RULE_ITEMS = "ruleItems"; @SerializedName(SERIALIZED_NAME_RULE_ITEMS) - @javax.annotation.Nullable - private List ruleItems = new ArrayList<>(); + private List ruleItems; public OpenGrayReleaseRuleDTO() { } - public OpenGrayReleaseRuleDTO dataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { + public OpenGrayReleaseRuleDTO dataChangeCreatedBy(String dataChangeCreatedBy) { + this.dataChangeCreatedBy = dataChangeCreatedBy; return this; } - /** + /** * 灰度规则创建者用户名,记录是谁创建了这个灰度发布规则 * @return dataChangeCreatedBy - */ + **/ @javax.annotation.Nullable public String getDataChangeCreatedBy() { return dataChangeCreatedBy; } - public void setDataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { + + public void setDataChangeCreatedBy(String dataChangeCreatedBy) { this.dataChangeCreatedBy = dataChangeCreatedBy; } - public OpenGrayReleaseRuleDTO dataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { + public OpenGrayReleaseRuleDTO dataChangeLastModifiedBy(String dataChangeLastModifiedBy) { + this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; return this; } - /** + /** * 灰度规则最后修改者用户名,记录最后一次修改规则的用户 * @return dataChangeLastModifiedBy - */ + **/ @javax.annotation.Nullable public String getDataChangeLastModifiedBy() { return dataChangeLastModifiedBy; } - public void setDataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { + + public void setDataChangeLastModifiedBy(String dataChangeLastModifiedBy) { this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; } - public OpenGrayReleaseRuleDTO dataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { + public OpenGrayReleaseRuleDTO dataChangeCreatedTime(String dataChangeCreatedTime) { + this.dataChangeCreatedTime = dataChangeCreatedTime; return this; } - /** + /** * 灰度规则创建时间,ISO 8601格式的时间戳 * @return dataChangeCreatedTime - */ + **/ @javax.annotation.Nullable public String getDataChangeCreatedTime() { return dataChangeCreatedTime; } - public void setDataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { + + public void setDataChangeCreatedTime(String dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; } - public OpenGrayReleaseRuleDTO dataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { + public OpenGrayReleaseRuleDTO dataChangeLastModifiedTime(String dataChangeLastModifiedTime) { + this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; return this; } - /** + /** * 灰度规则最后修改时间,ISO 8601格式的时间戳 * @return dataChangeLastModifiedTime - */ + **/ @javax.annotation.Nullable public String getDataChangeLastModifiedTime() { return dataChangeLastModifiedTime; } - public void setDataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { + + public void setDataChangeLastModifiedTime(String dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; } - public OpenGrayReleaseRuleDTO appId(@javax.annotation.Nullable String appId) { + public OpenGrayReleaseRuleDTO appId(String appId) { + this.appId = appId; return this; } - /** + /** * 所属应用的唯一标识符 * @return appId - */ + **/ @javax.annotation.Nullable public String getAppId() { return appId; } - public void setAppId(@javax.annotation.Nullable String appId) { + + public void setAppId(String appId) { this.appId = appId; } - public OpenGrayReleaseRuleDTO clusterName(@javax.annotation.Nullable String clusterName) { + public OpenGrayReleaseRuleDTO clusterName(String clusterName) { + this.clusterName = clusterName; return this; } - /** + /** * 所属集群的名称 * @return clusterName - */ + **/ @javax.annotation.Nullable public String getClusterName() { return clusterName; } - public void setClusterName(@javax.annotation.Nullable String clusterName) { + + public void setClusterName(String clusterName) { this.clusterName = clusterName; } - public OpenGrayReleaseRuleDTO namespaceName(@javax.annotation.Nullable String namespaceName) { + public OpenGrayReleaseRuleDTO namespaceName(String namespaceName) { + this.namespaceName = namespaceName; return this; } - /** + /** * 所属命名空间的名称 * @return namespaceName - */ + **/ @javax.annotation.Nullable public String getNamespaceName() { return namespaceName; } - public void setNamespaceName(@javax.annotation.Nullable String namespaceName) { + + public void setNamespaceName(String namespaceName) { this.namespaceName = namespaceName; } - public OpenGrayReleaseRuleDTO branchName(@javax.annotation.Nullable String branchName) { + public OpenGrayReleaseRuleDTO branchName(String branchName) { + this.branchName = branchName; return this; } - /** + /** * 灰度分支名称,标识灰度发布的分支 * @return branchName - */ + **/ @javax.annotation.Nullable public String getBranchName() { return branchName; } - public void setBranchName(@javax.annotation.Nullable String branchName) { + + public void setBranchName(String branchName) { this.branchName = branchName; } - public OpenGrayReleaseRuleDTO ruleItems(@javax.annotation.Nullable List ruleItems) { + public OpenGrayReleaseRuleDTO ruleItems(List ruleItems) { + this.ruleItems = ruleItems; return this; } @@ -266,16 +276,17 @@ public OpenGrayReleaseRuleDTO addRuleItemsItem(OpenGrayReleaseRuleItemDTO ruleIt return this; } - /** + /** * 灰度发布规则项列表,包含具体的灰度规则条件 * @return ruleItems - */ + **/ @javax.annotation.Nullable public List getRuleItems() { return ruleItems; } - public void setRuleItems(@javax.annotation.Nullable List ruleItems) { + + public void setRuleItems(List ruleItems) { this.ruleItems = ruleItems; } @@ -340,33 +351,41 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "appId", "clusterName", "namespaceName", "branchName", "ruleItems")); + openapiFields = new HashSet(); + openapiFields.add("dataChangeCreatedBy"); + openapiFields.add("dataChangeLastModifiedBy"); + openapiFields.add("dataChangeCreatedTime"); + openapiFields.add("dataChangeLastModifiedTime"); + openapiFields.add("appId"); + openapiFields.add("clusterName"); + openapiFields.add("namespaceName"); + openapiFields.add("branchName"); + openapiFields.add("ruleItems"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenGrayReleaseRuleDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenGrayReleaseRuleDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + 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 OpenGrayReleaseRuleDTO + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OpenGrayReleaseRuleDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in OpenGrayReleaseRuleDTO is not found in the empty JSON string", OpenGrayReleaseRuleDTO.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { + for (Entry entry : entries) { if (!OpenGrayReleaseRuleDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenGrayReleaseRuleDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenGrayReleaseRuleDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("dataChangeCreatedBy") != null && !jsonObj.get("dataChangeCreatedBy").isJsonNull()) && !jsonObj.get("dataChangeCreatedBy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedBy").toString())); } @@ -401,7 +420,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `ruleItems` (array) for (int i = 0; i < jsonArrayruleItems.size(); i++) { - OpenGrayReleaseRuleItemDTO.validateJsonElement(jsonArrayruleItems.get(i)); + OpenGrayReleaseRuleItemDTO.validateJsonObject(jsonArrayruleItems.get(i).getAsJsonObject()); }; } } @@ -427,33 +446,32 @@ public void write(JsonWriter out, OpenGrayReleaseRuleDTO value) throws IOExcepti @Override public OpenGrayReleaseRuleDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); } } - /** - * Create an instance of OpenGrayReleaseRuleDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenGrayReleaseRuleDTO - * @throws IOException if the JSON string is invalid with respect to OpenGrayReleaseRuleDTO - */ + /** + * Create an instance of OpenGrayReleaseRuleDTO given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenGrayReleaseRuleDTO + * @throws IOException if the JSON string is invalid with respect to OpenGrayReleaseRuleDTO + */ public static OpenGrayReleaseRuleDTO fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OpenGrayReleaseRuleDTO.class); } - /** - * Convert an instance of OpenGrayReleaseRuleDTO to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OpenGrayReleaseRuleDTO to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } } - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTO.java index 2a44ed71..57500fb2 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTO.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,6 +14,7 @@ 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; @@ -21,7 +22,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -39,10 +39,12 @@ 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; @@ -50,46 +52,46 @@ /** * Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") public class OpenGrayReleaseRuleItemDTO { public static final String SERIALIZED_NAME_CLIENT_APP_ID = "clientAppId"; @SerializedName(SERIALIZED_NAME_CLIENT_APP_ID) - @javax.annotation.Nullable private String clientAppId; public static final String SERIALIZED_NAME_CLIENT_IP_LIST = "clientIpList"; @SerializedName(SERIALIZED_NAME_CLIENT_IP_LIST) - @javax.annotation.Nullable - private List clientIpList = new ArrayList<>(); + private List clientIpList; public static final String SERIALIZED_NAME_CLIENT_LABEL_LIST = "clientLabelList"; @SerializedName(SERIALIZED_NAME_CLIENT_LABEL_LIST) - @javax.annotation.Nullable - private List clientLabelList = new ArrayList<>(); + private List clientLabelList; public OpenGrayReleaseRuleItemDTO() { } - public OpenGrayReleaseRuleItemDTO clientAppId(@javax.annotation.Nullable String clientAppId) { + public OpenGrayReleaseRuleItemDTO clientAppId(String clientAppId) { + this.clientAppId = clientAppId; return this; } - /** + /** * 客户端应用ID,指定哪个应用可以获取灰度配置 * @return clientAppId - */ + **/ @javax.annotation.Nullable public String getClientAppId() { return clientAppId; } - public void setClientAppId(@javax.annotation.Nullable String clientAppId) { + + public void setClientAppId(String clientAppId) { this.clientAppId = clientAppId; } - public OpenGrayReleaseRuleItemDTO clientIpList(@javax.annotation.Nullable List clientIpList) { + public OpenGrayReleaseRuleItemDTO clientIpList(List clientIpList) { + this.clientIpList = clientIpList; return this; } @@ -102,21 +104,23 @@ public OpenGrayReleaseRuleItemDTO addClientIpListItem(String clientIpListItem) { return this; } - /** + /** * 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 * @return clientIpList - */ + **/ @javax.annotation.Nullable public List getClientIpList() { return clientIpList; } - public void setClientIpList(@javax.annotation.Nullable List clientIpList) { + + public void setClientIpList(List clientIpList) { this.clientIpList = clientIpList; } - public OpenGrayReleaseRuleItemDTO clientLabelList(@javax.annotation.Nullable List clientLabelList) { + public OpenGrayReleaseRuleItemDTO clientLabelList(List clientLabelList) { + this.clientLabelList = clientLabelList; return this; } @@ -129,16 +133,17 @@ public OpenGrayReleaseRuleItemDTO addClientLabelListItem(String clientLabelListI return this; } - /** + /** * 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 * @return clientLabelList - */ + **/ @javax.annotation.Nullable public List getClientLabelList() { return clientLabelList; } - public void setClientLabelList(@javax.annotation.Nullable List clientLabelList) { + + public void setClientLabelList(List clientLabelList) { this.clientLabelList = clientLabelList; } @@ -191,42 +196,44 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("clientAppId", "clientIpList", "clientLabelList")); + openapiFields = new HashSet(); + openapiFields.add("clientAppId"); + openapiFields.add("clientIpList"); + openapiFields.add("clientLabelList"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenGrayReleaseRuleItemDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenGrayReleaseRuleItemDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + /** + * 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 OpenGrayReleaseRuleItemDTO + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OpenGrayReleaseRuleItemDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in OpenGrayReleaseRuleItemDTO is not found in the empty JSON string", OpenGrayReleaseRuleItemDTO.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { + for (Entry entry : entries) { if (!OpenGrayReleaseRuleItemDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenGrayReleaseRuleItemDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenGrayReleaseRuleItemDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("clientAppId") != null && !jsonObj.get("clientAppId").isJsonNull()) && !jsonObj.get("clientAppId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `clientAppId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("clientAppId").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("clientIpList") != null && !jsonObj.get("clientIpList").isJsonNull() && !jsonObj.get("clientIpList").isJsonArray()) { + if (jsonObj.get("clientIpList") != null && !jsonObj.get("clientIpList").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `clientIpList` to be an array in the JSON string but got `%s`", jsonObj.get("clientIpList").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("clientLabelList") != null && !jsonObj.get("clientLabelList").isJsonNull() && !jsonObj.get("clientLabelList").isJsonArray()) { + if (jsonObj.get("clientLabelList") != null && !jsonObj.get("clientLabelList").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `clientLabelList` to be an array in the JSON string but got `%s`", jsonObj.get("clientLabelList").toString())); } } @@ -251,33 +258,32 @@ public void write(JsonWriter out, OpenGrayReleaseRuleItemDTO value) throws IOExc @Override public OpenGrayReleaseRuleItemDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); } } - /** - * Create an instance of OpenGrayReleaseRuleItemDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenGrayReleaseRuleItemDTO - * @throws IOException if the JSON string is invalid with respect to OpenGrayReleaseRuleItemDTO - */ + /** + * Create an instance of OpenGrayReleaseRuleItemDTO given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenGrayReleaseRuleItemDTO + * @throws IOException if the JSON string is invalid with respect to OpenGrayReleaseRuleItemDTO + */ public static OpenGrayReleaseRuleItemDTO fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OpenGrayReleaseRuleItemDTO.class); } - /** - * Convert an instance of OpenGrayReleaseRuleItemDTO to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OpenGrayReleaseRuleItemDTO to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } } - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenInstanceConfigDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenInstanceConfigDTO.java index 90792b17..5ba715e5 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenInstanceConfigDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenInstanceConfigDTO.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import org.openapitools.client.model.OpenReleaseDTO; import com.google.gson.Gson; @@ -38,10 +38,12 @@ 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; @@ -49,79 +51,82 @@ /** * OpenInstanceConfigDTO */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") public class OpenInstanceConfigDTO { public static final String SERIALIZED_NAME_RELEASE = "release"; @SerializedName(SERIALIZED_NAME_RELEASE) - @javax.annotation.Nullable private OpenReleaseDTO release; public static final String SERIALIZED_NAME_RELEASE_DELIVERY_TIME = "releaseDeliveryTime"; @SerializedName(SERIALIZED_NAME_RELEASE_DELIVERY_TIME) - @javax.annotation.Nullable private String releaseDeliveryTime; public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - @javax.annotation.Nullable private String dataChangeLastModifiedTime; public OpenInstanceConfigDTO() { } - public OpenInstanceConfigDTO release(@javax.annotation.Nullable OpenReleaseDTO release) { + public OpenInstanceConfigDTO release(OpenReleaseDTO release) { + this.release = release; return this; } - /** + /** * Get release * @return release - */ + **/ @javax.annotation.Nullable public OpenReleaseDTO getRelease() { return release; } - public void setRelease(@javax.annotation.Nullable OpenReleaseDTO release) { + + public void setRelease(OpenReleaseDTO release) { this.release = release; } - public OpenInstanceConfigDTO releaseDeliveryTime(@javax.annotation.Nullable String releaseDeliveryTime) { + public OpenInstanceConfigDTO releaseDeliveryTime(String releaseDeliveryTime) { + this.releaseDeliveryTime = releaseDeliveryTime; return this; } - /** - * + /** + * 配置下发时间(ISO 8601) * @return releaseDeliveryTime - */ + **/ @javax.annotation.Nullable public String getReleaseDeliveryTime() { return releaseDeliveryTime; } - public void setReleaseDeliveryTime(@javax.annotation.Nullable String releaseDeliveryTime) { + + public void setReleaseDeliveryTime(String releaseDeliveryTime) { this.releaseDeliveryTime = releaseDeliveryTime; } - public OpenInstanceConfigDTO dataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { + public OpenInstanceConfigDTO dataChangeLastModifiedTime(String dataChangeLastModifiedTime) { + this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; return this; } - /** - * + /** + * 最后修改时间(ISO 8601) * @return dataChangeLastModifiedTime - */ + **/ @javax.annotation.Nullable public String getDataChangeLastModifiedTime() { return dataChangeLastModifiedTime; } - public void setDataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { + + public void setDataChangeLastModifiedTime(String dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; } @@ -174,36 +179,38 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("release", "releaseDeliveryTime", "dataChangeLastModifiedTime")); + openapiFields = new HashSet(); + openapiFields.add("release"); + openapiFields.add("releaseDeliveryTime"); + openapiFields.add("dataChangeLastModifiedTime"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenInstanceConfigDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenInstanceConfigDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + /** + * 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 OpenInstanceConfigDTO + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OpenInstanceConfigDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in OpenInstanceConfigDTO is not found in the empty JSON string", OpenInstanceConfigDTO.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { + for (Entry entry : entries) { if (!OpenInstanceConfigDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenInstanceConfigDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenInstanceConfigDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `release` if (jsonObj.get("release") != null && !jsonObj.get("release").isJsonNull()) { - OpenReleaseDTO.validateJsonElement(jsonObj.get("release")); + OpenReleaseDTO.validateJsonObject(jsonObj.getAsJsonObject("release")); } if ((jsonObj.get("releaseDeliveryTime") != null && !jsonObj.get("releaseDeliveryTime").isJsonNull()) && !jsonObj.get("releaseDeliveryTime").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `releaseDeliveryTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("releaseDeliveryTime").toString())); @@ -233,33 +240,32 @@ public void write(JsonWriter out, OpenInstanceConfigDTO value) throws IOExceptio @Override public OpenInstanceConfigDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); } } - /** - * Create an instance of OpenInstanceConfigDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenInstanceConfigDTO - * @throws IOException if the JSON string is invalid with respect to OpenInstanceConfigDTO - */ + /** + * Create an instance of OpenInstanceConfigDTO given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenInstanceConfigDTO + * @throws IOException if the JSON string is invalid with respect to OpenInstanceConfigDTO + */ public static OpenInstanceConfigDTO fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OpenInstanceConfigDTO.class); } - /** - * Convert an instance of OpenInstanceConfigDTO to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OpenInstanceConfigDTO to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } } - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenInstanceDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenInstanceDTO.java index f8dbea6e..c12f692e 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenInstanceDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenInstanceDTO.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,6 +14,7 @@ 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; @@ -21,7 +22,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import org.openapitools.client.model.OpenInstanceConfigDTO; @@ -40,10 +40,12 @@ 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; @@ -51,142 +53,146 @@ /** * OpenInstanceDTO */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") public class OpenInstanceDTO { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nullable private Long id; public static final String SERIALIZED_NAME_APP_ID = "appId"; @SerializedName(SERIALIZED_NAME_APP_ID) - @javax.annotation.Nullable private String appId; public static final String SERIALIZED_NAME_CLUSTER_NAME = "clusterName"; @SerializedName(SERIALIZED_NAME_CLUSTER_NAME) - @javax.annotation.Nullable private String clusterName; public static final String SERIALIZED_NAME_DATA_CENTER = "dataCenter"; @SerializedName(SERIALIZED_NAME_DATA_CENTER) - @javax.annotation.Nullable private String dataCenter; public static final String SERIALIZED_NAME_IP = "ip"; @SerializedName(SERIALIZED_NAME_IP) - @javax.annotation.Nullable private String ip; public static final String SERIALIZED_NAME_CONFIGS = "configs"; @SerializedName(SERIALIZED_NAME_CONFIGS) - @javax.annotation.Nullable - private List configs = new ArrayList<>(); + private List configs; public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - @javax.annotation.Nullable private String dataChangeCreatedTime; public OpenInstanceDTO() { } - public OpenInstanceDTO id(@javax.annotation.Nullable Long id) { + public OpenInstanceDTO id(Long id) { + this.id = id; return this; } - /** - * + /** + * 实例ID * @return id - */ + **/ @javax.annotation.Nullable public Long getId() { return id; } - public void setId(@javax.annotation.Nullable Long id) { + + public void setId(Long id) { this.id = id; } - public OpenInstanceDTO appId(@javax.annotation.Nullable String appId) { + public OpenInstanceDTO appId(String appId) { + this.appId = appId; return this; } - /** - * + /** + * 实例所属应用ID * @return appId - */ + **/ @javax.annotation.Nullable public String getAppId() { return appId; } - public void setAppId(@javax.annotation.Nullable String appId) { + + public void setAppId(String appId) { this.appId = appId; } - public OpenInstanceDTO clusterName(@javax.annotation.Nullable String clusterName) { + public OpenInstanceDTO clusterName(String clusterName) { + this.clusterName = clusterName; return this; } - /** - * + /** + * 实例所属集群名称 * @return clusterName - */ + **/ @javax.annotation.Nullable public String getClusterName() { return clusterName; } - public void setClusterName(@javax.annotation.Nullable String clusterName) { + + public void setClusterName(String clusterName) { this.clusterName = clusterName; } - public OpenInstanceDTO dataCenter(@javax.annotation.Nullable String dataCenter) { + public OpenInstanceDTO dataCenter(String dataCenter) { + this.dataCenter = dataCenter; return this; } - /** - * + /** + * 数据中心/机房标识 * @return dataCenter - */ + **/ @javax.annotation.Nullable public String getDataCenter() { return dataCenter; } - public void setDataCenter(@javax.annotation.Nullable String dataCenter) { + + public void setDataCenter(String dataCenter) { this.dataCenter = dataCenter; } - public OpenInstanceDTO ip(@javax.annotation.Nullable String ip) { + public OpenInstanceDTO ip(String ip) { + this.ip = ip; return this; } - /** - * + /** + * 实例IP地址 * @return ip - */ + **/ @javax.annotation.Nullable public String getIp() { return ip; } - public void setIp(@javax.annotation.Nullable String ip) { + + public void setIp(String ip) { this.ip = ip; } - public OpenInstanceDTO configs(@javax.annotation.Nullable List configs) { + public OpenInstanceDTO configs(List configs) { + this.configs = configs; return this; } @@ -199,35 +205,38 @@ public OpenInstanceDTO addConfigsItem(OpenInstanceConfigDTO configsItem) { return this; } - /** - * + /** + * 实例当前生效的配置列表 * @return configs - */ + **/ @javax.annotation.Nullable public List getConfigs() { return configs; } - public void setConfigs(@javax.annotation.Nullable List configs) { + + public void setConfigs(List configs) { this.configs = configs; } - public OpenInstanceDTO dataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { + public OpenInstanceDTO dataChangeCreatedTime(String dataChangeCreatedTime) { + this.dataChangeCreatedTime = dataChangeCreatedTime; return this; } - /** - * + /** + * 数据创建时间(ISO 8601) * @return dataChangeCreatedTime - */ + **/ @javax.annotation.Nullable public String getDataChangeCreatedTime() { return dataChangeCreatedTime; } - public void setDataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { + + public void setDataChangeCreatedTime(String dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; } @@ -288,33 +297,39 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("id", "appId", "clusterName", "dataCenter", "ip", "configs", "dataChangeCreatedTime")); + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("appId"); + openapiFields.add("clusterName"); + openapiFields.add("dataCenter"); + openapiFields.add("ip"); + openapiFields.add("configs"); + openapiFields.add("dataChangeCreatedTime"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenInstanceDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenInstanceDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + 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 OpenInstanceDTO + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OpenInstanceDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in OpenInstanceDTO is not found in the empty JSON string", OpenInstanceDTO.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { + for (Entry entry : entries) { if (!OpenInstanceDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenInstanceDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenInstanceDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); } @@ -337,7 +352,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `configs` (array) for (int i = 0; i < jsonArrayconfigs.size(); i++) { - OpenInstanceConfigDTO.validateJsonElement(jsonArrayconfigs.get(i)); + OpenInstanceConfigDTO.validateJsonObject(jsonArrayconfigs.get(i).getAsJsonObject()); }; } } @@ -366,33 +381,32 @@ public void write(JsonWriter out, OpenInstanceDTO value) throws IOException { @Override public OpenInstanceDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); } } - /** - * Create an instance of OpenInstanceDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenInstanceDTO - * @throws IOException if the JSON string is invalid with respect to OpenInstanceDTO - */ + /** + * Create an instance of OpenInstanceDTO given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenInstanceDTO + * @throws IOException if the JSON string is invalid with respect to OpenInstanceDTO + */ public static OpenInstanceDTO fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OpenInstanceDTO.class); } - /** - * Convert an instance of OpenInstanceDTO to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OpenInstanceDTO to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } } - diff --git a/java-client/src/main/java/org/openapitools/client/model/ItemChangeSets.java b/java-client/src/main/java/org/openapitools/client/model/OpenItemChangeSets.java similarity index 64% rename from java-client/src/main/java/org/openapitools/client/model/ItemChangeSets.java rename to java-client/src/main/java/org/openapitools/client/model/OpenItemChangeSets.java index 28aee31e..f5a46a3e 100644 --- a/java-client/src/main/java/org/openapitools/client/model/ItemChangeSets.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenItemChangeSets.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,6 +14,7 @@ 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; @@ -21,9 +22,8 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; -import org.openapitools.client.model.ItemDTO; +import org.openapitools.client.model.OpenItemDTO; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -40,258 +40,269 @@ 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; /** - * ItemChangeSets + * OpenItemChangeSets */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class ItemChangeSets { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +public class OpenItemChangeSets { public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - @javax.annotation.Nullable private String dataChangeCreatedBy; public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - @javax.annotation.Nullable private String dataChangeLastModifiedBy; public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME = "dataChangeCreatedByDisplayName"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME) - @javax.annotation.Nullable private String dataChangeCreatedByDisplayName; public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME = "dataChangeLastModifiedByDisplayName"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME) - @javax.annotation.Nullable private String dataChangeLastModifiedByDisplayName; public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - @javax.annotation.Nullable private String dataChangeCreatedTime; public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - @javax.annotation.Nullable private String dataChangeLastModifiedTime; public static final String SERIALIZED_NAME_CREATE_ITEMS = "createItems"; @SerializedName(SERIALIZED_NAME_CREATE_ITEMS) - @javax.annotation.Nullable - private List createItems = new ArrayList<>(); + private List createItems = null; public static final String SERIALIZED_NAME_UPDATE_ITEMS = "updateItems"; @SerializedName(SERIALIZED_NAME_UPDATE_ITEMS) - @javax.annotation.Nullable - private List updateItems = new ArrayList<>(); + private List updateItems = null; public static final String SERIALIZED_NAME_DELETE_ITEMS = "deleteItems"; @SerializedName(SERIALIZED_NAME_DELETE_ITEMS) - @javax.annotation.Nullable - private List deleteItems = new ArrayList<>(); + private List deleteItems = null; - public ItemChangeSets() { + public OpenItemChangeSets() { } - public ItemChangeSets dataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { + public OpenItemChangeSets dataChangeCreatedBy(String dataChangeCreatedBy) { + this.dataChangeCreatedBy = dataChangeCreatedBy; return this; } - /** - * + /** + * 变更集合创建者用户名 * @return dataChangeCreatedBy - */ + **/ @javax.annotation.Nullable public String getDataChangeCreatedBy() { return dataChangeCreatedBy; } - public void setDataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { + + public void setDataChangeCreatedBy(String dataChangeCreatedBy) { this.dataChangeCreatedBy = dataChangeCreatedBy; } - public ItemChangeSets dataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { + public OpenItemChangeSets dataChangeLastModifiedBy(String dataChangeLastModifiedBy) { + this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; return this; } - /** - * + /** + * 变更集合最后修改者用户名 * @return dataChangeLastModifiedBy - */ + **/ @javax.annotation.Nullable public String getDataChangeLastModifiedBy() { return dataChangeLastModifiedBy; } - public void setDataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { + + public void setDataChangeLastModifiedBy(String dataChangeLastModifiedBy) { this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; } - public ItemChangeSets dataChangeCreatedByDisplayName(@javax.annotation.Nullable String dataChangeCreatedByDisplayName) { + public OpenItemChangeSets dataChangeCreatedByDisplayName(String dataChangeCreatedByDisplayName) { + this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; return this; } - /** - * + /** + * 创建者显示名 * @return dataChangeCreatedByDisplayName - */ + **/ @javax.annotation.Nullable public String getDataChangeCreatedByDisplayName() { return dataChangeCreatedByDisplayName; } - public void setDataChangeCreatedByDisplayName(@javax.annotation.Nullable String dataChangeCreatedByDisplayName) { + + public void setDataChangeCreatedByDisplayName(String dataChangeCreatedByDisplayName) { this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; } - public ItemChangeSets dataChangeLastModifiedByDisplayName(@javax.annotation.Nullable String dataChangeLastModifiedByDisplayName) { + public OpenItemChangeSets dataChangeLastModifiedByDisplayName(String dataChangeLastModifiedByDisplayName) { + this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; return this; } - /** - * + /** + * 最后修改者显示名 * @return dataChangeLastModifiedByDisplayName - */ + **/ @javax.annotation.Nullable public String getDataChangeLastModifiedByDisplayName() { return dataChangeLastModifiedByDisplayName; } - public void setDataChangeLastModifiedByDisplayName(@javax.annotation.Nullable String dataChangeLastModifiedByDisplayName) { + + public void setDataChangeLastModifiedByDisplayName(String dataChangeLastModifiedByDisplayName) { this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; } - public ItemChangeSets dataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { + public OpenItemChangeSets dataChangeCreatedTime(String dataChangeCreatedTime) { + this.dataChangeCreatedTime = dataChangeCreatedTime; return this; } - /** - * + /** + * 变更集合创建时间(ISO 8601) * @return dataChangeCreatedTime - */ + **/ @javax.annotation.Nullable public String getDataChangeCreatedTime() { return dataChangeCreatedTime; } - public void setDataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { + + public void setDataChangeCreatedTime(String dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; } - public ItemChangeSets dataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { + public OpenItemChangeSets dataChangeLastModifiedTime(String dataChangeLastModifiedTime) { + this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; return this; } - /** - * + /** + * 变更集合最后修改时间(ISO 8601) * @return dataChangeLastModifiedTime - */ + **/ @javax.annotation.Nullable public String getDataChangeLastModifiedTime() { return dataChangeLastModifiedTime; } - public void setDataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { + + public void setDataChangeLastModifiedTime(String dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; } - public ItemChangeSets createItems(@javax.annotation.Nullable List createItems) { + public OpenItemChangeSets createItems(List createItems) { + this.createItems = createItems; return this; } - public ItemChangeSets addCreateItemsItem(ItemDTO createItemsItem) { + public OpenItemChangeSets addCreateItemsItem(OpenItemDTO createItemsItem) { if (this.createItems == null) { - this.createItems = new ArrayList<>(); + this.createItems = null; } this.createItems.add(createItemsItem); return this; } - /** - * + /** + * 待创建的配置项列表 * @return createItems - */ + **/ @javax.annotation.Nullable - public List getCreateItems() { + public List getCreateItems() { return createItems; } - public void setCreateItems(@javax.annotation.Nullable List createItems) { + + public void setCreateItems(List createItems) { this.createItems = createItems; } - public ItemChangeSets updateItems(@javax.annotation.Nullable List updateItems) { + public OpenItemChangeSets updateItems(List updateItems) { + this.updateItems = updateItems; return this; } - public ItemChangeSets addUpdateItemsItem(ItemDTO updateItemsItem) { + public OpenItemChangeSets addUpdateItemsItem(OpenItemDTO updateItemsItem) { if (this.updateItems == null) { - this.updateItems = new ArrayList<>(); + this.updateItems = null; } this.updateItems.add(updateItemsItem); return this; } - /** - * + /** + * 待更新的配置项列表 * @return updateItems - */ + **/ @javax.annotation.Nullable - public List getUpdateItems() { + public List getUpdateItems() { return updateItems; } - public void setUpdateItems(@javax.annotation.Nullable List updateItems) { + + public void setUpdateItems(List updateItems) { this.updateItems = updateItems; } - public ItemChangeSets deleteItems(@javax.annotation.Nullable List deleteItems) { + public OpenItemChangeSets deleteItems(List deleteItems) { + this.deleteItems = deleteItems; return this; } - public ItemChangeSets addDeleteItemsItem(ItemDTO deleteItemsItem) { + public OpenItemChangeSets addDeleteItemsItem(OpenItemDTO deleteItemsItem) { if (this.deleteItems == null) { - this.deleteItems = new ArrayList<>(); + this.deleteItems = null; } this.deleteItems.add(deleteItemsItem); return this; } - /** - * + /** + * 待删除的配置项列表 * @return deleteItems - */ + **/ @javax.annotation.Nullable - public List getDeleteItems() { + public List getDeleteItems() { return deleteItems; } - public void setDeleteItems(@javax.annotation.Nullable List deleteItems) { + + public void setDeleteItems(List deleteItems) { this.deleteItems = deleteItems; } @@ -305,16 +316,16 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ItemChangeSets itemChangeSets = (ItemChangeSets) o; - return Objects.equals(this.dataChangeCreatedBy, itemChangeSets.dataChangeCreatedBy) && - Objects.equals(this.dataChangeLastModifiedBy, itemChangeSets.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, itemChangeSets.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, itemChangeSets.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, itemChangeSets.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, itemChangeSets.dataChangeLastModifiedTime) && - Objects.equals(this.createItems, itemChangeSets.createItems) && - Objects.equals(this.updateItems, itemChangeSets.updateItems) && - Objects.equals(this.deleteItems, itemChangeSets.deleteItems); + OpenItemChangeSets openItemChangeSets = (OpenItemChangeSets) o; + return Objects.equals(this.dataChangeCreatedBy, openItemChangeSets.dataChangeCreatedBy) && + Objects.equals(this.dataChangeLastModifiedBy, openItemChangeSets.dataChangeLastModifiedBy) && + Objects.equals(this.dataChangeCreatedByDisplayName, openItemChangeSets.dataChangeCreatedByDisplayName) && + Objects.equals(this.dataChangeLastModifiedByDisplayName, openItemChangeSets.dataChangeLastModifiedByDisplayName) && + Objects.equals(this.dataChangeCreatedTime, openItemChangeSets.dataChangeCreatedTime) && + Objects.equals(this.dataChangeLastModifiedTime, openItemChangeSets.dataChangeLastModifiedTime) && + Objects.equals(this.createItems, openItemChangeSets.createItems) && + Objects.equals(this.updateItems, openItemChangeSets.updateItems) && + Objects.equals(this.deleteItems, openItemChangeSets.deleteItems); } @Override @@ -325,7 +336,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ItemChangeSets {\n"); + sb.append("class OpenItemChangeSets {\n"); sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).append("\n"); sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); @@ -356,33 +367,41 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "createItems", "updateItems", "deleteItems")); + openapiFields = new HashSet(); + openapiFields.add("dataChangeCreatedBy"); + openapiFields.add("dataChangeLastModifiedBy"); + openapiFields.add("dataChangeCreatedByDisplayName"); + openapiFields.add("dataChangeLastModifiedByDisplayName"); + openapiFields.add("dataChangeCreatedTime"); + openapiFields.add("dataChangeLastModifiedTime"); + openapiFields.add("createItems"); + openapiFields.add("updateItems"); + openapiFields.add("deleteItems"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ItemChangeSets - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ItemChangeSets.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ItemChangeSets is not found in the empty JSON string", ItemChangeSets.openapiRequiredFields.toString())); + 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 OpenItemChangeSets + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OpenItemChangeSets.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OpenItemChangeSets is not found in the empty JSON string", OpenItemChangeSets.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ItemChangeSets.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ItemChangeSets` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + for (Entry entry : entries) { + if (!OpenItemChangeSets.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenItemChangeSets` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("dataChangeCreatedBy") != null && !jsonObj.get("dataChangeCreatedBy").isJsonNull()) && !jsonObj.get("dataChangeCreatedBy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedBy").toString())); } @@ -411,7 +430,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `createItems` (array) for (int i = 0; i < jsonArraycreateItems.size(); i++) { - ItemDTO.validateJsonElement(jsonArraycreateItems.get(i)); + OpenItemDTO.validateJsonObject(jsonArraycreateItems.get(i).getAsJsonObject()); }; } } @@ -425,7 +444,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `updateItems` (array) for (int i = 0; i < jsonArrayupdateItems.size(); i++) { - ItemDTO.validateJsonElement(jsonArrayupdateItems.get(i)); + OpenItemDTO.validateJsonObject(jsonArrayupdateItems.get(i).getAsJsonObject()); }; } } @@ -439,7 +458,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `deleteItems` (array) for (int i = 0; i < jsonArraydeleteItems.size(); i++) { - ItemDTO.validateJsonElement(jsonArraydeleteItems.get(i)); + OpenItemDTO.validateJsonObject(jsonArraydeleteItems.get(i).getAsJsonObject()); }; } } @@ -449,49 +468,48 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ItemChangeSets.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ItemChangeSets' and its subtypes + if (!OpenItemChangeSets.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpenItemChangeSets' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ItemChangeSets.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpenItemChangeSets.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ItemChangeSets value) throws IOException { + public void write(JsonWriter out, OpenItemChangeSets value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public ItemChangeSets read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + public OpenItemChangeSets read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); } } - /** - * Create an instance of ItemChangeSets given an JSON string - * - * @param jsonString JSON string - * @return An instance of ItemChangeSets - * @throws IOException if the JSON string is invalid with respect to ItemChangeSets - */ - public static ItemChangeSets fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ItemChangeSets.class); + /** + * Create an instance of OpenItemChangeSets given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenItemChangeSets + * @throws IOException if the JSON string is invalid with respect to OpenItemChangeSets + */ + public static OpenItemChangeSets fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpenItemChangeSets.class); } - /** - * Convert an instance of ItemChangeSets to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OpenItemChangeSets to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } } - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenItemDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenItemDTO.java index b36c7bc9..de3d86cf 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenItemDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenItemDTO.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -37,10 +37,12 @@ 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; @@ -48,199 +50,207 @@ /** * Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") public class OpenItemDTO { public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - @javax.annotation.Nullable private String dataChangeCreatedBy; public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - @javax.annotation.Nullable private String dataChangeLastModifiedBy; public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - @javax.annotation.Nullable private String dataChangeCreatedTime; public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - @javax.annotation.Nullable private String dataChangeLastModifiedTime; public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) - @javax.annotation.Nullable private String key; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable private Integer type; public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) - @javax.annotation.Nullable private String value; public static final String SERIALIZED_NAME_COMMENT = "comment"; @SerializedName(SERIALIZED_NAME_COMMENT) - @javax.annotation.Nullable private String comment; public OpenItemDTO() { } - public OpenItemDTO dataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { + public OpenItemDTO dataChangeCreatedBy(String dataChangeCreatedBy) { + this.dataChangeCreatedBy = dataChangeCreatedBy; return this; } - /** + /** * 配置项创建者用户名,记录是谁创建了这个配置项 * @return dataChangeCreatedBy - */ + **/ @javax.annotation.Nullable public String getDataChangeCreatedBy() { return dataChangeCreatedBy; } - public void setDataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { + + public void setDataChangeCreatedBy(String dataChangeCreatedBy) { this.dataChangeCreatedBy = dataChangeCreatedBy; } - public OpenItemDTO dataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { + public OpenItemDTO dataChangeLastModifiedBy(String dataChangeLastModifiedBy) { + this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; return this; } - /** + /** * 配置项最后修改者用户名,记录最后一次修改配置的用户 * @return dataChangeLastModifiedBy - */ + **/ @javax.annotation.Nullable public String getDataChangeLastModifiedBy() { return dataChangeLastModifiedBy; } - public void setDataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { + + public void setDataChangeLastModifiedBy(String dataChangeLastModifiedBy) { this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; } - public OpenItemDTO dataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { + public OpenItemDTO dataChangeCreatedTime(String dataChangeCreatedTime) { + this.dataChangeCreatedTime = dataChangeCreatedTime; return this; } - /** + /** * 配置项创建时间,ISO 8601格式的时间戳 * @return dataChangeCreatedTime - */ + **/ @javax.annotation.Nullable public String getDataChangeCreatedTime() { return dataChangeCreatedTime; } - public void setDataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { + + public void setDataChangeCreatedTime(String dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; } - public OpenItemDTO dataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { + public OpenItemDTO dataChangeLastModifiedTime(String dataChangeLastModifiedTime) { + this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; return this; } - /** + /** * 配置项最后修改时间,ISO 8601格式的时间戳 * @return dataChangeLastModifiedTime - */ + **/ @javax.annotation.Nullable public String getDataChangeLastModifiedTime() { return dataChangeLastModifiedTime; } - public void setDataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { + + public void setDataChangeLastModifiedTime(String dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; } - public OpenItemDTO key(@javax.annotation.Nullable String key) { + public OpenItemDTO key(String key) { + this.key = key; return this; } - /** + /** * 配置项的键名,在同一命名空间内唯一标识一个配置项 * @return key - */ + **/ @javax.annotation.Nullable public String getKey() { return key; } - public void setKey(@javax.annotation.Nullable String key) { + + public void setKey(String key) { this.key = key; } - public OpenItemDTO type(@javax.annotation.Nullable Integer type) { + public OpenItemDTO type(Integer type) { + this.type = type; return this; } - /** + /** * 配置项类型,0表示普通配置项,1表示文件类型配置项 * @return type - */ + **/ @javax.annotation.Nullable public Integer getType() { return type; } - public void setType(@javax.annotation.Nullable Integer type) { + + public void setType(Integer type) { this.type = type; } - public OpenItemDTO value(@javax.annotation.Nullable String value) { + public OpenItemDTO value(String value) { + this.value = value; return this; } - /** + /** * 配置项的值,可以是字符串、数字、JSON等格式 * @return value - */ + **/ @javax.annotation.Nullable public String getValue() { return value; } - public void setValue(@javax.annotation.Nullable String value) { + + public void setValue(String value) { this.value = value; } - public OpenItemDTO comment(@javax.annotation.Nullable String comment) { + public OpenItemDTO comment(String comment) { + this.comment = comment; return this; } - /** + /** * 配置项的注释说明,用于描述配置项的用途和含义 * @return comment - */ + **/ @javax.annotation.Nullable public String getComment() { return comment; } - public void setComment(@javax.annotation.Nullable String comment) { + + public void setComment(String comment) { this.comment = comment; } @@ -303,33 +313,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "key", "type", "value", "comment")); + openapiFields = new HashSet(); + openapiFields.add("dataChangeCreatedBy"); + openapiFields.add("dataChangeLastModifiedBy"); + openapiFields.add("dataChangeCreatedTime"); + openapiFields.add("dataChangeLastModifiedTime"); + openapiFields.add("key"); + openapiFields.add("type"); + openapiFields.add("value"); + openapiFields.add("comment"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenItemDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenItemDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + 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 OpenItemDTO + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OpenItemDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in OpenItemDTO is not found in the empty JSON string", OpenItemDTO.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { + for (Entry entry : entries) { if (!OpenItemDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenItemDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenItemDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("dataChangeCreatedBy") != null && !jsonObj.get("dataChangeCreatedBy").isJsonNull()) && !jsonObj.get("dataChangeCreatedBy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedBy").toString())); } @@ -373,33 +390,32 @@ public void write(JsonWriter out, OpenItemDTO value) throws IOException { @Override public OpenItemDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); } } - /** - * Create an instance of OpenItemDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenItemDTO - * @throws IOException if the JSON string is invalid with respect to OpenItemDTO - */ + /** + * Create an instance of OpenItemDTO given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenItemDTO + * @throws IOException if the JSON string is invalid with respect to OpenItemDTO + */ public static OpenItemDTO fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OpenItemDTO.class); } - /** - * Convert an instance of OpenItemDTO to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OpenItemDTO to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } } - diff --git a/java-client/src/main/java/org/openapitools/client/model/ListItemDiffs.java b/java-client/src/main/java/org/openapitools/client/model/OpenItemDiffs.java similarity index 53% rename from java-client/src/main/java/org/openapitools/client/model/ListItemDiffs.java rename to java-client/src/main/java/org/openapitools/client/model/OpenItemDiffs.java index 6f8842e7..3d502389 100644 --- a/java-client/src/main/java/org/openapitools/client/model/ListItemDiffs.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenItemDiffs.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,15 +14,15 @@ package org.openapitools.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.ItemChangeSets; -import org.openapitools.client.model.NamespaceIdentifier; +import org.openapitools.client.model.OpenItemChangeSets; +import org.openapitools.client.model.OpenNamespaceIdentifier; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -39,90 +39,95 @@ 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; /** - * ListItemDiffs + * OpenItemDiffs */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class ListItemDiffs { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +public class OpenItemDiffs { public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) - @javax.annotation.Nullable - private NamespaceIdentifier namespace; + private OpenNamespaceIdentifier namespace; public static final String SERIALIZED_NAME_DIFFS = "diffs"; @SerializedName(SERIALIZED_NAME_DIFFS) - @javax.annotation.Nullable - private ItemChangeSets diffs; + private OpenItemChangeSets diffs; public static final String SERIALIZED_NAME_EXT_INFO = "extInfo"; @SerializedName(SERIALIZED_NAME_EXT_INFO) - @javax.annotation.Nullable private String extInfo; - public ListItemDiffs() { + public OpenItemDiffs() { } - public ListItemDiffs namespace(@javax.annotation.Nullable NamespaceIdentifier namespace) { + public OpenItemDiffs namespace(OpenNamespaceIdentifier namespace) { + this.namespace = namespace; return this; } - /** + /** * Get namespace * @return namespace - */ + **/ @javax.annotation.Nullable - public NamespaceIdentifier getNamespace() { + public OpenNamespaceIdentifier getNamespace() { return namespace; } - public void setNamespace(@javax.annotation.Nullable NamespaceIdentifier namespace) { + + public void setNamespace(OpenNamespaceIdentifier namespace) { this.namespace = namespace; } - public ListItemDiffs diffs(@javax.annotation.Nullable ItemChangeSets diffs) { + public OpenItemDiffs diffs(OpenItemChangeSets diffs) { + this.diffs = diffs; return this; } - /** + /** * Get diffs * @return diffs - */ + **/ @javax.annotation.Nullable - public ItemChangeSets getDiffs() { + public OpenItemChangeSets getDiffs() { return diffs; } - public void setDiffs(@javax.annotation.Nullable ItemChangeSets diffs) { + + public void setDiffs(OpenItemChangeSets diffs) { this.diffs = diffs; } - public ListItemDiffs extInfo(@javax.annotation.Nullable String extInfo) { + public OpenItemDiffs extInfo(String extInfo) { + this.extInfo = extInfo; return this; } - /** - * + /** + * 扩展信息 * @return extInfo - */ + **/ @javax.annotation.Nullable public String getExtInfo() { return extInfo; } - public void setExtInfo(@javax.annotation.Nullable String extInfo) { + + public void setExtInfo(String extInfo) { this.extInfo = extInfo; } @@ -136,10 +141,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ListItemDiffs listItemDiffs = (ListItemDiffs) o; - return Objects.equals(this.namespace, listItemDiffs.namespace) && - Objects.equals(this.diffs, listItemDiffs.diffs) && - Objects.equals(this.extInfo, listItemDiffs.extInfo); + OpenItemDiffs openItemDiffs = (OpenItemDiffs) o; + return Objects.equals(this.namespace, openItemDiffs.namespace) && + Objects.equals(this.diffs, openItemDiffs.diffs) && + Objects.equals(this.extInfo, openItemDiffs.extInfo); } @Override @@ -150,7 +155,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ListItemDiffs {\n"); + sb.append("class OpenItemDiffs {\n"); sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); sb.append(" diffs: ").append(toIndentedString(diffs)).append("\n"); sb.append(" extInfo: ").append(toIndentedString(extInfo)).append("\n"); @@ -175,40 +180,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("namespace", "diffs", "extInfo")); + openapiFields = new HashSet(); + openapiFields.add("namespace"); + openapiFields.add("diffs"); + openapiFields.add("extInfo"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ListItemDiffs - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ListItemDiffs.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ListItemDiffs is not found in the empty JSON string", ListItemDiffs.openapiRequiredFields.toString())); + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to OpenItemDiffs + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OpenItemDiffs.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OpenItemDiffs is not found in the empty JSON string", OpenItemDiffs.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ListItemDiffs.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ListItemDiffs` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + for (Entry entry : entries) { + if (!OpenItemDiffs.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenItemDiffs` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `namespace` if (jsonObj.get("namespace") != null && !jsonObj.get("namespace").isJsonNull()) { - NamespaceIdentifier.validateJsonElement(jsonObj.get("namespace")); + OpenNamespaceIdentifier.validateJsonObject(jsonObj.getAsJsonObject("namespace")); } // validate the optional field `diffs` if (jsonObj.get("diffs") != null && !jsonObj.get("diffs").isJsonNull()) { - ItemChangeSets.validateJsonElement(jsonObj.get("diffs")); + OpenItemChangeSets.validateJsonObject(jsonObj.getAsJsonObject("diffs")); } if ((jsonObj.get("extInfo") != null && !jsonObj.get("extInfo").isJsonNull()) && !jsonObj.get("extInfo").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `extInfo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("extInfo").toString())); @@ -219,49 +226,48 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ListItemDiffs.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ListItemDiffs' and its subtypes + if (!OpenItemDiffs.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpenItemDiffs' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ListItemDiffs.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpenItemDiffs.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ListItemDiffs value) throws IOException { + public void write(JsonWriter out, OpenItemDiffs value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public ListItemDiffs read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + public OpenItemDiffs read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); } } - /** - * Create an instance of ListItemDiffs given an JSON string - * - * @param jsonString JSON string - * @return An instance of ListItemDiffs - * @throws IOException if the JSON string is invalid with respect to ListItemDiffs - */ - public static ListItemDiffs fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ListItemDiffs.class); + /** + * Create an instance of OpenItemDiffs given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenItemDiffs + * @throws IOException if the JSON string is invalid with respect to OpenItemDiffs + */ + public static OpenItemDiffs fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpenItemDiffs.class); } - /** - * Convert an instance of ListItemDiffs to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OpenItemDiffs to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } } - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceDTO.java index 36957436..0e1d5e8a 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceDTO.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,6 +14,7 @@ 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; @@ -21,7 +22,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import org.openapitools.client.model.OpenItemDTO; @@ -40,10 +40,12 @@ 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; @@ -51,257 +53,267 @@ /** * Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") public class OpenNamespaceDTO { public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - @javax.annotation.Nullable private String dataChangeCreatedBy; public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - @javax.annotation.Nullable private String dataChangeLastModifiedBy; public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - @javax.annotation.Nullable private String dataChangeCreatedTime; public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - @javax.annotation.Nullable private String dataChangeLastModifiedTime; public static final String SERIALIZED_NAME_APP_ID = "appId"; @SerializedName(SERIALIZED_NAME_APP_ID) - @javax.annotation.Nullable private String appId; public static final String SERIALIZED_NAME_CLUSTER_NAME = "clusterName"; @SerializedName(SERIALIZED_NAME_CLUSTER_NAME) - @javax.annotation.Nullable private String clusterName; public static final String SERIALIZED_NAME_NAMESPACE_NAME = "namespaceName"; @SerializedName(SERIALIZED_NAME_NAMESPACE_NAME) - @javax.annotation.Nullable private String namespaceName; public static final String SERIALIZED_NAME_COMMENT = "comment"; @SerializedName(SERIALIZED_NAME_COMMENT) - @javax.annotation.Nullable private String comment; public static final String SERIALIZED_NAME_FORMAT = "format"; @SerializedName(SERIALIZED_NAME_FORMAT) - @javax.annotation.Nullable private String format; public static final String SERIALIZED_NAME_IS_PUBLIC = "isPublic"; @SerializedName(SERIALIZED_NAME_IS_PUBLIC) - @javax.annotation.Nullable private Boolean isPublic; public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) - @javax.annotation.Nullable - private List items = new ArrayList<>(); + private List items; public OpenNamespaceDTO() { } - public OpenNamespaceDTO dataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { + public OpenNamespaceDTO dataChangeCreatedBy(String dataChangeCreatedBy) { + this.dataChangeCreatedBy = dataChangeCreatedBy; return this; } - /** + /** * 命名空间创建者用户名,记录是谁创建了这个命名空间 * @return dataChangeCreatedBy - */ + **/ @javax.annotation.Nullable public String getDataChangeCreatedBy() { return dataChangeCreatedBy; } - public void setDataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { + + public void setDataChangeCreatedBy(String dataChangeCreatedBy) { this.dataChangeCreatedBy = dataChangeCreatedBy; } - public OpenNamespaceDTO dataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { + public OpenNamespaceDTO dataChangeLastModifiedBy(String dataChangeLastModifiedBy) { + this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; return this; } - /** + /** * 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 * @return dataChangeLastModifiedBy - */ + **/ @javax.annotation.Nullable public String getDataChangeLastModifiedBy() { return dataChangeLastModifiedBy; } - public void setDataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { + + public void setDataChangeLastModifiedBy(String dataChangeLastModifiedBy) { this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; } - public OpenNamespaceDTO dataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { + public OpenNamespaceDTO dataChangeCreatedTime(String dataChangeCreatedTime) { + this.dataChangeCreatedTime = dataChangeCreatedTime; return this; } - /** + /** * 命名空间创建时间,ISO 8601格式的时间戳 * @return dataChangeCreatedTime - */ + **/ @javax.annotation.Nullable public String getDataChangeCreatedTime() { return dataChangeCreatedTime; } - public void setDataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { + + public void setDataChangeCreatedTime(String dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; } - public OpenNamespaceDTO dataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { + public OpenNamespaceDTO dataChangeLastModifiedTime(String dataChangeLastModifiedTime) { + this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; return this; } - /** + /** * 命名空间最后修改时间,ISO 8601格式的时间戳 * @return dataChangeLastModifiedTime - */ + **/ @javax.annotation.Nullable public String getDataChangeLastModifiedTime() { return dataChangeLastModifiedTime; } - public void setDataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { + + public void setDataChangeLastModifiedTime(String dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; } - public OpenNamespaceDTO appId(@javax.annotation.Nullable String appId) { + public OpenNamespaceDTO appId(String appId) { + this.appId = appId; return this; } - /** + /** * 所属应用的唯一标识符 * @return appId - */ + **/ @javax.annotation.Nullable public String getAppId() { return appId; } - public void setAppId(@javax.annotation.Nullable String appId) { + + public void setAppId(String appId) { this.appId = appId; } - public OpenNamespaceDTO clusterName(@javax.annotation.Nullable String clusterName) { + public OpenNamespaceDTO clusterName(String clusterName) { + this.clusterName = clusterName; return this; } - /** + /** * 所属集群的名称 * @return clusterName - */ + **/ @javax.annotation.Nullable public String getClusterName() { return clusterName; } - public void setClusterName(@javax.annotation.Nullable String clusterName) { + + public void setClusterName(String clusterName) { this.clusterName = clusterName; } - public OpenNamespaceDTO namespaceName(@javax.annotation.Nullable String namespaceName) { + public OpenNamespaceDTO namespaceName(String namespaceName) { + this.namespaceName = namespaceName; return this; } - /** + /** * 命名空间名称,在同一应用和集群下唯一标识一个命名空间 * @return namespaceName - */ + **/ @javax.annotation.Nullable public String getNamespaceName() { return namespaceName; } - public void setNamespaceName(@javax.annotation.Nullable String namespaceName) { + + public void setNamespaceName(String namespaceName) { this.namespaceName = namespaceName; } - public OpenNamespaceDTO comment(@javax.annotation.Nullable String comment) { + public OpenNamespaceDTO comment(String comment) { + this.comment = comment; return this; } - /** + /** * 命名空间备注说明,描述命名空间的用途 * @return comment - */ + **/ @javax.annotation.Nullable public String getComment() { return comment; } - public void setComment(@javax.annotation.Nullable String comment) { + + public void setComment(String comment) { this.comment = comment; } - public OpenNamespaceDTO format(@javax.annotation.Nullable String format) { + public OpenNamespaceDTO format(String format) { + this.format = format; return this; } - /** + /** * 命名空间格式类型,如properties、xml、json、yml等 * @return format - */ + **/ @javax.annotation.Nullable public String getFormat() { return format; } - public void setFormat(@javax.annotation.Nullable String format) { + + public void setFormat(String format) { this.format = format; } - public OpenNamespaceDTO isPublic(@javax.annotation.Nullable Boolean isPublic) { + public OpenNamespaceDTO isPublic(Boolean isPublic) { + this.isPublic = isPublic; return this; } - /** + /** * 是否为公共命名空间,公共命名空间可以被其他应用关联使用 * @return isPublic - */ + **/ @javax.annotation.Nullable public Boolean getIsPublic() { return isPublic; } - public void setIsPublic(@javax.annotation.Nullable Boolean isPublic) { + + public void setIsPublic(Boolean isPublic) { this.isPublic = isPublic; } - public OpenNamespaceDTO items(@javax.annotation.Nullable List items) { + public OpenNamespaceDTO items(List items) { + this.items = items; return this; } @@ -314,16 +326,17 @@ public OpenNamespaceDTO addItemsItem(OpenItemDTO itemsItem) { return this; } - /** + /** * 命名空间包含的配置项列表 * @return items - */ + **/ @javax.annotation.Nullable public List getItems() { return items; } - public void setItems(@javax.annotation.Nullable List items) { + + public void setItems(List items) { this.items = items; } @@ -392,33 +405,43 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "appId", "clusterName", "namespaceName", "comment", "format", "isPublic", "items")); + openapiFields = new HashSet(); + openapiFields.add("dataChangeCreatedBy"); + openapiFields.add("dataChangeLastModifiedBy"); + openapiFields.add("dataChangeCreatedTime"); + openapiFields.add("dataChangeLastModifiedTime"); + openapiFields.add("appId"); + openapiFields.add("clusterName"); + openapiFields.add("namespaceName"); + openapiFields.add("comment"); + openapiFields.add("format"); + openapiFields.add("isPublic"); + openapiFields.add("items"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenNamespaceDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenNamespaceDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + 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 OpenNamespaceDTO + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OpenNamespaceDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in OpenNamespaceDTO is not found in the empty JSON string", OpenNamespaceDTO.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { + for (Entry entry : entries) { if (!OpenNamespaceDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenNamespaceDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenNamespaceDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("dataChangeCreatedBy") != null && !jsonObj.get("dataChangeCreatedBy").isJsonNull()) && !jsonObj.get("dataChangeCreatedBy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedBy").toString())); } @@ -456,7 +479,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - OpenItemDTO.validateJsonElement(jsonArrayitems.get(i)); + OpenItemDTO.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); }; } } @@ -482,33 +505,32 @@ public void write(JsonWriter out, OpenNamespaceDTO value) throws IOException { @Override public OpenNamespaceDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); } } - /** - * Create an instance of OpenNamespaceDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenNamespaceDTO - * @throws IOException if the JSON string is invalid with respect to OpenNamespaceDTO - */ + /** + * Create an instance of OpenNamespaceDTO given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenNamespaceDTO + * @throws IOException if the JSON string is invalid with respect to OpenNamespaceDTO + */ public static OpenNamespaceDTO fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OpenNamespaceDTO.class); } - /** - * Convert an instance of OpenNamespaceDTO to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OpenNamespaceDTO to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } } - diff --git a/java-client/src/main/java/org/openapitools/client/model/NamespaceIdentifier.java b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceIdentifier.java similarity index 57% rename from java-client/src/main/java/org/openapitools/client/model/NamespaceIdentifier.java rename to java-client/src/main/java/org/openapitools/client/model/OpenNamespaceIdentifier.java index 3be68329..550998b0 100644 --- a/java-client/src/main/java/org/openapitools/client/model/NamespaceIdentifier.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceIdentifier.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -37,114 +37,120 @@ 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; /** - * NamespaceIdentifier + * OpenNamespaceIdentifier */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class NamespaceIdentifier { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +public class OpenNamespaceIdentifier { public static final String SERIALIZED_NAME_APP_ID = "appId"; @SerializedName(SERIALIZED_NAME_APP_ID) - @javax.annotation.Nullable private String appId; public static final String SERIALIZED_NAME_ENV = "env"; @SerializedName(SERIALIZED_NAME_ENV) - @javax.annotation.Nullable private String env; public static final String SERIALIZED_NAME_CLUSTER_NAME = "clusterName"; @SerializedName(SERIALIZED_NAME_CLUSTER_NAME) - @javax.annotation.Nullable private String clusterName; public static final String SERIALIZED_NAME_NAMESPACE_NAME = "namespaceName"; @SerializedName(SERIALIZED_NAME_NAMESPACE_NAME) - @javax.annotation.Nullable private String namespaceName; - public NamespaceIdentifier() { + public OpenNamespaceIdentifier() { } - public NamespaceIdentifier appId(@javax.annotation.Nullable String appId) { + public OpenNamespaceIdentifier appId(String appId) { + this.appId = appId; return this; } - /** - * + /** + * 应用唯一标识 * @return appId - */ + **/ @javax.annotation.Nullable public String getAppId() { return appId; } - public void setAppId(@javax.annotation.Nullable String appId) { + + public void setAppId(String appId) { this.appId = appId; } - public NamespaceIdentifier env(@javax.annotation.Nullable String env) { + public OpenNamespaceIdentifier env(String env) { + this.env = env; return this; } - /** - * + /** + * 环境标识 * @return env - */ + **/ @javax.annotation.Nullable public String getEnv() { return env; } - public void setEnv(@javax.annotation.Nullable String env) { + + public void setEnv(String env) { this.env = env; } - public NamespaceIdentifier clusterName(@javax.annotation.Nullable String clusterName) { + public OpenNamespaceIdentifier clusterName(String clusterName) { + this.clusterName = clusterName; return this; } - /** - * + /** + * 集群名称 * @return clusterName - */ + **/ @javax.annotation.Nullable public String getClusterName() { return clusterName; } - public void setClusterName(@javax.annotation.Nullable String clusterName) { + + public void setClusterName(String clusterName) { this.clusterName = clusterName; } - public NamespaceIdentifier namespaceName(@javax.annotation.Nullable String namespaceName) { + public OpenNamespaceIdentifier namespaceName(String namespaceName) { + this.namespaceName = namespaceName; return this; } - /** - * + /** + * 命名空间名称 * @return namespaceName - */ + **/ @javax.annotation.Nullable public String getNamespaceName() { return namespaceName; } - public void setNamespaceName(@javax.annotation.Nullable String namespaceName) { + + public void setNamespaceName(String namespaceName) { this.namespaceName = namespaceName; } @@ -158,11 +164,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NamespaceIdentifier namespaceIdentifier = (NamespaceIdentifier) o; - return Objects.equals(this.appId, namespaceIdentifier.appId) && - Objects.equals(this.env, namespaceIdentifier.env) && - Objects.equals(this.clusterName, namespaceIdentifier.clusterName) && - Objects.equals(this.namespaceName, namespaceIdentifier.namespaceName); + OpenNamespaceIdentifier openNamespaceIdentifier = (OpenNamespaceIdentifier) o; + return Objects.equals(this.appId, openNamespaceIdentifier.appId) && + Objects.equals(this.env, openNamespaceIdentifier.env) && + Objects.equals(this.clusterName, openNamespaceIdentifier.clusterName) && + Objects.equals(this.namespaceName, openNamespaceIdentifier.namespaceName); } @Override @@ -173,7 +179,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class NamespaceIdentifier {\n"); + sb.append("class OpenNamespaceIdentifier {\n"); sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); sb.append(" env: ").append(toIndentedString(env)).append("\n"); sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); @@ -199,33 +205,36 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("appId", "env", "clusterName", "namespaceName")); + openapiFields = new HashSet(); + openapiFields.add("appId"); + openapiFields.add("env"); + openapiFields.add("clusterName"); + openapiFields.add("namespaceName"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to NamespaceIdentifier - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!NamespaceIdentifier.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in NamespaceIdentifier is not found in the empty JSON string", NamespaceIdentifier.openapiRequiredFields.toString())); + /** + * 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 OpenNamespaceIdentifier + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OpenNamespaceIdentifier.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OpenNamespaceIdentifier is not found in the empty JSON string", OpenNamespaceIdentifier.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!NamespaceIdentifier.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NamespaceIdentifier` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + for (Entry entry : entries) { + if (!OpenNamespaceIdentifier.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenNamespaceIdentifier` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); } @@ -244,49 +253,48 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!NamespaceIdentifier.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NamespaceIdentifier' and its subtypes + if (!OpenNamespaceIdentifier.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpenNamespaceIdentifier' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(NamespaceIdentifier.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpenNamespaceIdentifier.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, NamespaceIdentifier value) throws IOException { + public void write(JsonWriter out, OpenNamespaceIdentifier value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public NamespaceIdentifier read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + public OpenNamespaceIdentifier read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); } } - /** - * Create an instance of NamespaceIdentifier given an JSON string - * - * @param jsonString JSON string - * @return An instance of NamespaceIdentifier - * @throws IOException if the JSON string is invalid with respect to NamespaceIdentifier - */ - public static NamespaceIdentifier fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NamespaceIdentifier.class); + /** + * Create an instance of OpenNamespaceIdentifier given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenNamespaceIdentifier + * @throws IOException if the JSON string is invalid with respect to OpenNamespaceIdentifier + */ + public static OpenNamespaceIdentifier fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpenNamespaceIdentifier.class); } - /** - * Convert an instance of NamespaceIdentifier to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OpenNamespaceIdentifier to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } } - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceLockDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceLockDTO.java index eeccad85..579e1e16 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceLockDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceLockDTO.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -37,10 +37,12 @@ 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; @@ -48,79 +50,82 @@ /** * Apollo命名空间锁状态数据传输对象 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") public class OpenNamespaceLockDTO { public static final String SERIALIZED_NAME_NAMESPACE_NAME = "namespaceName"; @SerializedName(SERIALIZED_NAME_NAMESPACE_NAME) - @javax.annotation.Nullable private String namespaceName; public static final String SERIALIZED_NAME_IS_LOCKED = "isLocked"; @SerializedName(SERIALIZED_NAME_IS_LOCKED) - @javax.annotation.Nullable private Boolean isLocked; public static final String SERIALIZED_NAME_LOCKED_BY = "lockedBy"; @SerializedName(SERIALIZED_NAME_LOCKED_BY) - @javax.annotation.Nullable private String lockedBy; public OpenNamespaceLockDTO() { } - public OpenNamespaceLockDTO namespaceName(@javax.annotation.Nullable String namespaceName) { + public OpenNamespaceLockDTO namespaceName(String namespaceName) { + this.namespaceName = namespaceName; return this; } - /** + /** * 命名空间名称 * @return namespaceName - */ + **/ @javax.annotation.Nullable public String getNamespaceName() { return namespaceName; } - public void setNamespaceName(@javax.annotation.Nullable String namespaceName) { + + public void setNamespaceName(String namespaceName) { this.namespaceName = namespaceName; } - public OpenNamespaceLockDTO isLocked(@javax.annotation.Nullable Boolean isLocked) { + public OpenNamespaceLockDTO isLocked(Boolean isLocked) { + this.isLocked = isLocked; return this; } - /** + /** * 是否被锁定 * @return isLocked - */ + **/ @javax.annotation.Nullable public Boolean getIsLocked() { return isLocked; } - public void setIsLocked(@javax.annotation.Nullable Boolean isLocked) { + + public void setIsLocked(Boolean isLocked) { this.isLocked = isLocked; } - public OpenNamespaceLockDTO lockedBy(@javax.annotation.Nullable String lockedBy) { + public OpenNamespaceLockDTO lockedBy(String lockedBy) { + this.lockedBy = lockedBy; return this; } - /** + /** * 锁定者用户名 * @return lockedBy - */ + **/ @javax.annotation.Nullable public String getLockedBy() { return lockedBy; } - public void setLockedBy(@javax.annotation.Nullable String lockedBy) { + + public void setLockedBy(String lockedBy) { this.lockedBy = lockedBy; } @@ -173,33 +178,35 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("namespaceName", "isLocked", "lockedBy")); + openapiFields = new HashSet(); + openapiFields.add("namespaceName"); + openapiFields.add("isLocked"); + openapiFields.add("lockedBy"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenNamespaceLockDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenNamespaceLockDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + /** + * 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 OpenNamespaceLockDTO + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OpenNamespaceLockDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in OpenNamespaceLockDTO is not found in the empty JSON string", OpenNamespaceLockDTO.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { + for (Entry entry : entries) { if (!OpenNamespaceLockDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenNamespaceLockDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenNamespaceLockDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("namespaceName") != null && !jsonObj.get("namespaceName").isJsonNull()) && !jsonObj.get("namespaceName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `namespaceName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespaceName").toString())); } @@ -228,33 +235,32 @@ public void write(JsonWriter out, OpenNamespaceLockDTO value) throws IOException @Override public OpenNamespaceLockDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); } } - /** - * Create an instance of OpenNamespaceLockDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenNamespaceLockDTO - * @throws IOException if the JSON string is invalid with respect to OpenNamespaceLockDTO - */ + /** + * Create an instance of OpenNamespaceLockDTO given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenNamespaceLockDTO + * @throws IOException if the JSON string is invalid with respect to OpenNamespaceLockDTO + */ public static OpenNamespaceLockDTO fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OpenNamespaceLockDTO.class); } - /** - * Convert an instance of OpenNamespaceLockDTO to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OpenNamespaceLockDTO to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } } - diff --git a/java-client/src/main/java/org/openapitools/client/model/NamespaceSyncModel.java b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceSyncModel.java similarity index 55% rename from java-client/src/main/java/org/openapitools/client/model/NamespaceSyncModel.java rename to java-client/src/main/java/org/openapitools/client/model/OpenNamespaceSyncModel.java index 1325513e..4b5da345 100644 --- a/java-client/src/main/java/org/openapitools/client/model/NamespaceSyncModel.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceSyncModel.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,6 +14,7 @@ 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; @@ -21,10 +22,9 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; -import org.openapitools.client.model.ItemDTO; -import org.openapitools.client.model.NamespaceIdentifier; +import org.openapitools.client.model.OpenItemDTO; +import org.openapitools.client.model.OpenNamespaceIdentifier; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,38 +41,39 @@ 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; /** - * NamespaceSyncModel + * OpenNamespaceSyncModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class NamespaceSyncModel { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +public class OpenNamespaceSyncModel { public static final String SERIALIZED_NAME_SYNC_TO_NAMESPACES = "syncToNamespaces"; @SerializedName(SERIALIZED_NAME_SYNC_TO_NAMESPACES) - @javax.annotation.Nullable - private List syncToNamespaces = new ArrayList<>(); + private List syncToNamespaces; public static final String SERIALIZED_NAME_SYNC_ITEMS = "syncItems"; @SerializedName(SERIALIZED_NAME_SYNC_ITEMS) - @javax.annotation.Nullable - private List syncItems = new ArrayList<>(); + private List syncItems; - public NamespaceSyncModel() { + public OpenNamespaceSyncModel() { } - public NamespaceSyncModel syncToNamespaces(@javax.annotation.Nullable List syncToNamespaces) { + public OpenNamespaceSyncModel syncToNamespaces(List syncToNamespaces) { + this.syncToNamespaces = syncToNamespaces; return this; } - public NamespaceSyncModel addSyncToNamespacesItem(NamespaceIdentifier syncToNamespacesItem) { + public OpenNamespaceSyncModel addSyncToNamespacesItem(OpenNamespaceIdentifier syncToNamespacesItem) { if (this.syncToNamespaces == null) { this.syncToNamespaces = new ArrayList<>(); } @@ -80,26 +81,28 @@ public NamespaceSyncModel addSyncToNamespacesItem(NamespaceIdentifier syncToName return this; } - /** - * + /** + * 目标命名空间标识列表 * @return syncToNamespaces - */ + **/ @javax.annotation.Nullable - public List getSyncToNamespaces() { + public List getSyncToNamespaces() { return syncToNamespaces; } - public void setSyncToNamespaces(@javax.annotation.Nullable List syncToNamespaces) { + + public void setSyncToNamespaces(List syncToNamespaces) { this.syncToNamespaces = syncToNamespaces; } - public NamespaceSyncModel syncItems(@javax.annotation.Nullable List syncItems) { + public OpenNamespaceSyncModel syncItems(List syncItems) { + this.syncItems = syncItems; return this; } - public NamespaceSyncModel addSyncItemsItem(ItemDTO syncItemsItem) { + public OpenNamespaceSyncModel addSyncItemsItem(OpenItemDTO syncItemsItem) { if (this.syncItems == null) { this.syncItems = new ArrayList<>(); } @@ -107,16 +110,17 @@ public NamespaceSyncModel addSyncItemsItem(ItemDTO syncItemsItem) { return this; } - /** - * + /** + * 需要同步的配置项列表 * @return syncItems - */ + **/ @javax.annotation.Nullable - public List getSyncItems() { + public List getSyncItems() { return syncItems; } - public void setSyncItems(@javax.annotation.Nullable List syncItems) { + + public void setSyncItems(List syncItems) { this.syncItems = syncItems; } @@ -130,9 +134,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NamespaceSyncModel namespaceSyncModel = (NamespaceSyncModel) o; - return Objects.equals(this.syncToNamespaces, namespaceSyncModel.syncToNamespaces) && - Objects.equals(this.syncItems, namespaceSyncModel.syncItems); + OpenNamespaceSyncModel openNamespaceSyncModel = (OpenNamespaceSyncModel) o; + return Objects.equals(this.syncToNamespaces, openNamespaceSyncModel.syncToNamespaces) && + Objects.equals(this.syncItems, openNamespaceSyncModel.syncItems); } @Override @@ -143,7 +147,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class NamespaceSyncModel {\n"); + sb.append("class OpenNamespaceSyncModel {\n"); sb.append(" syncToNamespaces: ").append(toIndentedString(syncToNamespaces)).append("\n"); sb.append(" syncItems: ").append(toIndentedString(syncItems)).append("\n"); sb.append("}"); @@ -167,33 +171,34 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("syncToNamespaces", "syncItems")); + openapiFields = new HashSet(); + openapiFields.add("syncToNamespaces"); + openapiFields.add("syncItems"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to NamespaceSyncModel - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!NamespaceSyncModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in NamespaceSyncModel is not found in the empty JSON string", NamespaceSyncModel.openapiRequiredFields.toString())); + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to OpenNamespaceSyncModel + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OpenNamespaceSyncModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OpenNamespaceSyncModel is not found in the empty JSON string", OpenNamespaceSyncModel.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!NamespaceSyncModel.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NamespaceSyncModel` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + for (Entry entry : entries) { + if (!OpenNamespaceSyncModel.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenNamespaceSyncModel` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("syncToNamespaces") != null && !jsonObj.get("syncToNamespaces").isJsonNull()) { JsonArray jsonArraysyncToNamespaces = jsonObj.getAsJsonArray("syncToNamespaces"); if (jsonArraysyncToNamespaces != null) { @@ -204,7 +209,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `syncToNamespaces` (array) for (int i = 0; i < jsonArraysyncToNamespaces.size(); i++) { - NamespaceIdentifier.validateJsonElement(jsonArraysyncToNamespaces.get(i)); + OpenNamespaceIdentifier.validateJsonObject(jsonArraysyncToNamespaces.get(i).getAsJsonObject()); }; } } @@ -218,7 +223,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `syncItems` (array) for (int i = 0; i < jsonArraysyncItems.size(); i++) { - ItemDTO.validateJsonElement(jsonArraysyncItems.get(i)); + OpenItemDTO.validateJsonObject(jsonArraysyncItems.get(i).getAsJsonObject()); }; } } @@ -228,49 +233,48 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!NamespaceSyncModel.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NamespaceSyncModel' and its subtypes + if (!OpenNamespaceSyncModel.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpenNamespaceSyncModel' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(NamespaceSyncModel.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpenNamespaceSyncModel.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, NamespaceSyncModel value) throws IOException { + public void write(JsonWriter out, OpenNamespaceSyncModel value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public NamespaceSyncModel read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + public OpenNamespaceSyncModel read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); } } - /** - * Create an instance of NamespaceSyncModel given an JSON string - * - * @param jsonString JSON string - * @return An instance of NamespaceSyncModel - * @throws IOException if the JSON string is invalid with respect to NamespaceSyncModel - */ - public static NamespaceSyncModel fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NamespaceSyncModel.class); + /** + * Create an instance of OpenNamespaceSyncModel given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenNamespaceSyncModel + * @throws IOException if the JSON string is invalid with respect to OpenNamespaceSyncModel + */ + public static OpenNamespaceSyncModel fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpenNamespaceSyncModel.class); } - /** - * Convert an instance of NamespaceSyncModel to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OpenNamespaceSyncModel to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } } - diff --git a/java-client/src/main/java/org/openapitools/client/model/NamespaceTextModel.java b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceTextModel.java similarity index 61% rename from java-client/src/main/java/org/openapitools/client/model/NamespaceTextModel.java rename to java-client/src/main/java/org/openapitools/client/model/OpenNamespaceTextModel.java index 3bf24c1e..0566759c 100644 --- a/java-client/src/main/java/org/openapitools/client/model/NamespaceTextModel.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceTextModel.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -37,210 +37,220 @@ 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; /** - * NamespaceTextModel + * OpenNamespaceTextModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class NamespaceTextModel { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +public class OpenNamespaceTextModel { public static final String SERIALIZED_NAME_APP_ID = "appId"; @SerializedName(SERIALIZED_NAME_APP_ID) - @javax.annotation.Nullable private String appId; public static final String SERIALIZED_NAME_ENV = "env"; @SerializedName(SERIALIZED_NAME_ENV) - @javax.annotation.Nullable private String env; public static final String SERIALIZED_NAME_CLUSTER_NAME = "clusterName"; @SerializedName(SERIALIZED_NAME_CLUSTER_NAME) - @javax.annotation.Nullable private String clusterName; public static final String SERIALIZED_NAME_NAMESPACE_NAME = "namespaceName"; @SerializedName(SERIALIZED_NAME_NAMESPACE_NAME) - @javax.annotation.Nullable private String namespaceName; public static final String SERIALIZED_NAME_NAMESPACE_ID = "namespaceId"; @SerializedName(SERIALIZED_NAME_NAMESPACE_ID) - @javax.annotation.Nullable private Long namespaceId; public static final String SERIALIZED_NAME_FORMAT = "format"; @SerializedName(SERIALIZED_NAME_FORMAT) - @javax.annotation.Nullable private String format; public static final String SERIALIZED_NAME_CONFIG_TEXT = "configText"; @SerializedName(SERIALIZED_NAME_CONFIG_TEXT) - @javax.annotation.Nullable private String configText; public static final String SERIALIZED_NAME_OPERATOR = "operator"; @SerializedName(SERIALIZED_NAME_OPERATOR) - @javax.annotation.Nullable private String operator; - public NamespaceTextModel() { + public OpenNamespaceTextModel() { } - public NamespaceTextModel appId(@javax.annotation.Nullable String appId) { + public OpenNamespaceTextModel appId(String appId) { + this.appId = appId; return this; } - /** - * + /** + * 应用唯一标识 * @return appId - */ + **/ @javax.annotation.Nullable public String getAppId() { return appId; } - public void setAppId(@javax.annotation.Nullable String appId) { + + public void setAppId(String appId) { this.appId = appId; } - public NamespaceTextModel env(@javax.annotation.Nullable String env) { + public OpenNamespaceTextModel env(String env) { + this.env = env; return this; } - /** - * + /** + * 环境标识 * @return env - */ + **/ @javax.annotation.Nullable public String getEnv() { return env; } - public void setEnv(@javax.annotation.Nullable String env) { + + public void setEnv(String env) { this.env = env; } - public NamespaceTextModel clusterName(@javax.annotation.Nullable String clusterName) { + public OpenNamespaceTextModel clusterName(String clusterName) { + this.clusterName = clusterName; return this; } - /** - * + /** + * 集群名称 * @return clusterName - */ + **/ @javax.annotation.Nullable public String getClusterName() { return clusterName; } - public void setClusterName(@javax.annotation.Nullable String clusterName) { + + public void setClusterName(String clusterName) { this.clusterName = clusterName; } - public NamespaceTextModel namespaceName(@javax.annotation.Nullable String namespaceName) { + public OpenNamespaceTextModel namespaceName(String namespaceName) { + this.namespaceName = namespaceName; return this; } - /** - * + /** + * 命名空间名称 * @return namespaceName - */ + **/ @javax.annotation.Nullable public String getNamespaceName() { return namespaceName; } - public void setNamespaceName(@javax.annotation.Nullable String namespaceName) { + + public void setNamespaceName(String namespaceName) { this.namespaceName = namespaceName; } - public NamespaceTextModel namespaceId(@javax.annotation.Nullable Long namespaceId) { + public OpenNamespaceTextModel namespaceId(Long namespaceId) { + this.namespaceId = namespaceId; return this; } - /** - * + /** + * 命名空间ID * @return namespaceId - */ + **/ @javax.annotation.Nullable public Long getNamespaceId() { return namespaceId; } - public void setNamespaceId(@javax.annotation.Nullable Long namespaceId) { + + public void setNamespaceId(Long namespaceId) { this.namespaceId = namespaceId; } - public NamespaceTextModel format(@javax.annotation.Nullable String format) { + public OpenNamespaceTextModel format(String format) { + this.format = format; return this; } - /** - * + /** + * 命名空间格式类型(properties/xml/json/yml等) * @return format - */ + **/ @javax.annotation.Nullable public String getFormat() { return format; } - public void setFormat(@javax.annotation.Nullable String format) { + + public void setFormat(String format) { this.format = format; } - public NamespaceTextModel configText(@javax.annotation.Nullable String configText) { + public OpenNamespaceTextModel configText(String configText) { + this.configText = configText; return this; } - /** - * + /** + * 配置内容的原始文本 * @return configText - */ + **/ @javax.annotation.Nullable public String getConfigText() { return configText; } - public void setConfigText(@javax.annotation.Nullable String configText) { + + public void setConfigText(String configText) { this.configText = configText; } - public NamespaceTextModel operator(@javax.annotation.Nullable String operator) { + public OpenNamespaceTextModel operator(String operator) { + this.operator = operator; return this; } - /** - * + /** + * 操作者用户名 * @return operator - */ + **/ @javax.annotation.Nullable public String getOperator() { return operator; } - public void setOperator(@javax.annotation.Nullable String operator) { + + public void setOperator(String operator) { this.operator = operator; } @@ -254,15 +264,15 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NamespaceTextModel namespaceTextModel = (NamespaceTextModel) o; - return Objects.equals(this.appId, namespaceTextModel.appId) && - Objects.equals(this.env, namespaceTextModel.env) && - Objects.equals(this.clusterName, namespaceTextModel.clusterName) && - Objects.equals(this.namespaceName, namespaceTextModel.namespaceName) && - Objects.equals(this.namespaceId, namespaceTextModel.namespaceId) && - Objects.equals(this.format, namespaceTextModel.format) && - Objects.equals(this.configText, namespaceTextModel.configText) && - Objects.equals(this.operator, namespaceTextModel.operator); + OpenNamespaceTextModel openNamespaceTextModel = (OpenNamespaceTextModel) o; + return Objects.equals(this.appId, openNamespaceTextModel.appId) && + Objects.equals(this.env, openNamespaceTextModel.env) && + Objects.equals(this.clusterName, openNamespaceTextModel.clusterName) && + Objects.equals(this.namespaceName, openNamespaceTextModel.namespaceName) && + Objects.equals(this.namespaceId, openNamespaceTextModel.namespaceId) && + Objects.equals(this.format, openNamespaceTextModel.format) && + Objects.equals(this.configText, openNamespaceTextModel.configText) && + Objects.equals(this.operator, openNamespaceTextModel.operator); } @Override @@ -273,7 +283,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class NamespaceTextModel {\n"); + sb.append("class OpenNamespaceTextModel {\n"); sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); sb.append(" env: ").append(toIndentedString(env)).append("\n"); sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); @@ -303,33 +313,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("appId", "env", "clusterName", "namespaceName", "namespaceId", "format", "configText", "operator")); + openapiFields = new HashSet(); + openapiFields.add("appId"); + openapiFields.add("env"); + openapiFields.add("clusterName"); + openapiFields.add("namespaceName"); + openapiFields.add("namespaceId"); + openapiFields.add("format"); + openapiFields.add("configText"); + openapiFields.add("operator"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to NamespaceTextModel - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!NamespaceTextModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in NamespaceTextModel is not found in the empty JSON string", NamespaceTextModel.openapiRequiredFields.toString())); + 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 OpenNamespaceTextModel + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OpenNamespaceTextModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OpenNamespaceTextModel is not found in the empty JSON string", OpenNamespaceTextModel.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!NamespaceTextModel.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NamespaceTextModel` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + for (Entry entry : entries) { + if (!OpenNamespaceTextModel.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenNamespaceTextModel` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); } @@ -357,49 +374,48 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!NamespaceTextModel.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NamespaceTextModel' and its subtypes + if (!OpenNamespaceTextModel.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpenNamespaceTextModel' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(NamespaceTextModel.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpenNamespaceTextModel.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, NamespaceTextModel value) throws IOException { + public void write(JsonWriter out, OpenNamespaceTextModel value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public NamespaceTextModel read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + public OpenNamespaceTextModel read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); } } - /** - * Create an instance of NamespaceTextModel given an JSON string - * - * @param jsonString JSON string - * @return An instance of NamespaceTextModel - * @throws IOException if the JSON string is invalid with respect to NamespaceTextModel - */ - public static NamespaceTextModel fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NamespaceTextModel.class); + /** + * Create an instance of OpenNamespaceTextModel given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenNamespaceTextModel + * @throws IOException if the JSON string is invalid with respect to OpenNamespaceTextModel + */ + public static OpenNamespaceTextModel fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpenNamespaceTextModel.class); } - /** - * Convert an instance of NamespaceTextModel to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OpenNamespaceTextModel to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } } - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenOrganizationDto.java b/java-client/src/main/java/org/openapitools/client/model/OpenOrganizationDto.java index 5d94f349..13f5045d 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenOrganizationDto.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenOrganizationDto.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,13 +14,13 @@ package org.openapitools.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -37,10 +37,12 @@ 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; @@ -48,55 +50,57 @@ /** * OpenOrganizationDto */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") public class OpenOrganizationDto { public static final String SERIALIZED_NAME_ORG_ID = "orgId"; @SerializedName(SERIALIZED_NAME_ORG_ID) - @javax.annotation.Nullable private String orgId; public static final String SERIALIZED_NAME_ORG_NAME = "orgName"; @SerializedName(SERIALIZED_NAME_ORG_NAME) - @javax.annotation.Nullable private String orgName; public OpenOrganizationDto() { } - public OpenOrganizationDto orgId(@javax.annotation.Nullable String orgId) { + public OpenOrganizationDto orgId(String orgId) { + this.orgId = orgId; return this; } - /** - * + /** + * 组织ID * @return orgId - */ + **/ @javax.annotation.Nullable public String getOrgId() { return orgId; } - public void setOrgId(@javax.annotation.Nullable String orgId) { + + public void setOrgId(String orgId) { this.orgId = orgId; } - public OpenOrganizationDto orgName(@javax.annotation.Nullable String orgName) { + public OpenOrganizationDto orgName(String orgName) { + this.orgName = orgName; return this; } - /** - * + /** + * 组织名称 * @return orgName - */ + **/ @javax.annotation.Nullable public String getOrgName() { return orgName; } - public void setOrgName(@javax.annotation.Nullable String orgName) { + + public void setOrgName(String orgName) { this.orgName = orgName; } @@ -147,33 +151,34 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("orgId", "orgName")); + openapiFields = new HashSet(); + openapiFields.add("orgId"); + openapiFields.add("orgName"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenOrganizationDto - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenOrganizationDto.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + 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 OpenOrganizationDto + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OpenOrganizationDto.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in OpenOrganizationDto is not found in the empty JSON string", OpenOrganizationDto.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { + for (Entry entry : entries) { if (!OpenOrganizationDto.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenOrganizationDto` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenOrganizationDto` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("orgId") != null && !jsonObj.get("orgId").isJsonNull()) && !jsonObj.get("orgId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `orgId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orgId").toString())); } @@ -202,33 +207,32 @@ public void write(JsonWriter out, OpenOrganizationDto value) throws IOException @Override public OpenOrganizationDto read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); } } - /** - * Create an instance of OpenOrganizationDto given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenOrganizationDto - * @throws IOException if the JSON string is invalid with respect to OpenOrganizationDto - */ + /** + * Create an instance of OpenOrganizationDto given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenOrganizationDto + * @throws IOException if the JSON string is invalid with respect to OpenOrganizationDto + */ public static OpenOrganizationDto fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OpenOrganizationDto.class); } - /** - * Convert an instance of OpenOrganizationDto to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OpenOrganizationDto to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } } - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenPageDTOOpenInstanceDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenPageDTOOpenInstanceDTO.java index e93f5baf..da6e7dec 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenPageDTOOpenInstanceDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenPageDTOOpenInstanceDTO.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,6 +14,7 @@ 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; @@ -21,7 +22,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import org.openapitools.client.model.OpenInstanceDTO; @@ -40,10 +40,12 @@ 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; @@ -51,89 +53,92 @@ /** * 分页实例数据传输对象,用于返回分页查询的实例列表结果 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") public class OpenPageDTOOpenInstanceDTO { public static final String SERIALIZED_NAME_PAGE = "page"; @SerializedName(SERIALIZED_NAME_PAGE) - @javax.annotation.Nullable private Integer page; public static final String SERIALIZED_NAME_SIZE = "size"; @SerializedName(SERIALIZED_NAME_SIZE) - @javax.annotation.Nullable private Integer size; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) - @javax.annotation.Nullable private Long total; public static final String SERIALIZED_NAME_CONTENT = "content"; @SerializedName(SERIALIZED_NAME_CONTENT) - @javax.annotation.Nullable - private List content = new ArrayList<>(); + private List content; public OpenPageDTOOpenInstanceDTO() { } - public OpenPageDTOOpenInstanceDTO page(@javax.annotation.Nullable Integer page) { + public OpenPageDTOOpenInstanceDTO page(Integer page) { + this.page = page; return this; } - /** + /** * 当前页码,从0开始计数 * @return page - */ + **/ @javax.annotation.Nullable public Integer getPage() { return page; } - public void setPage(@javax.annotation.Nullable Integer page) { + + public void setPage(Integer page) { this.page = page; } - public OpenPageDTOOpenInstanceDTO size(@javax.annotation.Nullable Integer size) { + public OpenPageDTOOpenInstanceDTO size(Integer size) { + this.size = size; return this; } - /** + /** * 每页显示的记录数量 * @return size - */ + **/ @javax.annotation.Nullable public Integer getSize() { return size; } - public void setSize(@javax.annotation.Nullable Integer size) { + + public void setSize(Integer size) { this.size = size; } - public OpenPageDTOOpenInstanceDTO total(@javax.annotation.Nullable Long total) { + public OpenPageDTOOpenInstanceDTO total(Long total) { + this.total = total; return this; } - /** + /** * 总记录数,符合查询条件的实例总数量 * @return total - */ + **/ @javax.annotation.Nullable public Long getTotal() { return total; } - public void setTotal(@javax.annotation.Nullable Long total) { + + public void setTotal(Long total) { this.total = total; } - public OpenPageDTOOpenInstanceDTO content(@javax.annotation.Nullable List content) { + public OpenPageDTOOpenInstanceDTO content(List content) { + this.content = content; return this; } @@ -146,16 +151,17 @@ public OpenPageDTOOpenInstanceDTO addContentItem(OpenInstanceDTO contentItem) { return this; } - /** + /** * 当前页的实例列表,包含具体的实例数据 * @return content - */ + **/ @javax.annotation.Nullable public List getContent() { return content; } - public void setContent(@javax.annotation.Nullable List content) { + + public void setContent(List content) { this.content = content; } @@ -210,33 +216,36 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("page", "size", "total", "content")); + openapiFields = new HashSet(); + openapiFields.add("page"); + openapiFields.add("size"); + openapiFields.add("total"); + openapiFields.add("content"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenPageDTOOpenInstanceDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenPageDTOOpenInstanceDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + /** + * 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 + */ + 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())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { + 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(), jsonElement.toString())); + 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())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("content") != null && !jsonObj.get("content").isJsonNull()) { JsonArray jsonArraycontent = jsonObj.getAsJsonArray("content"); if (jsonArraycontent != null) { @@ -247,7 +256,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `content` (array) for (int i = 0; i < jsonArraycontent.size(); i++) { - OpenInstanceDTO.validateJsonElement(jsonArraycontent.get(i)); + OpenInstanceDTO.validateJsonObject(jsonArraycontent.get(i).getAsJsonObject()); }; } } @@ -273,33 +282,32 @@ public void write(JsonWriter out, OpenPageDTOOpenInstanceDTO value) throws IOExc @Override public OpenPageDTOOpenInstanceDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); } } - /** - * Create an instance of OpenPageDTOOpenInstanceDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenPageDTOOpenInstanceDTO - * @throws IOException if the JSON string is invalid with respect to OpenPageDTOOpenInstanceDTO - */ + /** + * Create an instance of OpenPageDTOOpenInstanceDTO given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenPageDTOOpenInstanceDTO + * @throws IOException if the JSON string is invalid with respect to OpenPageDTOOpenInstanceDTO + */ public static OpenPageDTOOpenInstanceDTO fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OpenPageDTOOpenInstanceDTO.class); } - /** - * Convert an instance of OpenPageDTOOpenInstanceDTO to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OpenPageDTOOpenInstanceDTO to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } } - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenPageDTOOpenItemDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenPageDTOOpenItemDTO.java index eb6727e0..12af823f 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenPageDTOOpenItemDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenPageDTOOpenItemDTO.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,6 +14,7 @@ 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; @@ -21,7 +22,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import org.openapitools.client.model.OpenItemDTO; @@ -40,10 +40,12 @@ 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; @@ -51,89 +53,92 @@ /** * 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") public class OpenPageDTOOpenItemDTO { public static final String SERIALIZED_NAME_PAGE = "page"; @SerializedName(SERIALIZED_NAME_PAGE) - @javax.annotation.Nullable private Integer page; public static final String SERIALIZED_NAME_SIZE = "size"; @SerializedName(SERIALIZED_NAME_SIZE) - @javax.annotation.Nullable private Integer size; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) - @javax.annotation.Nullable private Long total; public static final String SERIALIZED_NAME_CONTENT = "content"; @SerializedName(SERIALIZED_NAME_CONTENT) - @javax.annotation.Nullable - private List content = new ArrayList<>(); + private List content; public OpenPageDTOOpenItemDTO() { } - public OpenPageDTOOpenItemDTO page(@javax.annotation.Nullable Integer page) { + public OpenPageDTOOpenItemDTO page(Integer page) { + this.page = page; return this; } - /** + /** * 当前页码,从0开始计数 * @return page - */ + **/ @javax.annotation.Nullable public Integer getPage() { return page; } - public void setPage(@javax.annotation.Nullable Integer page) { + + public void setPage(Integer page) { this.page = page; } - public OpenPageDTOOpenItemDTO size(@javax.annotation.Nullable Integer size) { + public OpenPageDTOOpenItemDTO size(Integer size) { + this.size = size; return this; } - /** + /** * 每页显示的记录数量 * @return size - */ + **/ @javax.annotation.Nullable public Integer getSize() { return size; } - public void setSize(@javax.annotation.Nullable Integer size) { + + public void setSize(Integer size) { this.size = size; } - public OpenPageDTOOpenItemDTO total(@javax.annotation.Nullable Long total) { + public OpenPageDTOOpenItemDTO total(Long total) { + this.total = total; return this; } - /** + /** * 总记录数,符合查询条件的配置项总数量 * @return total - */ + **/ @javax.annotation.Nullable public Long getTotal() { return total; } - public void setTotal(@javax.annotation.Nullable Long total) { + + public void setTotal(Long total) { this.total = total; } - public OpenPageDTOOpenItemDTO content(@javax.annotation.Nullable List content) { + public OpenPageDTOOpenItemDTO content(List content) { + this.content = content; return this; } @@ -146,16 +151,17 @@ public OpenPageDTOOpenItemDTO addContentItem(OpenItemDTO contentItem) { return this; } - /** + /** * 当前页的配置项列表,包含具体的配置项数据 * @return content - */ + **/ @javax.annotation.Nullable public List getContent() { return content; } - public void setContent(@javax.annotation.Nullable List content) { + + public void setContent(List content) { this.content = content; } @@ -210,33 +216,36 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("page", "size", "total", "content")); + openapiFields = new HashSet(); + openapiFields.add("page"); + openapiFields.add("size"); + openapiFields.add("total"); + openapiFields.add("content"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenPageDTOOpenItemDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenPageDTOOpenItemDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + /** + * 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 + */ + 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())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { + 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(), jsonElement.toString())); + 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())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("content") != null && !jsonObj.get("content").isJsonNull()) { JsonArray jsonArraycontent = jsonObj.getAsJsonArray("content"); if (jsonArraycontent != null) { @@ -247,7 +256,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `content` (array) for (int i = 0; i < jsonArraycontent.size(); i++) { - OpenItemDTO.validateJsonElement(jsonArraycontent.get(i)); + OpenItemDTO.validateJsonObject(jsonArraycontent.get(i).getAsJsonObject()); }; } } @@ -273,33 +282,32 @@ public void write(JsonWriter out, OpenPageDTOOpenItemDTO value) throws IOExcepti @Override public OpenPageDTOOpenItemDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); } } - /** - * Create an instance of OpenPageDTOOpenItemDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenPageDTOOpenItemDTO - * @throws IOException if the JSON string is invalid with respect to OpenPageDTOOpenItemDTO - */ + /** + * Create an instance of OpenPageDTOOpenItemDTO given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenPageDTOOpenItemDTO + * @throws IOException if the JSON string is invalid with respect to OpenPageDTOOpenItemDTO + */ public static OpenPageDTOOpenItemDTO fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OpenPageDTOOpenItemDTO.class); } - /** - * Convert an instance of OpenPageDTOOpenItemDTO to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OpenPageDTOOpenItemDTO to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } } - diff --git a/java-client/src/main/java/org/openapitools/client/model/ListReleaseBO.java b/java-client/src/main/java/org/openapitools/client/model/OpenReleaseBO.java similarity index 55% rename from java-client/src/main/java/org/openapitools/client/model/ListReleaseBO.java rename to java-client/src/main/java/org/openapitools/client/model/OpenReleaseBO.java index 9234f38d..5fb0cdcc 100644 --- a/java-client/src/main/java/org/openapitools/client/model/ListReleaseBO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenReleaseBO.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,6 +14,7 @@ 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; @@ -21,10 +22,9 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import org.openapitools.client.model.KVEntity; -import org.openapitools.client.model.ReleaseDTO; +import org.openapitools.client.model.OpenReleaseDTO; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,57 +41,60 @@ 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; /** - * ListReleaseBO + * OpenReleaseBO */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class ListReleaseBO { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +public class OpenReleaseBO { public static final String SERIALIZED_NAME_BASE_INFO = "baseInfo"; @SerializedName(SERIALIZED_NAME_BASE_INFO) - @javax.annotation.Nullable - private ReleaseDTO baseInfo; + private OpenReleaseDTO baseInfo; public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) - @javax.annotation.Nullable - private List items = new ArrayList<>(); + private List items; - public ListReleaseBO() { + public OpenReleaseBO() { } - public ListReleaseBO baseInfo(@javax.annotation.Nullable ReleaseDTO baseInfo) { + public OpenReleaseBO baseInfo(OpenReleaseDTO baseInfo) { + this.baseInfo = baseInfo; return this; } - /** + /** * Get baseInfo * @return baseInfo - */ + **/ @javax.annotation.Nullable - public ReleaseDTO getBaseInfo() { + public OpenReleaseDTO getBaseInfo() { return baseInfo; } - public void setBaseInfo(@javax.annotation.Nullable ReleaseDTO baseInfo) { + + public void setBaseInfo(OpenReleaseDTO baseInfo) { this.baseInfo = baseInfo; } - public ListReleaseBO items(@javax.annotation.Nullable List items) { + public OpenReleaseBO items(List items) { + this.items = items; return this; } - public ListReleaseBO addItemsItem(KVEntity itemsItem) { + public OpenReleaseBO addItemsItem(KVEntity itemsItem) { if (this.items == null) { this.items = new ArrayList<>(); } @@ -99,16 +102,17 @@ public ListReleaseBO addItemsItem(KVEntity itemsItem) { return this; } - /** - * + /** + * Get items * @return items - */ + **/ @javax.annotation.Nullable public List getItems() { return items; } - public void setItems(@javax.annotation.Nullable List items) { + + public void setItems(List items) { this.items = items; } @@ -122,9 +126,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ListReleaseBO listReleaseBO = (ListReleaseBO) o; - return Objects.equals(this.baseInfo, listReleaseBO.baseInfo) && - Objects.equals(this.items, listReleaseBO.items); + OpenReleaseBO openReleaseBO = (OpenReleaseBO) o; + return Objects.equals(this.baseInfo, openReleaseBO.baseInfo) && + Objects.equals(this.items, openReleaseBO.items); } @Override @@ -135,7 +139,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ListReleaseBO {\n"); + sb.append("class OpenReleaseBO {\n"); sb.append(" baseInfo: ").append(toIndentedString(baseInfo)).append("\n"); sb.append(" items: ").append(toIndentedString(items)).append("\n"); sb.append("}"); @@ -159,36 +163,37 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("baseInfo", "items")); + openapiFields = new HashSet(); + openapiFields.add("baseInfo"); + openapiFields.add("items"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ListReleaseBO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ListReleaseBO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ListReleaseBO is not found in the empty JSON string", ListReleaseBO.openapiRequiredFields.toString())); + /** + * 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 OpenReleaseBO + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OpenReleaseBO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OpenReleaseBO is not found in the empty JSON string", OpenReleaseBO.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ListReleaseBO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ListReleaseBO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + for (Entry entry : entries) { + if (!OpenReleaseBO.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenReleaseBO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `baseInfo` if (jsonObj.get("baseInfo") != null && !jsonObj.get("baseInfo").isJsonNull()) { - ReleaseDTO.validateJsonElement(jsonObj.get("baseInfo")); + OpenReleaseDTO.validateJsonObject(jsonObj.getAsJsonObject("baseInfo")); } if (jsonObj.get("items") != null && !jsonObj.get("items").isJsonNull()) { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); @@ -200,7 +205,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - KVEntity.validateJsonElement(jsonArrayitems.get(i)); + KVEntity.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); }; } } @@ -210,49 +215,48 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ListReleaseBO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ListReleaseBO' and its subtypes + if (!OpenReleaseBO.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpenReleaseBO' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ListReleaseBO.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpenReleaseBO.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ListReleaseBO value) throws IOException { + public void write(JsonWriter out, OpenReleaseBO value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public ListReleaseBO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + public OpenReleaseBO read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); } } - /** - * Create an instance of ListReleaseBO given an JSON string - * - * @param jsonString JSON string - * @return An instance of ListReleaseBO - * @throws IOException if the JSON string is invalid with respect to ListReleaseBO - */ - public static ListReleaseBO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ListReleaseBO.class); + /** + * Create an instance of OpenReleaseBO given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenReleaseBO + * @throws IOException if the JSON string is invalid with respect to OpenReleaseBO + */ + public static OpenReleaseBO fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpenReleaseBO.class); } - /** - * Convert an instance of ListReleaseBO to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OpenReleaseBO to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } } - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenReleaseDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenReleaseDTO.java index dde47d82..7363f4c9 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenReleaseDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenReleaseDTO.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,14 +14,15 @@ package org.openapitools.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.MapString; +import java.util.HashMap; +import java.util.Map; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -38,10 +39,12 @@ 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; @@ -49,271 +52,290 @@ /** * Apollo发布信息数据传输对象,表示一次配置发布的完整信息 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") public class OpenReleaseDTO { public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - @javax.annotation.Nullable private String dataChangeCreatedBy; public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - @javax.annotation.Nullable private String dataChangeLastModifiedBy; public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - @javax.annotation.Nullable private String dataChangeCreatedTime; public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - @javax.annotation.Nullable private String dataChangeLastModifiedTime; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nullable private Long id; public static final String SERIALIZED_NAME_APP_ID = "appId"; @SerializedName(SERIALIZED_NAME_APP_ID) - @javax.annotation.Nullable private String appId; public static final String SERIALIZED_NAME_CLUSTER_NAME = "clusterName"; @SerializedName(SERIALIZED_NAME_CLUSTER_NAME) - @javax.annotation.Nullable private String clusterName; public static final String SERIALIZED_NAME_NAMESPACE_NAME = "namespaceName"; @SerializedName(SERIALIZED_NAME_NAMESPACE_NAME) - @javax.annotation.Nullable private String namespaceName; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_CONFIGURATIONS = "configurations"; @SerializedName(SERIALIZED_NAME_CONFIGURATIONS) - @javax.annotation.Nullable - private MapString configurations; + private Map configurations = new HashMap<>(); public static final String SERIALIZED_NAME_COMMENT = "comment"; @SerializedName(SERIALIZED_NAME_COMMENT) - @javax.annotation.Nullable private String comment; public OpenReleaseDTO() { } - public OpenReleaseDTO dataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { + public OpenReleaseDTO dataChangeCreatedBy(String dataChangeCreatedBy) { + this.dataChangeCreatedBy = dataChangeCreatedBy; return this; } - /** + /** * 发布创建者用户名,记录是谁创建了这次发布 * @return dataChangeCreatedBy - */ + **/ @javax.annotation.Nullable public String getDataChangeCreatedBy() { return dataChangeCreatedBy; } - public void setDataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { + + public void setDataChangeCreatedBy(String dataChangeCreatedBy) { this.dataChangeCreatedBy = dataChangeCreatedBy; } - public OpenReleaseDTO dataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { + public OpenReleaseDTO dataChangeLastModifiedBy(String dataChangeLastModifiedBy) { + this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; return this; } - /** + /** * 发布最后修改者用户名,记录最后一次修改发布信息的用户 * @return dataChangeLastModifiedBy - */ + **/ @javax.annotation.Nullable public String getDataChangeLastModifiedBy() { return dataChangeLastModifiedBy; } - public void setDataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { + + public void setDataChangeLastModifiedBy(String dataChangeLastModifiedBy) { this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; } - public OpenReleaseDTO dataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { + public OpenReleaseDTO dataChangeCreatedTime(String dataChangeCreatedTime) { + this.dataChangeCreatedTime = dataChangeCreatedTime; return this; } - /** + /** * 发布创建时间,ISO 8601格式的时间戳 * @return dataChangeCreatedTime - */ + **/ @javax.annotation.Nullable public String getDataChangeCreatedTime() { return dataChangeCreatedTime; } - public void setDataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { + + public void setDataChangeCreatedTime(String dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; } - public OpenReleaseDTO dataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { + public OpenReleaseDTO dataChangeLastModifiedTime(String dataChangeLastModifiedTime) { + this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; return this; } - /** + /** * 发布最后修改时间,ISO 8601格式的时间戳 * @return dataChangeLastModifiedTime - */ + **/ @javax.annotation.Nullable public String getDataChangeLastModifiedTime() { return dataChangeLastModifiedTime; } - public void setDataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { + + public void setDataChangeLastModifiedTime(String dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; } - public OpenReleaseDTO id(@javax.annotation.Nullable Long id) { + public OpenReleaseDTO id(Long id) { + this.id = id; return this; } - /** + /** * 发布记录的唯一标识符,系统自动生成 * @return id - */ + **/ @javax.annotation.Nullable public Long getId() { return id; } - public void setId(@javax.annotation.Nullable Long id) { + + public void setId(Long id) { this.id = id; } - public OpenReleaseDTO appId(@javax.annotation.Nullable String appId) { + public OpenReleaseDTO appId(String appId) { + this.appId = appId; return this; } - /** + /** * 所属应用的唯一标识符 * @return appId - */ + **/ @javax.annotation.Nullable public String getAppId() { return appId; } - public void setAppId(@javax.annotation.Nullable String appId) { + + public void setAppId(String appId) { this.appId = appId; } - public OpenReleaseDTO clusterName(@javax.annotation.Nullable String clusterName) { + public OpenReleaseDTO clusterName(String clusterName) { + this.clusterName = clusterName; return this; } - /** + /** * 所属集群的名称 * @return clusterName - */ + **/ @javax.annotation.Nullable public String getClusterName() { return clusterName; } - public void setClusterName(@javax.annotation.Nullable String clusterName) { + + public void setClusterName(String clusterName) { this.clusterName = clusterName; } - public OpenReleaseDTO namespaceName(@javax.annotation.Nullable String namespaceName) { + public OpenReleaseDTO namespaceName(String namespaceName) { + this.namespaceName = namespaceName; return this; } - /** + /** * 所属命名空间的名称 * @return namespaceName - */ + **/ @javax.annotation.Nullable public String getNamespaceName() { return namespaceName; } - public void setNamespaceName(@javax.annotation.Nullable String namespaceName) { + + public void setNamespaceName(String namespaceName) { this.namespaceName = namespaceName; } - public OpenReleaseDTO name(@javax.annotation.Nullable String name) { + public OpenReleaseDTO name(String name) { + this.name = name; return this; } - /** + /** * 发布名称,用于标识这次发布的版本或描述 * @return name - */ + **/ @javax.annotation.Nullable public String getName() { return name; } - public void setName(@javax.annotation.Nullable String name) { + + public void setName(String name) { this.name = name; } - public OpenReleaseDTO configurations(@javax.annotation.Nullable MapString configurations) { + public OpenReleaseDTO configurations(Map configurations) { + this.configurations = configurations; return this; } - /** + public OpenReleaseDTO putConfigurationsItem(String key, String configurationsItem) { + if (this.configurations == null) { + this.configurations = new HashMap<>(); + } + this.configurations.put(key, configurationsItem); + return this; + } + + /** * Get configurations * @return configurations - */ + **/ @javax.annotation.Nullable - public MapString getConfigurations() { + public Map getConfigurations() { return configurations; } - public void setConfigurations(@javax.annotation.Nullable MapString configurations) { + + public void setConfigurations(Map configurations) { this.configurations = configurations; } - public OpenReleaseDTO comment(@javax.annotation.Nullable String comment) { + public OpenReleaseDTO comment(String comment) { + this.comment = comment; return this; } - /** + /** * 发布备注,描述本次发布的变更内容和目的 * @return comment - */ + **/ @javax.annotation.Nullable public String getComment() { return comment; } - public void setComment(@javax.annotation.Nullable String comment) { + + public void setComment(String comment) { this.comment = comment; } @@ -382,33 +404,43 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "id", "appId", "clusterName", "namespaceName", "name", "configurations", "comment")); + openapiFields = new HashSet(); + openapiFields.add("dataChangeCreatedBy"); + openapiFields.add("dataChangeLastModifiedBy"); + openapiFields.add("dataChangeCreatedTime"); + openapiFields.add("dataChangeLastModifiedTime"); + openapiFields.add("id"); + openapiFields.add("appId"); + openapiFields.add("clusterName"); + openapiFields.add("namespaceName"); + openapiFields.add("name"); + openapiFields.add("configurations"); + openapiFields.add("comment"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenReleaseDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenReleaseDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + 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 OpenReleaseDTO + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OpenReleaseDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in OpenReleaseDTO is not found in the empty JSON string", OpenReleaseDTO.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { + for (Entry entry : entries) { if (!OpenReleaseDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenReleaseDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenReleaseDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("dataChangeCreatedBy") != null && !jsonObj.get("dataChangeCreatedBy").isJsonNull()) && !jsonObj.get("dataChangeCreatedBy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedBy").toString())); } @@ -433,10 +465,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - // validate the optional field `configurations` - if (jsonObj.get("configurations") != null && !jsonObj.get("configurations").isJsonNull()) { - MapString.validateJsonElement(jsonObj.get("configurations")); - } if ((jsonObj.get("comment") != null && !jsonObj.get("comment").isJsonNull()) && !jsonObj.get("comment").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `comment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comment").toString())); } @@ -462,33 +490,32 @@ public void write(JsonWriter out, OpenReleaseDTO value) throws IOException { @Override public OpenReleaseDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); } } - /** - * Create an instance of OpenReleaseDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenReleaseDTO - * @throws IOException if the JSON string is invalid with respect to OpenReleaseDTO - */ + /** + * Create an instance of OpenReleaseDTO given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenReleaseDTO + * @throws IOException if the JSON string is invalid with respect to OpenReleaseDTO + */ public static OpenReleaseDTO fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OpenReleaseDTO.class); } - /** - * Convert an instance of OpenReleaseDTO to an JSON string - * - * @return JSON string - */ + /** + * Convert an instance of OpenReleaseDTO to an JSON string + * + * @return JSON string + */ public String toJson() { return JSON.getGson().toJson(this); } } - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenapiV1AppsGet401Response.java b/java-client/src/main/java/org/openapitools/client/model/OpenapiV1AppsGet401Response.java deleted file mode 100644 index c27c3a66..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenapiV1AppsGet401Response.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * OpenapiV1AppsGet401Response - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenapiV1AppsGet401Response { - public static final String SERIALIZED_NAME_MESSAGE = "message"; - @SerializedName(SERIALIZED_NAME_MESSAGE) - @javax.annotation.Nullable - private String message; - - public OpenapiV1AppsGet401Response() { - } - - public OpenapiV1AppsGet401Response message(@javax.annotation.Nullable String message) { - this.message = message; - return this; - } - - /** - * Get message - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - public void setMessage(@javax.annotation.Nullable String message) { - this.message = message; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenapiV1AppsGet401Response openapiV1AppsGet401Response = (OpenapiV1AppsGet401Response) o; - return Objects.equals(this.message, openapiV1AppsGet401Response.message); - } - - @Override - public int hashCode() { - return Objects.hash(message); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenapiV1AppsGet401Response {\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("message")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenapiV1AppsGet401Response - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenapiV1AppsGet401Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenapiV1AppsGet401Response is not found in the empty JSON string", OpenapiV1AppsGet401Response.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenapiV1AppsGet401Response.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenapiV1AppsGet401Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenapiV1AppsGet401Response.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenapiV1AppsGet401Response' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenapiV1AppsGet401Response.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenapiV1AppsGet401Response value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenapiV1AppsGet401Response read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenapiV1AppsGet401Response given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenapiV1AppsGet401Response - * @throws IOException if the JSON string is invalid with respect to OpenapiV1AppsGet401Response - */ - public static OpenapiV1AppsGet401Response fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenapiV1AppsGet401Response.class); - } - - /** - * Convert an instance of OpenapiV1AppsGet401Response to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenapiV1AppsPost400Response.java b/java-client/src/main/java/org/openapitools/client/model/OpenapiV1AppsPost400Response.java deleted file mode 100644 index d72b86f6..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenapiV1AppsPost400Response.java +++ /dev/null @@ -1,234 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * OpenapiV1AppsPost400Response - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenapiV1AppsPost400Response { - public static final String SERIALIZED_NAME_MESSAGE = "message"; - @SerializedName(SERIALIZED_NAME_MESSAGE) - @javax.annotation.Nullable - private String message; - - public static final String SERIALIZED_NAME_EXCEPTION = "exception"; - @SerializedName(SERIALIZED_NAME_EXCEPTION) - @javax.annotation.Nullable - private String exception; - - public OpenapiV1AppsPost400Response() { - } - - public OpenapiV1AppsPost400Response message(@javax.annotation.Nullable String message) { - this.message = message; - return this; - } - - /** - * Get message - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - public void setMessage(@javax.annotation.Nullable String message) { - this.message = message; - } - - - public OpenapiV1AppsPost400Response exception(@javax.annotation.Nullable String exception) { - this.exception = exception; - return this; - } - - /** - * Get exception - * @return exception - */ - @javax.annotation.Nullable - public String getException() { - return exception; - } - - public void setException(@javax.annotation.Nullable String exception) { - this.exception = exception; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenapiV1AppsPost400Response openapiV1AppsPost400Response = (OpenapiV1AppsPost400Response) o; - return Objects.equals(this.message, openapiV1AppsPost400Response.message) && - Objects.equals(this.exception, openapiV1AppsPost400Response.exception); - } - - @Override - public int hashCode() { - return Objects.hash(message, exception); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenapiV1AppsPost400Response {\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" exception: ").append(toIndentedString(exception)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("message", "exception")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenapiV1AppsPost400Response - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenapiV1AppsPost400Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenapiV1AppsPost400Response is not found in the empty JSON string", OpenapiV1AppsPost400Response.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenapiV1AppsPost400Response.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenapiV1AppsPost400Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); - } - if ((jsonObj.get("exception") != null && !jsonObj.get("exception").isJsonNull()) && !jsonObj.get("exception").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `exception` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exception").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenapiV1AppsPost400Response.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenapiV1AppsPost400Response' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenapiV1AppsPost400Response.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenapiV1AppsPost400Response value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenapiV1AppsPost400Response read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenapiV1AppsPost400Response given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenapiV1AppsPost400Response - * @throws IOException if the JSON string is invalid with respect to OpenapiV1AppsPost400Response - */ - public static OpenapiV1AppsPost400Response fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenapiV1AppsPost400Response.class); - } - - /** - * Convert an instance of OpenapiV1AppsPost400Response to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenapiV1AppsPostRequest.java b/java-client/src/main/java/org/openapitools/client/model/OpenapiV1AppsPostRequest.java deleted file mode 100644 index a7629a61..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenapiV1AppsPostRequest.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.OpenAppDTO; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenapiV1AppsPostRequest { - public static final String SERIALIZED_NAME_APP = "app"; - @SerializedName(SERIALIZED_NAME_APP) - @javax.annotation.Nonnull - private OpenAppDTO app; - - public static final String SERIALIZED_NAME_ASSIGN_APP_ROLE_TO_SELF = "assignAppRoleToSelf"; - @SerializedName(SERIALIZED_NAME_ASSIGN_APP_ROLE_TO_SELF) - @javax.annotation.Nonnull - private Boolean assignAppRoleToSelf; - - public static final String SERIALIZED_NAME_ADMINS = "admins"; - @SerializedName(SERIALIZED_NAME_ADMINS) - @javax.annotation.Nonnull - private List admins = new ArrayList<>(); - - public OpenapiV1AppsPostRequest() { - } - - public OpenapiV1AppsPostRequest app(@javax.annotation.Nonnull OpenAppDTO app) { - this.app = app; - return this; - } - - /** - * Get app - * @return app - */ - @javax.annotation.Nonnull - public OpenAppDTO getApp() { - return app; - } - - public void setApp(@javax.annotation.Nonnull OpenAppDTO app) { - this.app = app; - } - - - public OpenapiV1AppsPostRequest assignAppRoleToSelf(@javax.annotation.Nonnull Boolean assignAppRoleToSelf) { - this.assignAppRoleToSelf = assignAppRoleToSelf; - return this; - } - - /** - * 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 - * @return assignAppRoleToSelf - */ - @javax.annotation.Nonnull - public Boolean getAssignAppRoleToSelf() { - return assignAppRoleToSelf; - } - - public void setAssignAppRoleToSelf(@javax.annotation.Nonnull Boolean assignAppRoleToSelf) { - this.assignAppRoleToSelf = assignAppRoleToSelf; - } - - - public OpenapiV1AppsPostRequest admins(@javax.annotation.Nonnull List admins) { - this.admins = admins; - return this; - } - - public OpenapiV1AppsPostRequest addAdminsItem(String adminsItem) { - if (this.admins == null) { - this.admins = new ArrayList<>(); - } - this.admins.add(adminsItem); - return this; - } - - /** - * 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 - * @return admins - */ - @javax.annotation.Nonnull - public List getAdmins() { - return admins; - } - - public void setAdmins(@javax.annotation.Nonnull List admins) { - this.admins = admins; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenapiV1AppsPostRequest openapiV1AppsPostRequest = (OpenapiV1AppsPostRequest) o; - return Objects.equals(this.app, openapiV1AppsPostRequest.app) && - Objects.equals(this.assignAppRoleToSelf, openapiV1AppsPostRequest.assignAppRoleToSelf) && - Objects.equals(this.admins, openapiV1AppsPostRequest.admins); - } - - @Override - public int hashCode() { - return Objects.hash(app, assignAppRoleToSelf, admins); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenapiV1AppsPostRequest {\n"); - sb.append(" app: ").append(toIndentedString(app)).append("\n"); - sb.append(" assignAppRoleToSelf: ").append(toIndentedString(assignAppRoleToSelf)).append("\n"); - sb.append(" admins: ").append(toIndentedString(admins)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("assignAppRoleToSelf", "admins", "app")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("app", "assignAppRoleToSelf", "admins")); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenapiV1AppsPostRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenapiV1AppsPostRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenapiV1AppsPostRequest is not found in the empty JSON string", OpenapiV1AppsPostRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenapiV1AppsPostRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenapiV1AppsPostRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : OpenapiV1AppsPostRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `app` - OpenAppDTO.validateJsonElement(jsonObj.get("app")); - // ensure the required json array is present - if (jsonObj.get("admins") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("admins").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `admins` to be an array in the JSON string but got `%s`", jsonObj.get("admins").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenapiV1AppsPostRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenapiV1AppsPostRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenapiV1AppsPostRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenapiV1AppsPostRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenapiV1AppsPostRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenapiV1AppsPostRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenapiV1AppsPostRequest - * @throws IOException if the JSON string is invalid with respect to OpenapiV1AppsPostRequest - */ - public static OpenapiV1AppsPostRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenapiV1AppsPostRequest.class); - } - - /** - * Convert an instance of OpenapiV1AppsPostRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.java b/java-client/src/main/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.java deleted file mode 100644 index 0eb22677..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.java +++ /dev/null @@ -1,231 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response { - public static final String SERIALIZED_NAME_VALID = "valid"; - @SerializedName(SERIALIZED_NAME_VALID) - @javax.annotation.Nullable - private Boolean valid; - - public static final String SERIALIZED_NAME_MESSAGE = "message"; - @SerializedName(SERIALIZED_NAME_MESSAGE) - @javax.annotation.Nullable - private String message; - - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response() { - } - - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response valid(@javax.annotation.Nullable Boolean valid) { - this.valid = valid; - return this; - } - - /** - * Get valid - * @return valid - */ - @javax.annotation.Nullable - public Boolean getValid() { - return valid; - } - - public void setValid(@javax.annotation.Nullable Boolean valid) { - this.valid = valid; - } - - - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response message(@javax.annotation.Nullable String message) { - this.message = message; - return this; - } - - /** - * Get message - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - public void setMessage(@javax.annotation.Nullable String message) { - this.message = message; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response = (OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response) o; - return Objects.equals(this.valid, openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.valid) && - Objects.equals(this.message, openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.message); - } - - @Override - public int hashCode() { - return Objects.hash(valid, message); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response {\n"); - sb.append(" valid: ").append(toIndentedString(valid)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("valid", "message")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response is not found in the empty JSON string", OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - * @throws IOException if the JSON string is invalid with respect to OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - */ - public static OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.class); - } - - /** - * Convert an instance of OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.java b/java-client/src/main/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.java deleted file mode 100644 index da196bc5..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.java +++ /dev/null @@ -1,271 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response { - public static final String SERIALIZED_NAME_VALID = "valid"; - @SerializedName(SERIALIZED_NAME_VALID) - @javax.annotation.Nullable - private Boolean valid; - - public static final String SERIALIZED_NAME_MESSAGE = "message"; - @SerializedName(SERIALIZED_NAME_MESSAGE) - @javax.annotation.Nullable - private String message; - - public static final String SERIALIZED_NAME_ERRORS = "errors"; - @SerializedName(SERIALIZED_NAME_ERRORS) - @javax.annotation.Nullable - private List errors = new ArrayList<>(); - - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response() { - } - - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response valid(@javax.annotation.Nullable Boolean valid) { - this.valid = valid; - return this; - } - - /** - * Get valid - * @return valid - */ - @javax.annotation.Nullable - public Boolean getValid() { - return valid; - } - - public void setValid(@javax.annotation.Nullable Boolean valid) { - this.valid = valid; - } - - - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response message(@javax.annotation.Nullable String message) { - this.message = message; - return this; - } - - /** - * Get message - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - public void setMessage(@javax.annotation.Nullable String message) { - this.message = message; - } - - - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response errors(@javax.annotation.Nullable List errors) { - this.errors = errors; - return this; - } - - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response addErrorsItem(String errorsItem) { - if (this.errors == null) { - this.errors = new ArrayList<>(); - } - this.errors.add(errorsItem); - return this; - } - - /** - * Get errors - * @return errors - */ - @javax.annotation.Nullable - public List getErrors() { - return errors; - } - - public void setErrors(@javax.annotation.Nullable List errors) { - this.errors = errors; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response = (OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response) o; - return Objects.equals(this.valid, openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.valid) && - Objects.equals(this.message, openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.message) && - Objects.equals(this.errors, openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.errors); - } - - @Override - public int hashCode() { - return Objects.hash(valid, message, errors); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response {\n"); - sb.append(" valid: ").append(toIndentedString(valid)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("valid", "message", "errors")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response is not found in the empty JSON string", OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull() && !jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - * @throws IOException if the JSON string is invalid with respect to OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - */ - public static OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.class); - } - - /** - * Convert an instance of OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenapiV1EnvsEnvReleasesCompareGet200Response.java b/java-client/src/main/java/org/openapitools/client/model/OpenapiV1EnvsEnvReleasesCompareGet200Response.java deleted file mode 100644 index 7b4171e8..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenapiV1EnvsEnvReleasesCompareGet200Response.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Change; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * OpenapiV1EnvsEnvReleasesCompareGet200Response - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenapiV1EnvsEnvReleasesCompareGet200Response { - public static final String SERIALIZED_NAME_CHANGES = "changes"; - @SerializedName(SERIALIZED_NAME_CHANGES) - @javax.annotation.Nullable - private List changes = new ArrayList<>(); - - public OpenapiV1EnvsEnvReleasesCompareGet200Response() { - } - - public OpenapiV1EnvsEnvReleasesCompareGet200Response changes(@javax.annotation.Nullable List changes) { - this.changes = changes; - return this; - } - - public OpenapiV1EnvsEnvReleasesCompareGet200Response addChangesItem(Change changesItem) { - if (this.changes == null) { - this.changes = new ArrayList<>(); - } - this.changes.add(changesItem); - return this; - } - - /** - * Get changes - * @return changes - */ - @javax.annotation.Nullable - public List getChanges() { - return changes; - } - - public void setChanges(@javax.annotation.Nullable List changes) { - this.changes = changes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenapiV1EnvsEnvReleasesCompareGet200Response openapiV1EnvsEnvReleasesCompareGet200Response = (OpenapiV1EnvsEnvReleasesCompareGet200Response) o; - return Objects.equals(this.changes, openapiV1EnvsEnvReleasesCompareGet200Response.changes); - } - - @Override - public int hashCode() { - return Objects.hash(changes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenapiV1EnvsEnvReleasesCompareGet200Response {\n"); - sb.append(" changes: ").append(toIndentedString(changes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("changes")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenapiV1EnvsEnvReleasesCompareGet200Response - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenapiV1EnvsEnvReleasesCompareGet200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenapiV1EnvsEnvReleasesCompareGet200Response is not found in the empty JSON string", OpenapiV1EnvsEnvReleasesCompareGet200Response.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenapiV1EnvsEnvReleasesCompareGet200Response.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenapiV1EnvsEnvReleasesCompareGet200Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("changes") != null && !jsonObj.get("changes").isJsonNull()) { - JsonArray jsonArraychanges = jsonObj.getAsJsonArray("changes"); - if (jsonArraychanges != null) { - // ensure the json data is an array - if (!jsonObj.get("changes").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `changes` to be an array in the JSON string but got `%s`", jsonObj.get("changes").toString())); - } - - // validate the optional field `changes` (array) - for (int i = 0; i < jsonArraychanges.size(); i++) { - Change.validateJsonElement(jsonArraychanges.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenapiV1EnvsEnvReleasesCompareGet200Response.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenapiV1EnvsEnvReleasesCompareGet200Response' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenapiV1EnvsEnvReleasesCompareGet200Response.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenapiV1EnvsEnvReleasesCompareGet200Response value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenapiV1EnvsEnvReleasesCompareGet200Response read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenapiV1EnvsEnvReleasesCompareGet200Response given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenapiV1EnvsEnvReleasesCompareGet200Response - * @throws IOException if the JSON string is invalid with respect to OpenapiV1EnvsEnvReleasesCompareGet200Response - */ - public static OpenapiV1EnvsEnvReleasesCompareGet200Response fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenapiV1EnvsEnvReleasesCompareGet200Response.class); - } - - /** - * Convert an instance of OpenapiV1EnvsEnvReleasesCompareGet200Response to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/ReleaseDTO.java b/java-client/src/main/java/org/openapitools/client/model/ReleaseDTO.java deleted file mode 100644 index 72401032..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/ReleaseDTO.java +++ /dev/null @@ -1,605 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReleaseDTO - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class ReleaseDTO { - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - @javax.annotation.Nullable - private String dataChangeCreatedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - @javax.annotation.Nullable - private String dataChangeLastModifiedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME = "dataChangeCreatedByDisplayName"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME) - @javax.annotation.Nullable - private String dataChangeCreatedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME = "dataChangeLastModifiedByDisplayName"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME) - @javax.annotation.Nullable - private String dataChangeLastModifiedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - @javax.annotation.Nullable - private String dataChangeCreatedTime; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - @javax.annotation.Nullable - private String dataChangeLastModifiedTime; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nullable - private Long id; - - public static final String SERIALIZED_NAME_RELEASE_KEY = "releaseKey"; - @SerializedName(SERIALIZED_NAME_RELEASE_KEY) - @javax.annotation.Nullable - private String releaseKey; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable - private String name; - - public static final String SERIALIZED_NAME_APP_ID = "appId"; - @SerializedName(SERIALIZED_NAME_APP_ID) - @javax.annotation.Nullable - private String appId; - - public static final String SERIALIZED_NAME_CLUSTER_NAME = "clusterName"; - @SerializedName(SERIALIZED_NAME_CLUSTER_NAME) - @javax.annotation.Nullable - private String clusterName; - - public static final String SERIALIZED_NAME_NAMESPACE_NAME = "namespaceName"; - @SerializedName(SERIALIZED_NAME_NAMESPACE_NAME) - @javax.annotation.Nullable - private String namespaceName; - - public static final String SERIALIZED_NAME_CONFIGURATIONS = "configurations"; - @SerializedName(SERIALIZED_NAME_CONFIGURATIONS) - @javax.annotation.Nullable - private String configurations; - - public static final String SERIALIZED_NAME_COMMENT = "comment"; - @SerializedName(SERIALIZED_NAME_COMMENT) - @javax.annotation.Nullable - private String comment; - - public static final String SERIALIZED_NAME_IS_ABANDONED = "isAbandoned"; - @SerializedName(SERIALIZED_NAME_IS_ABANDONED) - @javax.annotation.Nullable - private Boolean isAbandoned; - - public ReleaseDTO() { - } - - public ReleaseDTO dataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * - * @return dataChangeCreatedBy - */ - @javax.annotation.Nullable - public String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - public void setDataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - - public ReleaseDTO dataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * - * @return dataChangeLastModifiedBy - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - public void setDataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - - public ReleaseDTO dataChangeCreatedByDisplayName(@javax.annotation.Nullable String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - return this; - } - - /** - * - * @return dataChangeCreatedByDisplayName - */ - @javax.annotation.Nullable - public String getDataChangeCreatedByDisplayName() { - return dataChangeCreatedByDisplayName; - } - - public void setDataChangeCreatedByDisplayName(@javax.annotation.Nullable String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - } - - - public ReleaseDTO dataChangeLastModifiedByDisplayName(@javax.annotation.Nullable String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - return this; - } - - /** - * - * @return dataChangeLastModifiedByDisplayName - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedByDisplayName() { - return dataChangeLastModifiedByDisplayName; - } - - public void setDataChangeLastModifiedByDisplayName(@javax.annotation.Nullable String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - } - - - public ReleaseDTO dataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - return this; - } - - /** - * - * @return dataChangeCreatedTime - */ - @javax.annotation.Nullable - public String getDataChangeCreatedTime() { - return dataChangeCreatedTime; - } - - public void setDataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - - public ReleaseDTO dataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - return this; - } - - /** - * - * @return dataChangeLastModifiedTime - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedTime() { - return dataChangeLastModifiedTime; - } - - public void setDataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - - public ReleaseDTO id(@javax.annotation.Nullable Long id) { - this.id = id; - return this; - } - - /** - * - * @return id - */ - @javax.annotation.Nullable - public Long getId() { - return id; - } - - public void setId(@javax.annotation.Nullable Long id) { - this.id = id; - } - - - public ReleaseDTO releaseKey(@javax.annotation.Nullable String releaseKey) { - this.releaseKey = releaseKey; - return this; - } - - /** - * - * @return releaseKey - */ - @javax.annotation.Nullable - public String getReleaseKey() { - return releaseKey; - } - - public void setReleaseKey(@javax.annotation.Nullable String releaseKey) { - this.releaseKey = releaseKey; - } - - - public ReleaseDTO name(@javax.annotation.Nullable String name) { - this.name = name; - return this; - } - - /** - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nullable String name) { - this.name = name; - } - - - public ReleaseDTO appId(@javax.annotation.Nullable String appId) { - this.appId = appId; - return this; - } - - /** - * - * @return appId - */ - @javax.annotation.Nullable - public String getAppId() { - return appId; - } - - public void setAppId(@javax.annotation.Nullable String appId) { - this.appId = appId; - } - - - public ReleaseDTO clusterName(@javax.annotation.Nullable String clusterName) { - this.clusterName = clusterName; - return this; - } - - /** - * - * @return clusterName - */ - @javax.annotation.Nullable - public String getClusterName() { - return clusterName; - } - - public void setClusterName(@javax.annotation.Nullable String clusterName) { - this.clusterName = clusterName; - } - - - public ReleaseDTO namespaceName(@javax.annotation.Nullable String namespaceName) { - this.namespaceName = namespaceName; - return this; - } - - /** - * - * @return namespaceName - */ - @javax.annotation.Nullable - public String getNamespaceName() { - return namespaceName; - } - - public void setNamespaceName(@javax.annotation.Nullable String namespaceName) { - this.namespaceName = namespaceName; - } - - - public ReleaseDTO configurations(@javax.annotation.Nullable String configurations) { - this.configurations = configurations; - return this; - } - - /** - * - * @return configurations - */ - @javax.annotation.Nullable - public String getConfigurations() { - return configurations; - } - - public void setConfigurations(@javax.annotation.Nullable String configurations) { - this.configurations = configurations; - } - - - public ReleaseDTO comment(@javax.annotation.Nullable String comment) { - this.comment = comment; - return this; - } - - /** - * - * @return comment - */ - @javax.annotation.Nullable - public String getComment() { - return comment; - } - - public void setComment(@javax.annotation.Nullable String comment) { - this.comment = comment; - } - - - public ReleaseDTO isAbandoned(@javax.annotation.Nullable Boolean isAbandoned) { - this.isAbandoned = isAbandoned; - return this; - } - - /** - * - * @return isAbandoned - */ - @javax.annotation.Nullable - public Boolean getIsAbandoned() { - return isAbandoned; - } - - public void setIsAbandoned(@javax.annotation.Nullable Boolean isAbandoned) { - this.isAbandoned = isAbandoned; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReleaseDTO releaseDTO = (ReleaseDTO) o; - return Objects.equals(this.dataChangeCreatedBy, releaseDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeLastModifiedBy, releaseDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, releaseDTO.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, releaseDTO.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, releaseDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, releaseDTO.dataChangeLastModifiedTime) && - Objects.equals(this.id, releaseDTO.id) && - Objects.equals(this.releaseKey, releaseDTO.releaseKey) && - Objects.equals(this.name, releaseDTO.name) && - Objects.equals(this.appId, releaseDTO.appId) && - Objects.equals(this.clusterName, releaseDTO.clusterName) && - Objects.equals(this.namespaceName, releaseDTO.namespaceName) && - Objects.equals(this.configurations, releaseDTO.configurations) && - Objects.equals(this.comment, releaseDTO.comment) && - Objects.equals(this.isAbandoned, releaseDTO.isAbandoned); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, id, releaseKey, name, appId, clusterName, namespaceName, configurations, comment, isAbandoned); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReleaseDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).append("\n"); - sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); - sb.append(" dataChangeLastModifiedByDisplayName: ").append(toIndentedString(dataChangeLastModifiedByDisplayName)).append("\n"); - sb.append(" dataChangeCreatedTime: ").append(toIndentedString(dataChangeCreatedTime)).append("\n"); - sb.append(" dataChangeLastModifiedTime: ").append(toIndentedString(dataChangeLastModifiedTime)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" releaseKey: ").append(toIndentedString(releaseKey)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); - sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); - sb.append(" configurations: ").append(toIndentedString(configurations)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append(" isAbandoned: ").append(toIndentedString(isAbandoned)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "id", "releaseKey", "name", "appId", "clusterName", "namespaceName", "configurations", "comment", "isAbandoned")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReleaseDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReleaseDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReleaseDTO is not found in the empty JSON string", ReleaseDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReleaseDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReleaseDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("dataChangeCreatedBy") != null && !jsonObj.get("dataChangeCreatedBy").isJsonNull()) && !jsonObj.get("dataChangeCreatedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedBy").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedBy") != null && !jsonObj.get("dataChangeLastModifiedBy").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedBy").toString())); - } - if ((jsonObj.get("dataChangeCreatedByDisplayName") != null && !jsonObj.get("dataChangeCreatedByDisplayName").isJsonNull()) && !jsonObj.get("dataChangeCreatedByDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedByDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedByDisplayName").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedByDisplayName") != null && !jsonObj.get("dataChangeLastModifiedByDisplayName").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedByDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedByDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedByDisplayName").toString())); - } - if ((jsonObj.get("dataChangeCreatedTime") != null && !jsonObj.get("dataChangeCreatedTime").isJsonNull()) && !jsonObj.get("dataChangeCreatedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedTime").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedTime") != null && !jsonObj.get("dataChangeLastModifiedTime").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedTime").toString())); - } - if ((jsonObj.get("releaseKey") != null && !jsonObj.get("releaseKey").isJsonNull()) && !jsonObj.get("releaseKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `releaseKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("releaseKey").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); - } - if ((jsonObj.get("clusterName") != null && !jsonObj.get("clusterName").isJsonNull()) && !jsonObj.get("clusterName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `clusterName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("clusterName").toString())); - } - if ((jsonObj.get("namespaceName") != null && !jsonObj.get("namespaceName").isJsonNull()) && !jsonObj.get("namespaceName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `namespaceName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespaceName").toString())); - } - if ((jsonObj.get("configurations") != null && !jsonObj.get("configurations").isJsonNull()) && !jsonObj.get("configurations").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `configurations` to be a primitive type in the JSON string but got `%s`", jsonObj.get("configurations").toString())); - } - if ((jsonObj.get("comment") != null && !jsonObj.get("comment").isJsonNull()) && !jsonObj.get("comment").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `comment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comment").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReleaseDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReleaseDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReleaseDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReleaseDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReleaseDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReleaseDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReleaseDTO - * @throws IOException if the JSON string is invalid with respect to ReleaseDTO - */ - public static ReleaseDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReleaseDTO.class); - } - - /** - * Convert an instance of ReleaseDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/RichResponseEntity.java b/java-client/src/main/java/org/openapitools/client/model/RichResponseEntity.java new file mode 100644 index 00000000..0775597c --- /dev/null +++ b/java-client/src/main/java/org/openapitools/client/model/RichResponseEntity.java @@ -0,0 +1,269 @@ +/* + * Apollo OpenAPI + *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
+ * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * A wrapper for a single response entity with code, message, and body + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +public class RichResponseEntity { + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private Integer code; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private Object message; + + public static final String SERIALIZED_NAME_BODY = "body"; + @SerializedName(SERIALIZED_NAME_BODY) + private Object body; + + public RichResponseEntity() { + } + + public RichResponseEntity code(Integer code) { + + this.code = code; + return this; + } + + /** + * HTTP status code + * @return code + **/ + @javax.annotation.Nonnull + public Integer getCode() { + return code; + } + + + public void setCode(Integer code) { + this.code = code; + } + + + public RichResponseEntity message(Object message) { + + this.message = message; + return this; + } + + /** + * Response message (can be string or object) + * @return message + **/ + @javax.annotation.Nonnull + public Object getMessage() { + return message; + } + + + public void setMessage(Object message) { + this.message = message; + } + + + public RichResponseEntity body(Object body) { + + this.body = body; + return this; + } + + /** + * Response payload (generic type T) + * @return body + **/ + @javax.annotation.Nullable + public Object getBody() { + return body; + } + + + public void setBody(Object body) { + this.body = body; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RichResponseEntity richResponseEntity = (RichResponseEntity) o; + return Objects.equals(this.code, richResponseEntity.code) && + Objects.equals(this.message, richResponseEntity.message) && + Objects.equals(this.body, richResponseEntity.body); + } + + @Override + public int hashCode() { + return Objects.hash(code, message, body); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RichResponseEntity {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" body: ").append(toIndentedString(body)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("code"); + openapiFields.add("message"); + openapiFields.add("body"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("code"); + openapiRequiredFields.add("message"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RichResponseEntity + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RichResponseEntity.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RichResponseEntity is not found in the empty JSON string", RichResponseEntity.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!RichResponseEntity.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RichResponseEntity` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : RichResponseEntity.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RichResponseEntity.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RichResponseEntity' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RichResponseEntity.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RichResponseEntity value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RichResponseEntity read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RichResponseEntity given an JSON string + * + * @param jsonString JSON string + * @return An instance of RichResponseEntity + * @throws IOException if the JSON string is invalid with respect to RichResponseEntity + */ + public static RichResponseEntity fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RichResponseEntity.class); + } + + /** + * Convert an instance of RichResponseEntity to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/java-client/src/test/java/org/openapitools/client/api/AppManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/AppManagementApiTest.java index 4efb014a..92e8fdcf 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 @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,12 +14,10 @@ package org.openapitools.client.api; import org.openapitools.client.ApiException; -import org.openapitools.client.model.EnvClusterInfo; +import org.openapitools.client.model.MultiResponseEntity; import org.openapitools.client.model.OpenAppDTO; +import org.openapitools.client.model.OpenCreateAppDTO; import org.openapitools.client.model.OpenEnvClusterDTO; -import org.openapitools.client.model.OpenapiV1AppsGet401Response; -import org.openapitools.client.model.OpenapiV1AppsPost400Response; -import org.openapitools.client.model.OpenapiV1AppsPostRequest; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -37,189 +35,161 @@ public class AppManagementApiTest { private final AppManagementApi api = new AppManagementApi(); /** - * 删除AppNamespace + * 创建应用 (original openapi) * - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * POST /openapi/v1/apps * * @throws ApiException if the Api call fails */ @Test - public void openapiV1AppsAppIdAppnamespacesNamespaceNameDeleteTest() throws ApiException { - String appId = null; - String namespaceName = null; - Object response = api.openapiV1AppsAppIdAppnamespacesNamespaceNameDelete(appId, namespaceName); + public void createAppTest() throws ApiException { + OpenCreateAppDTO openCreateAppDTO = null; + Object response = api.createApp(openCreateAppDTO); // TODO: test validations } /** - * 删除应用 + * 在指定环境创建应用(new added) * - * DELETE /openapi/v1/apps/{appId} + * POST /openapi/v1/apps/envs/{env} * * @throws ApiException if the Api call fails */ @Test - public void openapiV1AppsAppIdDeleteTest() throws ApiException { - String appId = null; - OpenapiV1AppsGet401Response response = api.openapiV1AppsAppIdDelete(appId); + public void createAppInEnvTest() throws ApiException { + String env = null; + String operator = null; + OpenAppDTO openAppDTO = null; + Object response = api.createAppInEnv(env, operator, openAppDTO); // TODO: test validations } /** - * 获取应用的环境集群信息 + * 删除应用(new added) * - * GET /openapi/v1/apps/{appId}/env-clusters + * DELETE /openapi/v1/apps/{appId} * * @throws ApiException if the Api call fails */ @Test - public void openapiV1AppsAppIdEnvClustersGetTest() throws ApiException { + public void deleteAppTest() throws ApiException { String appId = null; - List response = api.openapiV1AppsAppIdEnvClustersGet(appId); + String operator = null; + Object response = api.deleteApp(appId, operator); // TODO: test validations } /** - * 删除关联的Namespace + * 查找应用 (original openapi) * - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links + * POST /openapi/v1/apps * * @throws ApiException if the Api call fails */ @Test - public void openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDeleteTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - Object response = api.openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete(appId, env, clusterName, namespaceName); + public void findAppsTest() throws ApiException { + String appIds = null; + List response = api.findApps(appIds); // TODO: test validations } /** - * 获取单个应用信息 + * 获取当前Consumer授权的应用列表 (original openapi) * - * GET /openapi/v1/apps/{appId} + * GET /openapi/v1/apps/authorized * * @throws ApiException if the Api call fails */ @Test - public void openapiV1AppsAppIdGetTest() throws ApiException { - String appId = null; - OpenAppDTO response = api.openapiV1AppsAppIdGet(appId); + public void findAppsAuthorizedTest() throws ApiException { + List response = api.findAppsAuthorized(); // TODO: test validations } /** - * 查找缺失的环境 + * 查找缺失的环境(new added) * * GET /openapi/v1/apps/{appId}/miss_envs * * @throws ApiException if the Api call fails */ @Test - public void openapiV1AppsAppIdMissEnvsGetTest() throws ApiException { + public void findMissEnvsTest() throws ApiException { String appId = null; - List response = api.openapiV1AppsAppIdMissEnvsGet(appId); + MultiResponseEntity response = api.findMissEnvs(appId); // TODO: test validations } /** - * 获取应用下所有Namespace的发布状态 + * 获取单个应用信息(new added) * - * GET /openapi/v1/apps/{appId}/namespaces/releases/status + * GET /openapi/v1/apps/{appId} * * @throws ApiException if the Api call fails */ @Test - public void openapiV1AppsAppIdNamespacesReleasesStatusGetTest() throws ApiException { + public void getAppTest() throws ApiException { String appId = null; - Map> response = api.openapiV1AppsAppIdNamespacesReleasesStatusGet(appId); + OpenAppDTO response = api.getApp(appId); // TODO: test validations } /** - * 获取应用导航树 + * 获取应用导航树(new added) * * GET /openapi/v1/apps/{appId}/navtree * * @throws ApiException if the Api call fails */ @Test - public void openapiV1AppsAppIdNavtreeGetTest() throws ApiException { - String appId = null; - List response = api.openapiV1AppsAppIdNavtreeGet(appId); - // TODO: test validations - } - - /** - * 更新应用 - * - * PUT /openapi/v1/apps/{appId} - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1AppsAppIdPutTest() throws ApiException { + public void getAppNavTreeTest() throws ApiException { String appId = null; - OpenAppDTO openAppDTO = null; - OpenAppDTO response = api.openapiV1AppsAppIdPut(appId, openAppDTO); + MultiResponseEntity response = api.getAppNavTree(appId); // TODO: test validations } /** - * 获取当前Consumer的应用列表(分页) + * 获取当前Consumer的应用列表(分页)(new added) * * GET /openapi/v1/apps/by-self * * @throws ApiException if the Api call fails */ @Test - public void openapiV1AppsBySelfGetTest() throws ApiException { - List response = api.openapiV1AppsBySelfGet(); - // TODO: test validations - } - - /** - * 在指定环境创建应用 - * - * POST /openapi/v1/apps/envs/{env} - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1AppsEnvsEnvPostTest() throws ApiException { - String env = null; - OpenAppDTO openAppDTO = null; - OpenapiV1AppsGet401Response response = api.openapiV1AppsEnvsEnvPost(env, openAppDTO); + public void getAppsBySelfTest() throws ApiException { + Integer page = null; + Integer size = null; + List response = api.getAppsBySelf(page, size); // TODO: test validations } /** - * 获取当前Consumer授权的应用列表 + * 获取应用的环境集群信息 (original openapi) * - * GET /openapi/v1/apps?authorized=true + * GET /openapi/v1/apps/{appId}/envclusters * * @throws ApiException if the Api call fails */ @Test - public void openapiV1AppsGetTest() throws ApiException { - String authorized = null; - List response = api.openapiV1AppsGet(authorized); + public void getEnvClusterInfoTest() throws ApiException { + String appId = null; + List response = api.getEnvClusterInfo(appId); // TODO: test validations } /** - * 创建应用 + * 更新应用(new added) * - * POST /openapi/v1/apps + * PUT /openapi/v1/apps/{appId} * * @throws ApiException if the Api call fails */ @Test - public void openapiV1AppsPostTest() throws ApiException { - OpenapiV1AppsPostRequest openapiV1AppsPostRequest = null; - OpenAppDTO response = api.openapiV1AppsPost(openapiV1AppsPostRequest); + public void updateAppTest() throws ApiException { + String appId = null; + String operator = null; + OpenAppDTO openAppDTO = null; + OpenAppDTO response = api.updateApp(appId, operator, openAppDTO); // 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 bae4d481..682bce38 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 @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -15,8 +15,6 @@ import org.openapitools.client.ApiException; import org.openapitools.client.model.OpenClusterDTO; -import org.openapitools.client.model.OpenNamespaceDTO; -import org.openapitools.client.model.OpenapiV1AppsGet401Response; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -34,83 +32,51 @@ public class ClusterManagementApiTest { private final ClusterManagementApi api = new ClusterManagementApi(); /** - * 获取指定集群信息 + * 创建集群 (original openapi) * - * GET /openapi/v1/apps/{appId}/clusters/{clusterName} + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters * * @throws ApiException if the Api call fails */ @Test - public void openapiV1AppsAppIdClustersClusterNameGetTest() throws ApiException { - String appId = null; - String clusterName = null; - OpenClusterDTO response = api.openapiV1AppsAppIdClustersClusterNameGet(appId, clusterName); - // TODO: test validations - } - - /** - * 创建集群 - * - * POST /openapi/v1/apps/{appId}/clusters - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1AppsAppIdClustersPostTest() throws ApiException { + public void createClusterTest() throws ApiException { String appId = null; + String env = null; OpenClusterDTO openClusterDTO = null; - OpenClusterDTO response = api.openapiV1AppsAppIdClustersPost(appId, openClusterDTO); + OpenClusterDTO response = api.createCluster(appId, env, openClusterDTO); // TODO: test validations } /** - * 删除集群 + * 删除集群 (new added) * * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteTest() throws ApiException { + public void deleteClusterTest() throws ApiException { String env = null; String appId = null; String clusterName = null; - OpenapiV1AppsGet401Response response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete(env, appId, clusterName); + String operator = null; + Object response = api.deleteCluster(env, appId, clusterName, operator); // TODO: test validations } /** - * 获取命名空间分支信息 + * 获取指定集群信息 (original openapi) * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGetTest() throws ApiException { + public void getClusterTest() throws ApiException { String appId = null; - String env = null; String clusterName = null; - String namespaceName = null; - OpenNamespaceDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet(appId, env, clusterName, namespaceName); - // TODO: test validations - } - - /** - * 获取指定的Namespace - * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGetTest() throws ApiException { - String appId = null; String env = null; - String clusterName = null; - String namespaceName = null; - Boolean fillItemDetail = null; - OpenNamespaceDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet(appId, env, clusterName, namespaceName, fillItemDetail); + OpenClusterDTO response = api.getCluster(appId, clusterName, env); // TODO: test validations } diff --git a/java-client/src/test/java/org/openapitools/client/api/InstanceManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/InstanceManagementApiTest.java index ef098bdd..70a0cc71 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 @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -33,41 +33,42 @@ public class InstanceManagementApiTest { private final InstanceManagementApi api = new InstanceManagementApi(); /** - * 获取命名空间下的实例数量 + * 获取命名空间下的实例数量 (original openapi) * - * GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances * * @throws ApiException if the Api call fails */ @Test - public void openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetTest() throws ApiException { + public void getInstanceCountByNamespaceTest() throws ApiException { + String env = null; String appId = null; String clusterName = null; String namespaceName = null; - Integer response = api.openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(appId, clusterName, namespaceName); + Integer response = api.getInstanceCountByNamespace(env, appId, clusterName, namespaceName); // 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 openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetTest() throws ApiException { + public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetTest() throws ApiException { String env = null; String appId = null; String clusterName = null; String namespaceName = null; String excludeReleases = null; - List response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(env, appId, clusterName, namespaceName, excludeReleases); + List response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(env, appId, clusterName, namespaceName, excludeReleases); // TODO: test validations } /** - * 根据发布版本查询实例(支持分页) + * 根据发布版本查询实例(支持分页) (new added) * * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances * 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 2e10ded2..958da28c 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 @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,14 +14,11 @@ package org.openapitools.client.api; import org.openapitools.client.ApiException; -import org.openapitools.client.model.ListItemDiffs; -import org.openapitools.client.model.NamespaceSyncModel; -import org.openapitools.client.model.NamespaceTextModel; import org.openapitools.client.model.OpenItemDTO; +import org.openapitools.client.model.OpenItemDiffs; +import org.openapitools.client.model.OpenNamespaceSyncModel; +import org.openapitools.client.model.OpenNamespaceTextModel; import org.openapitools.client.model.OpenPageDTOOpenItemDTO; -import org.openapitools.client.model.OpenapiV1AppsGet401Response; -import org.openapitools.client.model.OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response; -import org.openapitools.client.model.OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -39,242 +36,264 @@ public class ItemManagementApiTest { private final ItemManagementApi api = new ItemManagementApi(); /** - * 通过编码的key删除配置项 + * 通过文本批量修改配置项 (new added) * - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate: * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDeleteTest() throws ApiException { + public void batchUpdateItemsByTextTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; - String key = null; String operator = null; - Object response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete(appId, env, clusterName, namespaceName, key, operator); + OpenNamespaceTextModel openNamespaceTextModel = null; + Object response = api.batchUpdateItemsByText(appId, env, clusterName, namespaceName, operator, openNamespaceTextModel); // TODO: test validations } /** - * 通过查询参数获取配置项(支持编码的key) + * 对比命名空间配置差异 (new added) * - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false} + * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGetTest() throws ApiException { + public void compareItemsTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; - String key = null; - OpenItemDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet(appId, env, clusterName, namespaceName, key); + OpenNamespaceSyncModel openNamespaceSyncModel = null; + List response = api.compareItems(appId, env, clusterName, namespaceName, openNamespaceSyncModel); // TODO: test validations } /** - * 通过编码的key更新配置项 + * 创建新的配置项 (original openapi) * - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPutTest() throws ApiException { + public void createItemTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; - String key = null; - Boolean createIfNotExists = null; + String operator = null; OpenItemDTO openItemDTO = null; - OpenapiV1AppsGet401Response response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); + OpenItemDTO response = api.createItem(appId, env, clusterName, namespaceName, operator, openItemDTO); // TODO: test validations } /** - * 通过文本批量修改配置项 + * 删除配置项 (original openapi) * - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePutTest() throws ApiException { + public void deleteItemTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; - NamespaceTextModel namespaceTextModel = null; - OpenapiV1AppsGet401Response response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut(appId, env, clusterName, namespaceName, namespaceTextModel); + String key = null; + String operator = null; + Object response = api.deleteItem(appId, env, clusterName, namespaceName, key, operator); // TODO: test validations } /** - * 对比命名空间配置差异 + * 通过编码的key删除配置项 (original openapi) * - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePostTest() throws ApiException { + public void deleteItemByEncodedKeyTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; - NamespaceSyncModel namespaceSyncModel = null; - List response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost(appId, env, clusterName, namespaceName, namespaceSyncModel); + String key = null; + String operator = null; + Object response = api.deleteItemByEncodedKey(appId, env, clusterName, namespaceName, key, operator); // TODO: test validations } /** - * 获取命名空间下的配置项列表 + * 获取命名空间下的配置项列表 (original openapi) * - * + * 获取指定命名空间的配置项列表,支持分页 * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGetTest() throws ApiException { + public void findItemsByNamespaceTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; Integer page = null; Integer size = null; - OpenPageDTOOpenItemDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet(appId, env, clusterName, namespaceName, page, size); + OpenPageDTOOpenItemDTO response = api.findItemsByNamespace(appId, env, clusterName, namespaceName, page, size); // TODO: test validations } /** - * 删除配置项 + * 获取分支下的配置项 (new added) * - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDeleteTest() throws ApiException { + public void getBranchItemsTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; - String key = null; - String operator = null; - Object response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete(appId, env, clusterName, namespaceName, key, operator); + String branchName = null; + List response = api.getBranchItems(appId, env, clusterName, namespaceName, branchName); // TODO: test validations } /** - * 获取单个配置项 + * 获取单个配置项 (original openapi) * - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGetTest() throws ApiException { + public void getItemTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; String key = null; - OpenItemDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet(appId, env, clusterName, namespaceName, key); + OpenItemDTO response = api.getItem(appId, env, clusterName, namespaceName, key); // TODO: test validations } /** - * 更新配置项 + * 通过查询参数获取配置项(支持编码的key) (original openapi) * - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPutTest() throws ApiException { + public void getItemByEncodedKeyTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; String key = null; - Boolean createIfNotExists = null; - OpenItemDTO openItemDTO = null; - OpenapiV1AppsGet401Response response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); + OpenItemDTO response = api.getItemByEncodedKey(appId, env, clusterName, namespaceName, key); // TODO: test validations } /** - * 创建新的配置项 + * 撤销配置项更改 (new added) * - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPostTest() throws ApiException { + public void revertItemsTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; - OpenItemDTO openItemDTO = null; - OpenItemDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost(appId, env, clusterName, namespaceName, openItemDTO); + String operator = null; + Object response = api.revertItems(appId, env, clusterName, namespaceName, operator); + // TODO: test validations + } + + /** + * 同步配置项到多个命名空间 (new added) + * + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync: + * + * @throws ApiException if the Api call fails + */ + @Test + public void syncItemsTest() throws ApiException { + String appId = null; + String env = null; + String clusterName = null; + String namespaceName = null; + String operator = null; + OpenNamespaceSyncModel openNamespaceSyncModel = null; + Object response = api.syncItems(appId, env, clusterName, namespaceName, operator, openNamespaceSyncModel); // TODO: test validations } /** - * 撤销配置项更改 + * 更新配置项 (original openapi) * - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPostTest() throws ApiException { + public void updateItemTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; - OpenapiV1AppsGet401Response response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost(appId, env, clusterName, namespaceName); + String key = null; + Boolean createIfNotExists = null; + OpenItemDTO openItemDTO = null; + Object response = api.updateItem(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); // TODO: test validations } /** - * 同步配置项到多个命名空间 + * 通过编码的key更新配置项 (original openapi) * - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPostTest() throws ApiException { + public void updateItemByEncodedKeyTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; - NamespaceSyncModel namespaceSyncModel = null; - OpenapiV1AppsGet401Response response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost(appId, env, clusterName, namespaceName, namespaceSyncModel); + String key = null; + Boolean createIfNotExists = null; + OpenItemDTO openItemDTO = null; + Object response = api.updateItemByEncodedKey(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); // TODO: test validations } /** - * 验证配置文本语法 + * 验证配置文本语法 (new added) * - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePostTest() throws ApiException { + public void validateItemsTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; - NamespaceTextModel namespaceTextModel = null; - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost(appId, env, clusterName, namespaceName, namespaceTextModel); + OpenNamespaceTextModel openNamespaceTextModel = null; + Object response = api.validateItems(appId, env, clusterName, namespaceName, openNamespaceTextModel); // 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 6689566c..618d1102 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 @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,13 +14,10 @@ package org.openapitools.client.api; import org.openapitools.client.ApiException; -import org.openapitools.client.model.NamespaceGrayDelReleaseDTO; import org.openapitools.client.model.NamespaceReleaseDTO; import org.openapitools.client.model.OpenGrayReleaseRuleDTO; -import org.openapitools.client.model.OpenItemDTO; import org.openapitools.client.model.OpenNamespaceDTO; import org.openapitools.client.model.OpenReleaseDTO; -import org.openapitools.client.model.OpenapiV1AppsGet401Response; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -38,174 +35,115 @@ public class NamespaceBranchManagementApiTest { private final NamespaceBranchManagementApi api = new NamespaceBranchManagementApi(); /** - * 创建命名空间分支 + * 创建命名空间分支 (original openapi) * - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPostTest() throws ApiException { + public void createBranchTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; String operator = null; - OpenNamespaceDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost(appId, env, clusterName, namespaceName, operator); + OpenNamespaceDTO response = api.createBranch(appId, env, clusterName, namespaceName, operator); // TODO: test validations } /** - * 删除命名空间分支 + * 删除命名空间分支 (original openapi) * * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDeleteTest() throws ApiException { - String env = null; - String appId = null; - String clusterName = null; - String namespaceName = null; - String branchName = null; - String operator = null; - Object response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete(env, appId, clusterName, namespaceName, branchName, operator); - // TODO: test validations - } - - /** - * 创建灰度删除发布 - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPostTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String branchName = null; - NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO = null; - OpenReleaseDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO); - // TODO: test validations - } - - /** - * 获取分支灰度发布规则 - * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGetTest() throws ApiException { - String appId = null; + public void deleteBranchTest() throws ApiException { String env = null; - String clusterName = null; - String namespaceName = null; - String branchName = null; - OpenGrayReleaseRuleDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet(appId, env, clusterName, namespaceName, branchName); - // TODO: test validations - } - - /** - * 更新分支灰度发布规则 - * - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPutTest() throws ApiException { String appId = null; - String env = null; String clusterName = null; String namespaceName = null; String branchName = null; String operator = null; - OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO = null; - Object response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO); + Object response = api.deleteBranch(env, appId, clusterName, namespaceName, branchName, operator); // TODO: test validations } /** - * 获取分支下的配置项 + * 获取命名空间分支信息 (original openapi) * - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGetTest() throws ApiException { + public void findBranchTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; - String branchName = null; - List response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet(appId, env, clusterName, namespaceName, branchName); + OpenNamespaceDTO response = api.findBranch(appId, env, clusterName, namespaceName); // TODO: test validations } /** - * 合并分支 + * 获取分支灰度发布规则 (original openapi) * - * + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePostTest() throws ApiException { + public void getBranchGrayRulesTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; String branchName = null; - Boolean deleteBranch = null; - NamespaceReleaseDTO namespaceReleaseDTO = null; - OpenReleaseDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO); + OpenGrayReleaseRuleDTO response = api.getBranchGrayRules(appId, env, clusterName, namespaceName, branchName); // TODO: test validations } /** - * 合并分支到主分支 + * 合并分支到主分支 (new added) * * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatchTest() throws ApiException { + public void mergeBranchTest() throws ApiException { String env = null; String appId = null; String clusterName = null; String namespaceName = null; String branchName = null; Boolean deleteBranch = null; - String xApolloOperator = null; + String operator = null; NamespaceReleaseDTO namespaceReleaseDTO = null; - OpenReleaseDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(env, appId, clusterName, namespaceName, branchName, deleteBranch, xApolloOperator, namespaceReleaseDTO); + OpenReleaseDTO response = api.mergeBranch(env, appId, clusterName, namespaceName, branchName, deleteBranch, operator, namespaceReleaseDTO); // TODO: test validations } /** - * 创建灰度发布 + * 更新分支灰度发布规则 (original openapi) * - * + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPostTest() throws ApiException { + public void updateBranchRulesTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; String branchName = null; - NamespaceReleaseDTO namespaceReleaseDTO = null; - OpenReleaseDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO); + String operator = null; + OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO = null; + Object response = api.updateBranchRules(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO); // TODO: test validations } diff --git a/java-client/src/test/java/org/openapitools/client/api/NamespaceManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/NamespaceManagementApiTest.java index be615fc7..8d6c8ad5 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 @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -17,7 +17,6 @@ import org.openapitools.client.model.OpenAppNamespaceDTO; import org.openapitools.client.model.OpenNamespaceDTO; import org.openapitools.client.model.OpenNamespaceLockDTO; -import org.openapitools.client.model.OpenapiV1AppsGet401Response; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -35,144 +34,210 @@ public class NamespaceManagementApiTest { private final NamespaceManagementApi api = new NamespaceManagementApi(); /** - * 获取所有公共AppNamespace + * 检查缺失的Namespace (new added) * - * GET /openapi/v1/appnamespaces?public=true + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check * * @throws ApiException if the Api call fails */ @Test - public void openapiV1AppnamespacesGetTest() throws ApiException { - Boolean publicOnly = null; - List response = api.openapiV1AppnamespacesGet(publicOnly); + public void checkNamespaceIntegrityTest() throws ApiException { + String appId = null; + String env = null; + String clusterName = null; + List response = api.checkNamespaceIntegrity(appId, env, clusterName); // TODO: test validations } /** - * 获取指定应用的AppNamespace + * 创建AppNamespace (original openapi) * - * GET /openapi/v1/apps/{appId}/appnamespaces + * POST /openapi/v1/apps/{appId}/appnamespaces * * @throws ApiException if the Api call fails */ @Test - public void openapiV1AppsAppIdAppnamespacesGetTest() throws ApiException { + public void createNamespaceTest() throws ApiException { String appId = null; - List response = api.openapiV1AppsAppIdAppnamespacesGet(appId); + OpenAppNamespaceDTO openAppNamespaceDTO = null; + OpenAppNamespaceDTO response = api.createNamespace(appId, openAppNamespaceDTO); // TODO: test validations } /** - * 获取指定的AppNamespace + * 删除AppNamespace (new added) * - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} * * @throws ApiException if the Api call fails */ @Test - public void openapiV1AppsAppIdAppnamespacesNamespaceNameGetTest() throws ApiException { + public void deleteAppNamespaceTest() throws ApiException { String appId = null; String namespaceName = null; - OpenAppNamespaceDTO response = api.openapiV1AppsAppIdAppnamespacesNamespaceNameGet(appId, namespaceName); + String operator = null; + Object response = api.deleteAppNamespace(appId, namespaceName, operator); // TODO: test validations } /** - * 创建AppNamespace + * 删除关联的Namespace (new added) * - * POST /openapi/v1/apps/{appId}/appnamespaces + * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links * * @throws ApiException if the Api call fails */ @Test - public void openapiV1AppsAppIdAppnamespacesPostTest() throws ApiException { + public void deleteNamespaceLinksTest() throws ApiException { String appId = null; - OpenAppNamespaceDTO openAppNamespaceDTO = null; - OpenAppNamespaceDTO response = api.openapiV1AppsAppIdAppnamespacesPost(appId, openAppNamespaceDTO); + String env = null; + String clusterName = null; + String namespaceName = null; + String operator = null; + Object response = api.deleteNamespaceLinks(appId, env, clusterName, namespaceName, operator); // TODO: test validations } /** - * 检查缺失的Namespace + * 获取指定集群下的所有Namespace (original openapi) * - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces * * @throws ApiException if the Api call fails */ @Test - public void openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGetTest() throws ApiException { + public void findNamespacesTest() throws ApiException { String appId = null; String env = null; String clusterName = null; - List response = api.openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet(appId, env, clusterName); + Boolean fillItemDetail = null; + List response = api.findNamespaces(appId, env, clusterName, fillItemDetail); // TODO: test validations } /** - * 获取关联的公共Namespace + * 获取指定的AppNamespace (new added) * - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} * * @throws ApiException if the Api call fails */ @Test - public void openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGetTest() throws ApiException { + public void getAppNamespaceTest() throws ApiException { + String appId = null; + String namespaceName = null; + OpenAppNamespaceDTO response = api.getAppNamespace(appId, namespaceName); + // TODO: test validations + } + + /** + * 获取所有公共AppNamespace (new added) + * + * GET /openapi/v1/appnamespaces?public=true + * + * @throws ApiException if the Api call fails + */ + @Test + public void getAppNamespacesTest() throws ApiException { + Boolean publicOnly = null; + List response = api.getAppNamespaces(publicOnly); + // TODO: test validations + } + + /** + * 获取指定应用的AppNamespace (new added) + * + * GET /openapi/v1/apps/{appId}/appnamespaces + * + * @throws ApiException if the Api call fails + */ + @Test + public void getAppNamespacesByAppTest() throws ApiException { + String appId = null; + List response = api.getAppNamespacesByApp(appId); + // TODO: test validations + } + + /** + * 获取Namespace的锁状态 (original openapi) + * + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock + * + * @throws ApiException if the Api call fails + */ + @Test + public void getNamespaceLockTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; - OpenNamespaceDTO response = api.openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet(appId, env, clusterName, namespaceName); + OpenNamespaceLockDTO response = api.getNamespaceLock(appId, env, clusterName, namespaceName); // TODO: test validations } /** - * 获取公共AppNamespace的所有实例 + * 获取应用下所有Namespace的发布状态 (new added) + * + * GET /openapi/v1/apps/{appId}/namespaces/releases/status + * + * @throws ApiException if the Api call fails + */ + @Test + public void getNamespacesReleaseStatusTest() throws ApiException { + String appId = null; + Map> response = api.getNamespacesReleaseStatus(appId); + // TODO: test validations + } + + /** + * 获取公共AppNamespace的所有实例 (new added) * * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGetTest() throws ApiException { + public void getPublicAppNamespaceInstancesTest() throws ApiException { String env = null; String publicNamespaceName = null; Integer page = null; Integer size = null; - List response = api.openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet(env, publicNamespaceName, page, size); + List response = api.getPublicAppNamespaceInstances(env, publicNamespaceName, page, size); // TODO: test validations } /** - * 获取指定集群下的所有Namespace + * 获取关联的公共Namespace (new added) * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetTest() throws ApiException { + public void getPublicNamespaceAssociationTest() throws ApiException { String appId = null; String env = null; String clusterName = null; - Boolean fillItemDetail = null; - List response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet(appId, env, clusterName, fillItemDetail); + String namespaceName = null; + OpenNamespaceDTO response = api.getPublicNamespaceAssociation(appId, env, clusterName, namespaceName); // TODO: test validations } /** - * 获取Namespace的锁状态 + * 获取指定的Namespace (original openapi) * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGetTest() throws ApiException { + public void loadNamespaceTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; - OpenNamespaceLockDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet(appId, env, clusterName, namespaceName); + Boolean fillItemDetail = null; + OpenNamespaceDTO response = api.loadNamespace(appId, env, clusterName, namespaceName, fillItemDetail); // TODO: test validations } diff --git a/java-client/src/test/java/org/openapitools/client/api/OrganizationManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/OrganizationManagementApiTest.java index be68bb7c..fd600d26 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 @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -15,7 +15,6 @@ import org.openapitools.client.ApiException; import org.openapitools.client.model.OpenOrganizationDto; -import org.openapitools.client.model.OpenapiV1AppsGet401Response; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -33,15 +32,15 @@ public class OrganizationManagementApiTest { private final OrganizationManagementApi api = new OrganizationManagementApi(); /** - * 获取所有组织信息 + * 获取所有组织信息 (original openapi) * * GET /openapi/v1/organizations * * @throws ApiException if the Api call fails */ @Test - public void openapiV1OrganizationsGetTest() throws ApiException { - List response = api.openapiV1OrganizationsGet(); + public void getOrganizationTest() throws ApiException { + List response = api.getOrganization(); // TODO: test validations } diff --git a/java-client/src/test/java/org/openapitools/client/api/ReleaseManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/ReleaseManagementApiTest.java index 916c770b..8fbaa672 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 @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -14,11 +14,10 @@ package org.openapitools.client.api; import org.openapitools.client.ApiException; -import org.openapitools.client.model.ListReleaseBO; +import org.openapitools.client.model.NamespaceGrayDelReleaseDTO; import org.openapitools.client.model.NamespaceReleaseDTO; +import org.openapitools.client.model.OpenReleaseBO; import org.openapitools.client.model.OpenReleaseDTO; -import org.openapitools.client.model.OpenapiV1AppsGet401Response; -import org.openapitools.client.model.OpenapiV1EnvsEnvReleasesCompareGet200Response; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -36,122 +35,164 @@ public class ReleaseManagementApiTest { private final ReleaseManagementApi api = new ReleaseManagementApi(); /** - * 获取活跃发布(分页) + * 创建灰度删除发布 (original openapi) + * * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGetTest() throws ApiException { + public void createGrayDelReleaseTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; - Integer page = null; - Integer size = null; - List response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet(appId, env, clusterName, namespaceName, page, size); + String branchName = null; + NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO = null; + OpenReleaseDTO response = api.createGrayDelRelease(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO); // TODO: test validations } /** - * 获取所有发布(分页) + * 创建灰度发布 (original openapi) * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all + * 创建灰度发布 * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGetTest() throws ApiException { + public void createGrayReleaseTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; - Integer page = null; - Integer size = null; - List response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet(appId, env, clusterName, namespaceName, page, size); + String branchName = null; + NamespaceReleaseDTO namespaceReleaseDTO = null; + OpenReleaseDTO response = api.createGrayRelease(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO); // TODO: test validations } /** - * 获取最新活跃发布 + * 创建发布 (original openapi) * - * + * 创建发布 * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGetTest() throws ApiException { + public void createReleaseTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; - OpenReleaseDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet(appId, env, clusterName, namespaceName); + NamespaceReleaseDTO namespaceReleaseDTO = null; + OpenReleaseDTO response = api.createRelease(appId, env, clusterName, namespaceName, namespaceReleaseDTO); // TODO: test validations } /** - * 创建发布 + * 获取活跃发布(分页) (new added) * - * + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPostTest() throws ApiException { + public void findActiveReleasesTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; - NamespaceReleaseDTO namespaceReleaseDTO = null; - OpenReleaseDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost(appId, env, clusterName, namespaceName, namespaceReleaseDTO); + Integer page = null; + Integer size = null; + List response = api.findActiveReleases(appId, env, clusterName, namespaceName, page, size); // TODO: test validations } /** - * 对比发布 + * 获取所有发布(分页) (new added) * - * GET /openapi/v1/envs/{env}/releases/compare + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvReleasesCompareGetTest() throws ApiException { + public void findAllReleasesTest() throws ApiException { + String appId = null; String env = null; - Integer baseReleaseId = null; - Integer toCompareReleaseId = null; - OpenapiV1EnvsEnvReleasesCompareGet200Response response = api.openapiV1EnvsEnvReleasesCompareGet(env, baseReleaseId, toCompareReleaseId); + String clusterName = null; + String namespaceName = null; + Integer page = null; + Integer size = null; + List response = api.findAllReleases(appId, env, clusterName, namespaceName, page, size); // TODO: test validations } /** - * 获取发布详情 + * 获取发布详情 (new added) * * GET /openapi/v1/envs/{env}/releases/{releaseId} * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvReleasesReleaseIdGetTest() throws ApiException { + public void getReleaseByIdTest() throws ApiException { String env = null; Integer releaseId = null; - OpenReleaseDTO response = api.openapiV1EnvsEnvReleasesReleaseIdGet(env, releaseId); + OpenReleaseDTO response = api.getReleaseById(env, releaseId); // TODO: test validations } /** - * 回滚发布 + * 获取最新活跃发布 (original openapi) * - * + * 查询命名空间最新活跃发布 * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvReleasesReleaseIdRollbackPutTest() throws ApiException { + public void loadLatestActiveReleaseTest() throws ApiException { + String appId = null; String env = null; - Integer releaseId = null; + String clusterName = null; + String namespaceName = null; + OpenReleaseDTO response = api.loadLatestActiveRelease(appId, env, clusterName, namespaceName); + // TODO: test validations + } + + /** + * 合并分支 (original openapi) + * + * 合并灰度分支并可选择删除分支 + * + * @throws ApiException if the Api call fails + */ + @Test + public void mergeTest() throws ApiException { + String appId = null; + String env = null; + String clusterName = null; + String namespaceName = null; + String branchName = null; + Boolean deleteBranch = null; + NamespaceReleaseDTO namespaceReleaseDTO = null; + OpenReleaseDTO response = api.merge(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO); + // TODO: test validations + } + + /** + * 回滚发布 (original openapi) + * + * 回滚到指定的发布版本 + * + * @throws ApiException if the Api call fails + */ + @Test + public void rollbackTest() throws ApiException { + String env = null; + Long releaseId = null; String operator = null; - Object response = api.openapiV1EnvsEnvReleasesReleaseIdRollbackPut(env, releaseId, operator); + Object response = api.rollback(env, releaseId, operator); // TODO: test validations } diff --git a/java-client/src/test/java/org/openapitools/client/model/ChangeTest.java b/java-client/src/test/java/org/openapitools/client/model/ChangeTest.java deleted file mode 100644 index 69910548..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/ChangeTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.EntityPairKVEntity; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Change - */ -public class ChangeTest { - private final Change model = new Change(); - - /** - * Model tests for Change - */ - @Test - public void testChange() { - // TODO: test Change - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'entity' - */ - @Test - public void entityTest() { - // TODO: test entity - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/ClusterDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/ClusterDTOTest.java deleted file mode 100644 index 188d9059..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/ClusterDTOTest.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ClusterDTO - */ -public class ClusterDTOTest { - private final ClusterDTO model = new ClusterDTO(); - - /** - * Model tests for ClusterDTO - */ - @Test - public void testClusterDTO() { - // TODO: test ClusterDTO - } - - /** - * Test the property 'dataChangeCreatedBy' - */ - @Test - public void dataChangeCreatedByTest() { - // TODO: test dataChangeCreatedBy - } - - /** - * Test the property 'dataChangeLastModifiedBy' - */ - @Test - public void dataChangeLastModifiedByTest() { - // TODO: test dataChangeLastModifiedBy - } - - /** - * Test the property 'dataChangeCreatedByDisplayName' - */ - @Test - public void dataChangeCreatedByDisplayNameTest() { - // TODO: test dataChangeCreatedByDisplayName - } - - /** - * Test the property 'dataChangeLastModifiedByDisplayName' - */ - @Test - public void dataChangeLastModifiedByDisplayNameTest() { - // TODO: test dataChangeLastModifiedByDisplayName - } - - /** - * Test the property 'dataChangeCreatedTime' - */ - @Test - public void dataChangeCreatedTimeTest() { - // TODO: test dataChangeCreatedTime - } - - /** - * Test the property 'dataChangeLastModifiedTime' - */ - @Test - public void dataChangeLastModifiedTimeTest() { - // TODO: test dataChangeLastModifiedTime - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - - /** - * Test the property 'parentClusterId' - */ - @Test - public void parentClusterIdTest() { - // TODO: test parentClusterId - } - - /** - * Test the property 'comment' - */ - @Test - public void commentTest() { - // TODO: test comment - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/EntityPairKVEntityTest.java b/java-client/src/test/java/org/openapitools/client/model/EntityPairKVEntityTest.java deleted file mode 100644 index c8689674..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/EntityPairKVEntityTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.KVEntity; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for EntityPairKVEntity - */ -public class EntityPairKVEntityTest { - private final EntityPairKVEntity model = new EntityPairKVEntity(); - - /** - * Model tests for EntityPairKVEntity - */ - @Test - public void testEntityPairKVEntity() { - // TODO: test EntityPairKVEntity - } - - /** - * Test the property 'firstEntity' - */ - @Test - public void firstEntityTest() { - // TODO: test firstEntity - } - - /** - * Test the property 'secondEntity' - */ - @Test - public void secondEntityTest() { - // TODO: test secondEntity - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/EnvClusterInfoTest.java b/java-client/src/test/java/org/openapitools/client/model/EnvClusterInfoTest.java deleted file mode 100644 index 5331f25f..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/EnvClusterInfoTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.ClusterDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for EnvClusterInfo - */ -public class EnvClusterInfoTest { - private final EnvClusterInfo model = new EnvClusterInfo(); - - /** - * Model tests for EnvClusterInfo - */ - @Test - public void testEnvClusterInfo() { - // TODO: test EnvClusterInfo - } - - /** - * Test the property 'env' - */ - @Test - public void envTest() { - // TODO: test env - } - - /** - * Test the property 'clusters' - */ - @Test - public void clustersTest() { - // TODO: test clusters - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/ItemDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/ItemDTOTest.java deleted file mode 100644 index 7595e359..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/ItemDTOTest.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ItemDTO - */ -public class ItemDTOTest { - private final ItemDTO model = new ItemDTO(); - - /** - * Model tests for ItemDTO - */ - @Test - public void testItemDTO() { - // TODO: test ItemDTO - } - - /** - * Test the property 'dataChangeCreatedBy' - */ - @Test - public void dataChangeCreatedByTest() { - // TODO: test dataChangeCreatedBy - } - - /** - * Test the property 'dataChangeLastModifiedBy' - */ - @Test - public void dataChangeLastModifiedByTest() { - // TODO: test dataChangeLastModifiedBy - } - - /** - * Test the property 'dataChangeCreatedByDisplayName' - */ - @Test - public void dataChangeCreatedByDisplayNameTest() { - // TODO: test dataChangeCreatedByDisplayName - } - - /** - * Test the property 'dataChangeLastModifiedByDisplayName' - */ - @Test - public void dataChangeLastModifiedByDisplayNameTest() { - // TODO: test dataChangeLastModifiedByDisplayName - } - - /** - * Test the property 'dataChangeCreatedTime' - */ - @Test - public void dataChangeCreatedTimeTest() { - // TODO: test dataChangeCreatedTime - } - - /** - * Test the property 'dataChangeLastModifiedTime' - */ - @Test - public void dataChangeLastModifiedTimeTest() { - // TODO: test dataChangeLastModifiedTime - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'namespaceId' - */ - @Test - public void namespaceIdTest() { - // TODO: test namespaceId - } - - /** - * Test the property 'key' - */ - @Test - public void keyTest() { - // TODO: test key - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'value' - */ - @Test - public void valueTest() { - // TODO: test value - } - - /** - * Test the property 'comment' - */ - @Test - public void commentTest() { - // TODO: test comment - } - - /** - * Test the property 'lineNum' - */ - @Test - public void lineNumTest() { - // TODO: test lineNum - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/KVEntityTest.java b/java-client/src/test/java/org/openapitools/client/model/KVEntityTest.java index 872bc585..21bad78a 100644 --- a/java-client/src/test/java/org/openapitools/client/model/KVEntityTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/KVEntityTest.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -19,10 +19,10 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; + /** * Model tests for KVEntity */ diff --git a/java-client/src/test/java/org/openapitools/client/model/ListItemDiffsTest.java b/java-client/src/test/java/org/openapitools/client/model/ListItemDiffsTest.java deleted file mode 100644 index c325aec0..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/ListItemDiffsTest.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.ItemChangeSets; -import org.openapitools.client.model.NamespaceIdentifier; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ListItemDiffs - */ -public class ListItemDiffsTest { - private final ListItemDiffs model = new ListItemDiffs(); - - /** - * Model tests for ListItemDiffs - */ - @Test - public void testListItemDiffs() { - // TODO: test ListItemDiffs - } - - /** - * Test the property 'namespace' - */ - @Test - public void namespaceTest() { - // TODO: test namespace - } - - /** - * Test the property 'diffs' - */ - @Test - public void diffsTest() { - // TODO: test diffs - } - - /** - * Test the property 'extInfo' - */ - @Test - public void extInfoTest() { - // TODO: test extInfo - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/ListReleaseBOTest.java b/java-client/src/test/java/org/openapitools/client/model/ListReleaseBOTest.java deleted file mode 100644 index 05a182a5..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/ListReleaseBOTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.KVEntity; -import org.openapitools.client.model.ReleaseDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ListReleaseBO - */ -public class ListReleaseBOTest { - private final ListReleaseBO model = new ListReleaseBO(); - - /** - * Model tests for ListReleaseBO - */ - @Test - public void testListReleaseBO() { - // TODO: test ListReleaseBO - } - - /** - * Test the property 'baseInfo' - */ - @Test - public void baseInfoTest() { - // TODO: test baseInfo - } - - /** - * Test the property 'items' - */ - @Test - public void itemsTest() { - // TODO: test items - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/MapStringTest.java b/java-client/src/test/java/org/openapitools/client/model/MapStringTest.java deleted file mode 100644 index 3a29f84f..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/MapStringTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for MapString - */ -public class MapStringTest { - private final MapString model = new MapString(); - - /** - * Model tests for MapString - */ - @Test - public void testMapString() { - // TODO: test MapString - } - - /** - * Test the property 'key' - */ - @Test - public void keyTest() { - // TODO: test key - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/MultiResponseEntityTest.java b/java-client/src/test/java/org/openapitools/client/model/MultiResponseEntityTest.java new file mode 100644 index 00000000..638bc484 --- /dev/null +++ b/java-client/src/test/java/org/openapitools/client/model/MultiResponseEntityTest.java @@ -0,0 +1,59 @@ +/* + * Apollo OpenAPI + *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
+ * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.RichResponseEntity; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + + +/** + * Model tests for MultiResponseEntity + */ +public class MultiResponseEntityTest { + private final MultiResponseEntity model = new MultiResponseEntity(); + + /** + * Model tests for MultiResponseEntity + */ + @Test + public void testMultiResponseEntity() { + // TODO: test MultiResponseEntity + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'entities' + */ + @Test + public void entitiesTest() { + // TODO: test entities + } + +} diff --git a/java-client/src/test/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTOTest.java index 00f2b582..9f6ba333 100644 --- a/java-client/src/test/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTOTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTOTest.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -20,11 +20,11 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; + /** * Model tests for NamespaceGrayDelReleaseDTO */ diff --git a/java-client/src/test/java/org/openapitools/client/model/NamespaceReleaseDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/NamespaceReleaseDTOTest.java index a5ec5c06..7ea25993 100644 --- a/java-client/src/test/java/org/openapitools/client/model/NamespaceReleaseDTOTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/NamespaceReleaseDTOTest.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -19,10 +19,10 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; + /** * Model tests for NamespaceReleaseDTO */ diff --git a/java-client/src/test/java/org/openapitools/client/model/NamespaceSyncModelTest.java b/java-client/src/test/java/org/openapitools/client/model/NamespaceSyncModelTest.java deleted file mode 100644 index bd4e1879..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/NamespaceSyncModelTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.ItemDTO; -import org.openapitools.client.model.NamespaceIdentifier; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for NamespaceSyncModel - */ -public class NamespaceSyncModelTest { - private final NamespaceSyncModel model = new NamespaceSyncModel(); - - /** - * Model tests for NamespaceSyncModel - */ - @Test - public void testNamespaceSyncModel() { - // TODO: test NamespaceSyncModel - } - - /** - * Test the property 'syncToNamespaces' - */ - @Test - public void syncToNamespacesTest() { - // TODO: test syncToNamespaces - } - - /** - * Test the property 'syncItems' - */ - @Test - public void syncItemsTest() { - // TODO: test syncItems - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenAppDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenAppDTOTest.java index 7498a812..db6d30ee 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 @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -19,10 +19,10 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; + /** * Model tests for OpenAppDTO */ diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenAppNamespaceDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenAppNamespaceDTOTest.java index 79f43275..32022760 100644 --- a/java-client/src/test/java/org/openapitools/client/model/OpenAppNamespaceDTOTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenAppNamespaceDTOTest.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -19,10 +19,10 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; + /** * Model tests for OpenAppNamespaceDTO */ diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenClusterDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenClusterDTOTest.java index ce4ef14f..59360271 100644 --- a/java-client/src/test/java/org/openapitools/client/model/OpenClusterDTOTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenClusterDTOTest.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -19,10 +19,10 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; + /** * Model tests for OpenClusterDTO */ 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 554358cb..1b5a0156 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 @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -20,12 +20,12 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import org.openapitools.client.model.OpenAppDTO; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; + /** * Model tests for OpenCreateAppDTO */ diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenEnvClusterDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenEnvClusterDTOTest.java index 69d2cd25..b5f3ee27 100644 --- a/java-client/src/test/java/org/openapitools/client/model/OpenEnvClusterDTOTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenEnvClusterDTOTest.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -20,11 +20,11 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; + /** * Model tests for OpenEnvClusterDTO */ 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 new file mode 100644 index 00000000..82b4e32b --- /dev/null +++ b/java-client/src/test/java/org/openapitools/client/model/OpenEnvClusterInfoTest.java @@ -0,0 +1,59 @@ +/* + * Apollo OpenAPI + *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
+ * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.OpenClusterDTO; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + + +/** + * Model tests for OpenEnvClusterInfo + */ +public class OpenEnvClusterInfoTest { + private final OpenEnvClusterInfo model = new OpenEnvClusterInfo(); + + /** + * Model tests for OpenEnvClusterInfo + */ + @Test + public void testOpenEnvClusterInfo() { + // TODO: test OpenEnvClusterInfo + } + + /** + * Test the property 'env' + */ + @Test + public void envTest() { + // TODO: test env + } + + /** + * Test the property 'clusters' + */ + @Test + public void clustersTest() { + // TODO: test clusters + } + +} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleDTOTest.java index a1d7692f..d844ff80 100644 --- a/java-client/src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleDTOTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleDTOTest.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -20,12 +20,12 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import org.openapitools.client.model.OpenGrayReleaseRuleItemDTO; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; + /** * Model tests for OpenGrayReleaseRuleDTO */ diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTOTest.java index 7908e298..82ddd381 100644 --- a/java-client/src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTOTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTOTest.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -20,11 +20,11 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; + /** * Model tests for OpenGrayReleaseRuleItemDTO */ diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenInstanceConfigDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenInstanceConfigDTOTest.java index 388e8bc2..55f90127 100644 --- a/java-client/src/test/java/org/openapitools/client/model/OpenInstanceConfigDTOTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenInstanceConfigDTOTest.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -19,11 +19,11 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import org.openapitools.client.model.OpenReleaseDTO; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; + /** * Model tests for OpenInstanceConfigDTO */ diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenInstanceDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenInstanceDTOTest.java index ff84990b..70a39428 100644 --- a/java-client/src/test/java/org/openapitools/client/model/OpenInstanceDTOTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenInstanceDTOTest.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -20,12 +20,12 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import org.openapitools.client.model.OpenInstanceConfigDTO; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; + /** * Model tests for OpenInstanceDTO */ diff --git a/java-client/src/test/java/org/openapitools/client/model/ItemChangeSetsTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenItemChangeSetsTest.java similarity index 68% rename from java-client/src/test/java/org/openapitools/client/model/ItemChangeSetsTest.java rename to java-client/src/test/java/org/openapitools/client/model/OpenItemChangeSetsTest.java index 4915680f..eacdf9bf 100644 --- a/java-client/src/test/java/org/openapitools/client/model/ItemChangeSetsTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenItemChangeSetsTest.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -20,24 +20,24 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; -import org.openapitools.client.model.ItemDTO; +import org.openapitools.client.model.OpenItemDTO; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; + /** - * Model tests for ItemChangeSets + * Model tests for OpenItemChangeSets */ -public class ItemChangeSetsTest { - private final ItemChangeSets model = new ItemChangeSets(); +public class OpenItemChangeSetsTest { + private final OpenItemChangeSets model = new OpenItemChangeSets(); /** - * Model tests for ItemChangeSets + * Model tests for OpenItemChangeSets */ @Test - public void testItemChangeSets() { - // TODO: test ItemChangeSets + public void testOpenItemChangeSets() { + // TODO: test OpenItemChangeSets } /** diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenItemDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenItemDTOTest.java index c975e484..5ca8aabf 100644 --- a/java-client/src/test/java/org/openapitools/client/model/OpenItemDTOTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenItemDTOTest.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -19,10 +19,10 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; + /** * Model tests for OpenItemDTO */ diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenItemDiffsTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenItemDiffsTest.java new file mode 100644 index 00000000..b19fb101 --- /dev/null +++ b/java-client/src/test/java/org/openapitools/client/model/OpenItemDiffsTest.java @@ -0,0 +1,66 @@ +/* + * 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.openapitools.client.model.OpenItemChangeSets; +import org.openapitools.client.model.OpenNamespaceIdentifier; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + + +/** + * Model tests for OpenItemDiffs + */ +public class OpenItemDiffsTest { + private final OpenItemDiffs model = new OpenItemDiffs(); + + /** + * Model tests for OpenItemDiffs + */ + @Test + public void testOpenItemDiffs() { + // TODO: test OpenItemDiffs + } + + /** + * Test the property 'namespace' + */ + @Test + public void namespaceTest() { + // TODO: test namespace + } + + /** + * Test the property 'diffs' + */ + @Test + public void diffsTest() { + // TODO: test diffs + } + + /** + * Test the property 'extInfo' + */ + @Test + public void extInfoTest() { + // TODO: test extInfo + } + +} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceDTOTest.java index b04ceb59..8e49a84f 100644 --- a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceDTOTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceDTOTest.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -20,12 +20,12 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import org.openapitools.client.model.OpenItemDTO; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; + /** * Model tests for OpenNamespaceDTO */ diff --git a/java-client/src/test/java/org/openapitools/client/model/NamespaceIdentifierTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceIdentifierTest.java similarity index 53% rename from java-client/src/test/java/org/openapitools/client/model/NamespaceIdentifierTest.java rename to java-client/src/test/java/org/openapitools/client/model/OpenNamespaceIdentifierTest.java index 50b24a51..a0d57c8d 100644 --- a/java-client/src/test/java/org/openapitools/client/model/NamespaceIdentifierTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceIdentifierTest.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -19,22 +19,22 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; + /** - * Model tests for NamespaceIdentifier + * Model tests for OpenNamespaceIdentifier */ -public class NamespaceIdentifierTest { - private final NamespaceIdentifier model = new NamespaceIdentifier(); +public class OpenNamespaceIdentifierTest { + private final OpenNamespaceIdentifier model = new OpenNamespaceIdentifier(); /** - * Model tests for NamespaceIdentifier + * Model tests for OpenNamespaceIdentifier */ @Test - public void testNamespaceIdentifier() { - // TODO: test NamespaceIdentifier + public void testOpenNamespaceIdentifier() { + // TODO: test OpenNamespaceIdentifier } /** diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceLockDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceLockDTOTest.java index 03b32818..a6ee797c 100644 --- a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceLockDTOTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceLockDTOTest.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -19,10 +19,10 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; + /** * Model tests for OpenNamespaceLockDTO */ diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceSyncModelTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceSyncModelTest.java new file mode 100644 index 00000000..8c856260 --- /dev/null +++ b/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceSyncModelTest.java @@ -0,0 +1,60 @@ +/* + * Apollo OpenAPI + *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
+ * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.OpenItemDTO; +import org.openapitools.client.model.OpenNamespaceIdentifier; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + + +/** + * Model tests for OpenNamespaceSyncModel + */ +public class OpenNamespaceSyncModelTest { + private final OpenNamespaceSyncModel model = new OpenNamespaceSyncModel(); + + /** + * Model tests for OpenNamespaceSyncModel + */ + @Test + public void testOpenNamespaceSyncModel() { + // TODO: test OpenNamespaceSyncModel + } + + /** + * Test the property 'syncToNamespaces' + */ + @Test + public void syncToNamespacesTest() { + // TODO: test syncToNamespaces + } + + /** + * Test the property 'syncItems' + */ + @Test + public void syncItemsTest() { + // TODO: test syncItems + } + +} diff --git a/java-client/src/test/java/org/openapitools/client/model/NamespaceTextModelTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceTextModelTest.java similarity index 62% rename from java-client/src/test/java/org/openapitools/client/model/NamespaceTextModelTest.java rename to java-client/src/test/java/org/openapitools/client/model/OpenNamespaceTextModelTest.java index 97e1eaa2..92656809 100644 --- a/java-client/src/test/java/org/openapitools/client/model/NamespaceTextModelTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceTextModelTest.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -19,22 +19,22 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; + /** - * Model tests for NamespaceTextModel + * Model tests for OpenNamespaceTextModel */ -public class NamespaceTextModelTest { - private final NamespaceTextModel model = new NamespaceTextModel(); +public class OpenNamespaceTextModelTest { + private final OpenNamespaceTextModel model = new OpenNamespaceTextModel(); /** - * Model tests for NamespaceTextModel + * Model tests for OpenNamespaceTextModel */ @Test - public void testNamespaceTextModel() { - // TODO: test NamespaceTextModel + public void testOpenNamespaceTextModel() { + // TODO: test OpenNamespaceTextModel } /** diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenOrganizationDtoTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenOrganizationDtoTest.java index 6c49d825..4985d5d8 100644 --- a/java-client/src/test/java/org/openapitools/client/model/OpenOrganizationDtoTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenOrganizationDtoTest.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -19,10 +19,10 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; + /** * Model tests for OpenOrganizationDto */ diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenPageDTOOpenInstanceDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenPageDTOOpenInstanceDTOTest.java index becdcc7e..8fba79d5 100644 --- a/java-client/src/test/java/org/openapitools/client/model/OpenPageDTOOpenInstanceDTOTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenPageDTOOpenInstanceDTOTest.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -20,12 +20,12 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import org.openapitools.client.model.OpenInstanceDTO; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; + /** * Model tests for OpenPageDTOOpenInstanceDTO */ diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenPageDTOOpenItemDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenPageDTOOpenItemDTOTest.java index 80165b7d..17be7522 100644 --- a/java-client/src/test/java/org/openapitools/client/model/OpenPageDTOOpenItemDTOTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenPageDTOOpenItemDTOTest.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -20,12 +20,12 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import org.openapitools.client.model.OpenItemDTO; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; + /** * Model tests for OpenPageDTOOpenItemDTO */ diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenReleaseBOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenReleaseBOTest.java new file mode 100644 index 00000000..5d144216 --- /dev/null +++ b/java-client/src/test/java/org/openapitools/client/model/OpenReleaseBOTest.java @@ -0,0 +1,60 @@ +/* + * Apollo OpenAPI + *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
+ * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.KVEntity; +import org.openapitools.client.model.OpenReleaseDTO; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + + +/** + * Model tests for OpenReleaseBO + */ +public class OpenReleaseBOTest { + private final OpenReleaseBO model = new OpenReleaseBO(); + + /** + * Model tests for OpenReleaseBO + */ + @Test + public void testOpenReleaseBO() { + // TODO: test OpenReleaseBO + } + + /** + * Test the property 'baseInfo' + */ + @Test + public void baseInfoTest() { + // TODO: test baseInfo + } + + /** + * Test the property 'items' + */ + @Test + public void itemsTest() { + // TODO: test items + } + +} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenReleaseDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenReleaseDTOTest.java index 72685156..77720fca 100644 --- a/java-client/src/test/java/org/openapitools/client/model/OpenReleaseDTOTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenReleaseDTOTest.java @@ -1,9 +1,9 @@ /* * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -19,11 +19,12 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.MapString; +import java.util.HashMap; +import java.util.Map; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; + /** * Model tests for OpenReleaseDTO */ diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenapiV1AppsGet401ResponseTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenapiV1AppsGet401ResponseTest.java deleted file mode 100644 index 2dffa546..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenapiV1AppsGet401ResponseTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OpenapiV1AppsGet401Response - */ -public class OpenapiV1AppsGet401ResponseTest { - private final OpenapiV1AppsGet401Response model = new OpenapiV1AppsGet401Response(); - - /** - * Model tests for OpenapiV1AppsGet401Response - */ - @Test - public void testOpenapiV1AppsGet401Response() { - // TODO: test OpenapiV1AppsGet401Response - } - - /** - * Test the property 'message' - */ - @Test - public void messageTest() { - // TODO: test message - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenapiV1AppsPost400ResponseTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenapiV1AppsPost400ResponseTest.java deleted file mode 100644 index ce91f987..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenapiV1AppsPost400ResponseTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OpenapiV1AppsPost400Response - */ -public class OpenapiV1AppsPost400ResponseTest { - private final OpenapiV1AppsPost400Response model = new OpenapiV1AppsPost400Response(); - - /** - * Model tests for OpenapiV1AppsPost400Response - */ - @Test - public void testOpenapiV1AppsPost400Response() { - // TODO: test OpenapiV1AppsPost400Response - } - - /** - * Test the property 'message' - */ - @Test - public void messageTest() { - // TODO: test message - } - - /** - * Test the property 'exception' - */ - @Test - public void exceptionTest() { - // TODO: test exception - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenapiV1AppsPostRequestTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenapiV1AppsPostRequestTest.java deleted file mode 100644 index 664ec295..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenapiV1AppsPostRequestTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.OpenAppDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OpenapiV1AppsPostRequest - */ -public class OpenapiV1AppsPostRequestTest { - private final OpenapiV1AppsPostRequest model = new OpenapiV1AppsPostRequest(); - - /** - * Model tests for OpenapiV1AppsPostRequest - */ - @Test - public void testOpenapiV1AppsPostRequest() { - // TODO: test OpenapiV1AppsPostRequest - } - - /** - * Test the property 'assignAppRoleToSelf' - */ - @Test - public void assignAppRoleToSelfTest() { - // TODO: test assignAppRoleToSelf - } - - /** - * Test the property 'admins' - */ - @Test - public void adminsTest() { - // TODO: test admins - } - - /** - * Test the property 'app' - */ - @Test - public void appTest() { - // TODO: test app - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseTest.java deleted file mode 100644 index be3e25a9..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - */ -public class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseTest { - private final OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response model = new OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response(); - - /** - * Model tests for OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - */ - @Test - public void testOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response() { - // TODO: test OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - } - - /** - * Test the property 'valid' - */ - @Test - public void validTest() { - // TODO: test valid - } - - /** - * Test the property 'message' - */ - @Test - public void messageTest() { - // TODO: test message - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400ResponseTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400ResponseTest.java deleted file mode 100644 index 7641de24..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400ResponseTest.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - */ -public class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400ResponseTest { - private final OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response model = new OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response(); - - /** - * Model tests for OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - */ - @Test - public void testOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response() { - // TODO: test OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - } - - /** - * Test the property 'valid' - */ - @Test - public void validTest() { - // TODO: test valid - } - - /** - * Test the property 'message' - */ - @Test - public void messageTest() { - // TODO: test message - } - - /** - * Test the property 'errors' - */ - @Test - public void errorsTest() { - // TODO: test errors - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenapiV1EnvsEnvReleasesCompareGet200ResponseTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenapiV1EnvsEnvReleasesCompareGet200ResponseTest.java deleted file mode 100644 index 52e2ef00..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenapiV1EnvsEnvReleasesCompareGet200ResponseTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Change; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OpenapiV1EnvsEnvReleasesCompareGet200Response - */ -public class OpenapiV1EnvsEnvReleasesCompareGet200ResponseTest { - private final OpenapiV1EnvsEnvReleasesCompareGet200Response model = new OpenapiV1EnvsEnvReleasesCompareGet200Response(); - - /** - * Model tests for OpenapiV1EnvsEnvReleasesCompareGet200Response - */ - @Test - public void testOpenapiV1EnvsEnvReleasesCompareGet200Response() { - // TODO: test OpenapiV1EnvsEnvReleasesCompareGet200Response - } - - /** - * Test the property 'changes' - */ - @Test - public void changesTest() { - // TODO: test changes - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/ReleaseDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/ReleaseDTOTest.java deleted file mode 100644 index b5c4b4a1..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/ReleaseDTOTest.java +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ReleaseDTO - */ -public class ReleaseDTOTest { - private final ReleaseDTO model = new ReleaseDTO(); - - /** - * Model tests for ReleaseDTO - */ - @Test - public void testReleaseDTO() { - // TODO: test ReleaseDTO - } - - /** - * Test the property 'dataChangeCreatedBy' - */ - @Test - public void dataChangeCreatedByTest() { - // TODO: test dataChangeCreatedBy - } - - /** - * Test the property 'dataChangeLastModifiedBy' - */ - @Test - public void dataChangeLastModifiedByTest() { - // TODO: test dataChangeLastModifiedBy - } - - /** - * Test the property 'dataChangeCreatedByDisplayName' - */ - @Test - public void dataChangeCreatedByDisplayNameTest() { - // TODO: test dataChangeCreatedByDisplayName - } - - /** - * Test the property 'dataChangeLastModifiedByDisplayName' - */ - @Test - public void dataChangeLastModifiedByDisplayNameTest() { - // TODO: test dataChangeLastModifiedByDisplayName - } - - /** - * Test the property 'dataChangeCreatedTime' - */ - @Test - public void dataChangeCreatedTimeTest() { - // TODO: test dataChangeCreatedTime - } - - /** - * Test the property 'dataChangeLastModifiedTime' - */ - @Test - public void dataChangeLastModifiedTimeTest() { - // TODO: test dataChangeLastModifiedTime - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'releaseKey' - */ - @Test - public void releaseKeyTest() { - // TODO: test releaseKey - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - - /** - * Test the property 'clusterName' - */ - @Test - public void clusterNameTest() { - // TODO: test clusterName - } - - /** - * Test the property 'namespaceName' - */ - @Test - public void namespaceNameTest() { - // TODO: test namespaceName - } - - /** - * Test the property 'configurations' - */ - @Test - public void configurationsTest() { - // TODO: test configurations - } - - /** - * Test the property 'comment' - */ - @Test - public void commentTest() { - // TODO: test comment - } - - /** - * Test the property 'isAbandoned' - */ - @Test - public void isAbandonedTest() { - // TODO: test isAbandoned - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/RichResponseEntityTest.java b/java-client/src/test/java/org/openapitools/client/model/RichResponseEntityTest.java new file mode 100644 index 00000000..f63ee0a2 --- /dev/null +++ b/java-client/src/test/java/org/openapitools/client/model/RichResponseEntityTest.java @@ -0,0 +1,64 @@ +/* + * 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 RichResponseEntity + */ +public class RichResponseEntityTest { + private final RichResponseEntity model = new RichResponseEntity(); + + /** + * Model tests for RichResponseEntity + */ + @Test + public void testRichResponseEntity() { + // TODO: test RichResponseEntity + } + + /** + * 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 'body' + */ + @Test + public void bodyTest() { + // TODO: test body + } + +} diff --git a/python/.github/workflows/python.yml b/python/.github/workflows/python.yml deleted file mode 100644 index 3619e407..00000000 --- a/python/.github/workflows/python.yml +++ /dev/null @@ -1,34 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: apollo_openapi Python package - -on: [push, pull_request] - -permissions: - contents: read - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] - - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - pip install -r test-requirements.txt - - name: Test with pytest - run: | - pytest --cov=apollo_openapi diff --git a/python/.gitignore b/python/.gitignore index 43995bd4..a62e8aba 100644 --- a/python/.gitignore +++ b/python/.gitignore @@ -33,6 +33,7 @@ var/ # Installer logs pip-log.txt pip-delete-this-directory.txt +dev-requirements.txt.log # Unit test / coverage reports htmlcov/ diff --git a/python/.gitlab-ci.yml b/python/.gitlab-ci.yml index 718cf232..aec48a68 100644 --- a/python/.gitlab-ci.yml +++ b/python/.gitlab-ci.yml @@ -1,31 +1,24 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# # ref: https://docs.gitlab.com/ee/ci/README.html -# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml stages: - test -.pytest: +.tests: stage: test script: - pip install -r requirements.txt - pip install -r test-requirements.txt - pytest --cov=apollo_openapi -pytest-3.9: - extends: .pytest - image: python:3.9-alpine -pytest-3.10: - extends: .pytest - image: python:3.10-alpine -pytest-3.11: - extends: .pytest - image: python:3.11-alpine -pytest-3.12: - extends: .pytest - image: python:3.12-alpine -pytest-3.13: - extends: .pytest - image: python:3.13-alpine +test-3.5: + extends: .tests + image: python:3.5-alpine +test-3.6: + extends: .tests + image: python:3.6-alpine +test-3.7: + extends: .tests + image: python:3.7-alpine +test-3.8: + extends: .tests + image: python:3.8-alpine diff --git a/python/.openapi-generator/FILES b/python/.openapi-generator/FILES index 4ba58cc5..604290a9 100644 --- a/python/.openapi-generator/FILES +++ b/python/.openapi-generator/FILES @@ -1,161 +1,162 @@ -.github/workflows/python.yml .gitignore .gitlab-ci.yml .openapi-generator-ignore .travis.yml README.md apollo_openapi/__init__.py -apollo_openapi/api/__init__.py -apollo_openapi/api/app_management_api.py -apollo_openapi/api/cluster_management_api.py -apollo_openapi/api/instance_management_api.py -apollo_openapi/api/item_management_api.py -apollo_openapi/api/namespace_branch_management_api.py -apollo_openapi/api/namespace_management_api.py -apollo_openapi/api/organization_management_api.py -apollo_openapi/api/release_management_api.py apollo_openapi/api_client.py -apollo_openapi/api_response.py +apollo_openapi/apis/__init__.py +apollo_openapi/apis/tags/app_management_api.py +apollo_openapi/apis/tags/cluster_management_api.py +apollo_openapi/apis/tags/instance_management_api.py +apollo_openapi/apis/tags/item_management_api.py +apollo_openapi/apis/tags/namespace_branch_management_api.py +apollo_openapi/apis/tags/namespace_management_api.py +apollo_openapi/apis/tags/organization_management_api.py +apollo_openapi/apis/tags/release_management_api.py apollo_openapi/configuration.py apollo_openapi/exceptions.py +apollo_openapi/model/__init__.py +apollo_openapi/model/exception_response.py +apollo_openapi/model/exception_response.pyi +apollo_openapi/model/kv_entity.py +apollo_openapi/model/kv_entity.pyi +apollo_openapi/model/map_string.py +apollo_openapi/model/map_string.pyi +apollo_openapi/model/multi_response_entity.py +apollo_openapi/model/multi_response_entity.pyi +apollo_openapi/model/namespace_gray_del_release_dto.py +apollo_openapi/model/namespace_gray_del_release_dto.pyi +apollo_openapi/model/namespace_release_dto.py +apollo_openapi/model/namespace_release_dto.pyi +apollo_openapi/model/open_app_dto.py +apollo_openapi/model/open_app_dto.pyi +apollo_openapi/model/open_app_namespace_dto.py +apollo_openapi/model/open_app_namespace_dto.pyi +apollo_openapi/model/open_cluster_dto.py +apollo_openapi/model/open_cluster_dto.pyi +apollo_openapi/model/open_create_app_dto.py +apollo_openapi/model/open_create_app_dto.pyi +apollo_openapi/model/open_env_cluster_dto.py +apollo_openapi/model/open_env_cluster_dto.pyi +apollo_openapi/model/open_env_cluster_info.py +apollo_openapi/model/open_env_cluster_info.pyi +apollo_openapi/model/open_gray_release_rule_dto.py +apollo_openapi/model/open_gray_release_rule_dto.pyi +apollo_openapi/model/open_gray_release_rule_item_dto.py +apollo_openapi/model/open_gray_release_rule_item_dto.pyi +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_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_namespace_dto.py +apollo_openapi/model/open_namespace_dto.pyi +apollo_openapi/model/open_namespace_identifier.py +apollo_openapi/model/open_namespace_identifier.pyi +apollo_openapi/model/open_namespace_lock_dto.py +apollo_openapi/model/open_namespace_lock_dto.pyi +apollo_openapi/model/open_namespace_sync_model.py +apollo_openapi/model/open_namespace_sync_model.pyi +apollo_openapi/model/open_namespace_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 +apollo_openapi/model/open_release_dto.pyi +apollo_openapi/model/rich_response_entity.py +apollo_openapi/model/rich_response_entity.pyi +apollo_openapi/model/string_to_string_bool_map.py +apollo_openapi/model/string_to_string_bool_map.pyi apollo_openapi/models/__init__.py -apollo_openapi/models/change.py -apollo_openapi/models/cluster_dto.py -apollo_openapi/models/entity_pair_kv_entity.py -apollo_openapi/models/env_cluster_info.py -apollo_openapi/models/item_change_sets.py -apollo_openapi/models/item_dto.py -apollo_openapi/models/kv_entity.py -apollo_openapi/models/list_item_diffs.py -apollo_openapi/models/list_release_bo.py -apollo_openapi/models/map_string.py -apollo_openapi/models/namespace_gray_del_release_dto.py -apollo_openapi/models/namespace_identifier.py -apollo_openapi/models/namespace_release_dto.py -apollo_openapi/models/namespace_sync_model.py -apollo_openapi/models/namespace_text_model.py -apollo_openapi/models/open_app_dto.py -apollo_openapi/models/open_app_namespace_dto.py -apollo_openapi/models/open_cluster_dto.py -apollo_openapi/models/open_create_app_dto.py -apollo_openapi/models/open_env_cluster_dto.py -apollo_openapi/models/open_gray_release_rule_dto.py -apollo_openapi/models/open_gray_release_rule_item_dto.py -apollo_openapi/models/open_instance_config_dto.py -apollo_openapi/models/open_instance_dto.py -apollo_openapi/models/open_item_dto.py -apollo_openapi/models/open_namespace_dto.py -apollo_openapi/models/open_namespace_lock_dto.py -apollo_openapi/models/open_organization_dto.py -apollo_openapi/models/open_page_dto_open_instance_dto.py -apollo_openapi/models/open_page_dto_open_item_dto.py -apollo_openapi/models/open_release_dto.py -apollo_openapi/models/openapi_v1_apps_get401_response.py -apollo_openapi/models/openapi_v1_apps_post400_response.py -apollo_openapi/models/openapi_v1_apps_post_request.py -apollo_openapi/models/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response.py -apollo_openapi/models/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response.py -apollo_openapi/models/openapi_v1_envs_env_releases_compare_get200_response.py -apollo_openapi/models/release_dto.py -apollo_openapi/py.typed apollo_openapi/rest.py -docs/AppManagementApi.md -docs/Change.md -docs/ClusterDTO.md -docs/ClusterManagementApi.md -docs/EntityPairKVEntity.md -docs/EnvClusterInfo.md -docs/InstanceManagementApi.md -docs/ItemChangeSets.md -docs/ItemDTO.md -docs/ItemManagementApi.md -docs/KVEntity.md -docs/ListItemDiffs.md -docs/ListReleaseBO.md -docs/MapString.md -docs/NamespaceBranchManagementApi.md -docs/NamespaceGrayDelReleaseDTO.md -docs/NamespaceIdentifier.md -docs/NamespaceManagementApi.md -docs/NamespaceReleaseDTO.md -docs/NamespaceSyncModel.md -docs/NamespaceTextModel.md -docs/OpenAppDTO.md -docs/OpenAppNamespaceDTO.md -docs/OpenClusterDTO.md -docs/OpenCreateAppDTO.md -docs/OpenEnvClusterDTO.md -docs/OpenGrayReleaseRuleDTO.md -docs/OpenGrayReleaseRuleItemDTO.md -docs/OpenInstanceConfigDTO.md -docs/OpenInstanceDTO.md -docs/OpenItemDTO.md -docs/OpenNamespaceDTO.md -docs/OpenNamespaceLockDTO.md -docs/OpenOrganizationDto.md -docs/OpenPageDTOOpenInstanceDTO.md -docs/OpenPageDTOOpenItemDTO.md -docs/OpenReleaseDTO.md -docs/OpenapiV1AppsGet401Response.md -docs/OpenapiV1AppsPost400Response.md -docs/OpenapiV1AppsPostRequest.md -docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md -docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md -docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md -docs/OrganizationManagementApi.md -docs/ReleaseDTO.md -docs/ReleaseManagementApi.md +apollo_openapi/schemas.py +docs/apis/tags/AppManagementApi.md +docs/apis/tags/ClusterManagementApi.md +docs/apis/tags/InstanceManagementApi.md +docs/apis/tags/ItemManagementApi.md +docs/apis/tags/NamespaceBranchManagementApi.md +docs/apis/tags/NamespaceManagementApi.md +docs/apis/tags/OrganizationManagementApi.md +docs/apis/tags/ReleaseManagementApi.md +docs/models/ExceptionResponse.md +docs/models/KVEntity.md +docs/models/MapString.md +docs/models/MultiResponseEntity.md +docs/models/NamespaceGrayDelReleaseDTO.md +docs/models/NamespaceReleaseDTO.md +docs/models/OpenAppDTO.md +docs/models/OpenAppNamespaceDTO.md +docs/models/OpenClusterDTO.md +docs/models/OpenCreateAppDTO.md +docs/models/OpenEnvClusterDTO.md +docs/models/OpenEnvClusterInfo.md +docs/models/OpenGrayReleaseRuleDTO.md +docs/models/OpenGrayReleaseRuleItemDTO.md +docs/models/OpenInstanceConfigDTO.md +docs/models/OpenInstanceDTO.md +docs/models/OpenItemChangeSets.md +docs/models/OpenItemDTO.md +docs/models/OpenItemDiffs.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 +docs/models/StringToStringBoolMap.md git_push.sh -pyproject.toml requirements.txt setup.cfg setup.py test-requirements.txt test/__init__.py -test/test_app_management_api.py -test/test_change.py -test/test_cluster_dto.py -test/test_cluster_management_api.py -test/test_entity_pair_kv_entity.py -test/test_env_cluster_info.py -test/test_instance_management_api.py -test/test_item_change_sets.py -test/test_item_dto.py -test/test_item_management_api.py -test/test_kv_entity.py -test/test_list_item_diffs.py -test/test_list_release_bo.py -test/test_map_string.py -test/test_namespace_branch_management_api.py -test/test_namespace_gray_del_release_dto.py -test/test_namespace_identifier.py -test/test_namespace_management_api.py -test/test_namespace_release_dto.py -test/test_namespace_sync_model.py -test/test_namespace_text_model.py -test/test_open_app_dto.py -test/test_open_app_namespace_dto.py -test/test_open_cluster_dto.py -test/test_open_create_app_dto.py -test/test_open_env_cluster_dto.py -test/test_open_gray_release_rule_dto.py -test/test_open_gray_release_rule_item_dto.py -test/test_open_instance_config_dto.py -test/test_open_instance_dto.py -test/test_open_item_dto.py -test/test_open_namespace_dto.py -test/test_open_namespace_lock_dto.py -test/test_open_organization_dto.py -test/test_open_page_dto_open_instance_dto.py -test/test_open_page_dto_open_item_dto.py -test/test_open_release_dto.py -test/test_openapi_v1_apps_get401_response.py -test/test_openapi_v1_apps_post400_response.py -test/test_openapi_v1_apps_post_request.py -test/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response.py -test/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response.py -test/test_openapi_v1_envs_env_releases_compare_get200_response.py -test/test_organization_management_api.py -test/test_release_dto.py -test/test_release_management_api.py +test/test_models/__init__.py +test/test_models/test_exception_response.py +test/test_models/test_kv_entity.py +test/test_models/test_map_string.py +test/test_models/test_multi_response_entity.py +test/test_models/test_namespace_gray_del_release_dto.py +test/test_models/test_namespace_release_dto.py +test/test_models/test_open_app_dto.py +test/test_models/test_open_app_namespace_dto.py +test/test_models/test_open_cluster_dto.py +test/test_models/test_open_create_app_dto.py +test/test_models/test_open_env_cluster_dto.py +test/test_models/test_open_env_cluster_info.py +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_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_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 +test/test_models/test_string_to_string_bool_map.py tox.ini diff --git a/python/.openapi-generator/VERSION b/python/.openapi-generator/VERSION index 368fd8fd..826f5ce0 100644 --- a/python/.openapi-generator/VERSION +++ b/python/.openapi-generator/VERSION @@ -1 +1 @@ -7.15.0 +6.6.0 diff --git a/python/.travis.yml b/python/.travis.yml index 2a6931a7..3704acfe 100644 --- a/python/.travis.yml +++ b/python/.travis.yml @@ -1,14 +1,10 @@ # ref: https://docs.travis-ci.com/user/languages/python language: python python: - - "3.9" - - "3.10" - - "3.11" - - "3.12" - - "3.13" - # uncomment the following if needed - #- "3.13-dev" # 3.13 development branch - #- "nightly" # nightly build + - "3.5" + - "3.6" + - "3.7" + - "3.8" # command to install dependencies install: - "pip install -r requirements.txt" diff --git a/python/README.md b/python/README.md index 7da63907..c0452a4e 100644 --- a/python/README.md +++ b/python/README.md @@ -1,44 +1,121 @@ # apollo-openapi -Apollo配置中心OpenAPI接口文档 +

Apollo配置中心OpenAPI接口文档

-## 认证方式 +

认证方式

+

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

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

获取 Token 的方式:

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

使用示例

+
curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\
+-H \"Authorization: your_token_here\"
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 1.0.0 - Package version: 0.0.1 -- Generator version: 7.15.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen ## Requirements. -Python 3.9+ +Python >=3.7 + +## Migration from other generators like python and python-legacy + +### Changes +1. This generator uses spec case for all (object) property names and parameter names. + - So if the spec has a property name like camelCase, it will use camelCase rather than camel_case + - So you will need to update how you input and read properties to use spec case +2. Endpoint parameters are stored in dictionaries to prevent collisions (explanation below) + - So you will need to update how you pass data in to endpoints +3. Endpoint responses now include the original response, the deserialized response body, and (todo)the deserialized headers + - So you will need to update your code to use response.body to access deserialized data +4. All validated data is instantiated in an instance that subclasses all validated Schema classes and Decimal/str/list/tuple/frozendict/NoneClass/BoolClass/bytes/io.FileIO + - This means that you can use isinstance to check if a payload validated against a schema class + - This means that no data will be of type None/True/False + - ingested None will subclass NoneClass + - ingested True will subclass BoolClass + - ingested False will subclass BoolClass + - So if you need to check is True/False/None, instead use instance.is_true_oapg()/.is_false_oapg()/.is_none_oapg() +5. All validated class instances are immutable except for ones based on io.File + - This is because if properties were changed after validation, that validation would no longer apply + - So no changing values or property values after a class has been instantiated +6. String + Number types with formats + - String type data is stored as a string and if you need to access types based on its format like date, + date-time, uuid, number etc then you will need to use accessor functions on the instance + - type string + format: See .as_date_oapg, .as_datetime_oapg, .as_decimal_oapg, .as_uuid_oapg + - type number + format: See .as_float_oapg, .as_int_oapg + - this was done because openapi/json-schema defines constraints. string data may be type string with no format + keyword in one schema, and include a format constraint in another schema + - So if you need to access a string format based type, use as_date_oapg/as_datetime_oapg/as_decimal_oapg/as_uuid_oapg + - So if you need to access a number format based type, use as_int_oapg/as_float_oapg +7. Property access on AnyType(type unset) or object(dict) schemas + - Only required keys with valid python names are properties like .someProp and have type hints + - All optional keys may not exist, so properties are not defined for them + - One can access optional values with dict_instance['optionalProp'] and KeyError will be raised if it does not exist + - Use get_item_oapg if you need a way to always get a value whether or not the key exists + - If the key does not exist, schemas.unset is returned from calling dict_instance.get_item_oapg('optionalProp') + - All required and optional keys have type hints for this method, and @typing.overload is used + - A type hint is also generated for additionalProperties accessed using this method + - So you will need to update you code to use some_instance['optionalProp'] to access optional property + and additionalProperty values +8. The location of the api classes has changed + - Api classes are located in your_package.apis.tags.some_api + - This change was made to eliminate redundant code generation + - Legacy generators generated the same endpoint twice if it had > 1 tag on it + - This generator defines an endpoint in one class, then inherits that class to generate + apis by tags and by paths + - This change reduces code and allows quicker run time if you use the path apis + - path apis are at your_package.apis.paths.some_path + - Those apis will only load their needed models, which is less to load than all of the resources needed in a tag api + - So you will need to update your import paths to the api classes + +### Why are Oapg and _oapg used in class and method names? +Classes can have arbitrarily named properties set on them +Endpoints can have arbitrary operationId method names set +For those reasons, I use the prefix Oapg and _oapg to greatly reduce the likelihood of collisions +on protected + public classes/methods. +oapg stands for OpenApi Python Generator. + +### Object property spec case +This was done because when payloads are ingested, they can be validated against N number of schemas. +If the input signature used a different property name then that has mutated the payload. +So SchemaA and SchemaB must both see the camelCase spec named variable. +Also it is possible to send in two properties, named camelCase and camel_case in the same payload. +That use case should be support so spec case is used. + +### Parameter spec case +Parameters can be included in different locations including: +- query +- path +- header +- cookie + +Any of those parameters could use the same parameter names, so if every parameter +was included as an endpoint parameter in a function signature, they would collide. +For that reason, each of those inputs have been separated out into separate typed dictionaries: +- query_params +- path_params +- header_params +- cookie_params + +So when updating your code, you will need to pass endpoint parameters in using those +dictionaries. + +### Endpoint responses +Endpoint responses have been enriched to now include more information. +Any response reom an endpoint will now include the following properties: +response: urllib3.HTTPResponse +body: typing.Union[Unset, Schema] +headers: typing.Union[Unset, TODO] +Note: response header deserialization has not yet been added + ## Installation & Usage ### pip install @@ -69,20 +146,21 @@ Then import the package: import apollo_openapi ``` -### Tests - -Execute `pytest` to run the tests. - ## Getting Started Please follow the [installation procedure](#installation--usage) and then run the following: ```python +import time import apollo_openapi -from apollo_openapi.rest import ApiException 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 # 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( @@ -95,27 +173,40 @@ configuration = apollo_openapi.Configuration( # satisfies your auth use case. # Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] +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 = apollo_openapi.AppManagementApi(api_client) - app_id = 'app_id_example' # str | - namespace_name = 'namespace_name_example' # str | + api_instance = app_management_api.AppManagementApi(api_client) + open_create_app_dto = OpenCreateAppDTO( + assign_app_role_to_self=True, + admins=[ + "admins_example" + ], + app=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", + ), + ) # OpenCreateAppDTO | try: - # 删除AppNamespace - api_response = api_instance.openapi_v1_apps_app_id_appnamespaces_namespace_name_delete(app_id, namespace_name) - print("The response of AppManagementApi->openapi_v1_apps_app_id_appnamespaces_namespace_name_delete:\n") + # 创建应用 (original openapi) + api_response = api_instance.create_app(open_create_app_dto) pprint(api_response) - except ApiException as e: - print("Exception when calling AppManagementApi->openapi_v1_apps_app_id_appnamespaces_namespace_name_delete: %s\n" % e) - + except apollo_openapi.ApiException as e: + print("Exception when calling AppManagementApi->create_app: %s\n" % e) ``` ## Documentation for API Endpoints @@ -124,113 +215,102 @@ All URIs are relative to *http://localhost* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AppManagementApi* | [**openapi_v1_apps_app_id_appnamespaces_namespace_name_delete**](docs/AppManagementApi.md#openapi_v1_apps_app_id_appnamespaces_namespace_name_delete) | **DELETE** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 删除AppNamespace -*AppManagementApi* | [**openapi_v1_apps_app_id_delete**](docs/AppManagementApi.md#openapi_v1_apps_app_id_delete) | **DELETE** /openapi/v1/apps/{appId} | 删除应用 -*AppManagementApi* | [**openapi_v1_apps_app_id_env_clusters_get**](docs/AppManagementApi.md#openapi_v1_apps_app_id_env_clusters_get) | **GET** /openapi/v1/apps/{appId}/env-clusters | 获取应用的环境集群信息 -*AppManagementApi* | [**openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete**](docs/AppManagementApi.md#openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete) | **DELETE** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links | 删除关联的Namespace -*AppManagementApi* | [**openapi_v1_apps_app_id_get**](docs/AppManagementApi.md#openapi_v1_apps_app_id_get) | **GET** /openapi/v1/apps/{appId} | 获取单个应用信息 -*AppManagementApi* | [**openapi_v1_apps_app_id_miss_envs_get**](docs/AppManagementApi.md#openapi_v1_apps_app_id_miss_envs_get) | **GET** /openapi/v1/apps/{appId}/miss_envs | 查找缺失的环境 -*AppManagementApi* | [**openapi_v1_apps_app_id_namespaces_releases_status_get**](docs/AppManagementApi.md#openapi_v1_apps_app_id_namespaces_releases_status_get) | **GET** /openapi/v1/apps/{appId}/namespaces/releases/status | 获取应用下所有Namespace的发布状态 -*AppManagementApi* | [**openapi_v1_apps_app_id_navtree_get**](docs/AppManagementApi.md#openapi_v1_apps_app_id_navtree_get) | **GET** /openapi/v1/apps/{appId}/navtree | 获取应用导航树 -*AppManagementApi* | [**openapi_v1_apps_app_id_put**](docs/AppManagementApi.md#openapi_v1_apps_app_id_put) | **PUT** /openapi/v1/apps/{appId} | 更新应用 -*AppManagementApi* | [**openapi_v1_apps_by_self_get**](docs/AppManagementApi.md#openapi_v1_apps_by_self_get) | **GET** /openapi/v1/apps/by-self | 获取当前Consumer的应用列表(分页) -*AppManagementApi* | [**openapi_v1_apps_envs_env_post**](docs/AppManagementApi.md#openapi_v1_apps_envs_env_post) | **POST** /openapi/v1/apps/envs/{env} | 在指定环境创建应用 -*AppManagementApi* | [**openapi_v1_apps_get**](docs/AppManagementApi.md#openapi_v1_apps_get) | **GET** /openapi/v1/apps | 获取当前Consumer授权的应用列表 -*AppManagementApi* | [**openapi_v1_apps_post**](docs/AppManagementApi.md#openapi_v1_apps_post) | **POST** /openapi/v1/apps | 创建应用 -*ClusterManagementApi* | [**openapi_v1_apps_app_id_clusters_cluster_name_get**](docs/ClusterManagementApi.md#openapi_v1_apps_app_id_clusters_cluster_name_get) | **GET** /openapi/v1/apps/{appId}/clusters/{clusterName} | 获取指定集群信息 -*ClusterManagementApi* | [**openapi_v1_apps_app_id_clusters_post**](docs/ClusterManagementApi.md#openapi_v1_apps_app_id_clusters_post) | **POST** /openapi/v1/apps/{appId}/clusters | 创建集群 -*ClusterManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete**](docs/ClusterManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 删除集群 -*ClusterManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get**](docs/ClusterManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches | 获取命名空间分支信息 -*ClusterManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get**](docs/ClusterManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} | 获取指定的Namespace -*InstanceManagementApi* | [**openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get**](docs/InstanceManagementApi.md#openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get) | **GET** /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 获取命名空间下的实例数量 -*InstanceManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get**](docs/InstanceManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 查询不在指定发布版本中的实例 -*InstanceManagementApi* | [**openapi_v1_envs_env_releases_release_id_instances_get**](docs/InstanceManagementApi.md#openapi_v1_envs_env_releases_release_id_instances_get) | **GET** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) -*ItemManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete**](docs/ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key删除配置项 -*ItemManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get**](docs/ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过查询参数获取配置项(支持编码的key) -*ItemManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put**](docs/ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key更新配置项 -*ItemManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put**](docs/ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate | 通过文本批量修改配置项 -*ItemManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post**](docs/ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare | 对比命名空间配置差异 -*ItemManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get**](docs/ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 获取命名空间下的配置项列表 -*ItemManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete**](docs/ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 删除配置项 -*ItemManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get**](docs/ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 获取单个配置项 -*ItemManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put**](docs/ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 更新配置项 -*ItemManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post**](docs/ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 创建新的配置项 -*ItemManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post**](docs/ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert | 撤销配置项更改 -*ItemManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post**](docs/ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync | 同步配置项到多个命名空间 -*ItemManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post**](docs/ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate | 验证配置文本语法 -*NamespaceBranchManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post**](docs/NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch | 创建命名空间分支 -*NamespaceBranchManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete**](docs/NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 删除命名空间分支 -*NamespaceBranchManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post**](docs/NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases | 创建灰度删除发布 -*NamespaceBranchManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get**](docs/NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules | 获取分支灰度发布规则 -*NamespaceBranchManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put**](docs/NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules | 更新分支灰度发布规则 -*NamespaceBranchManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get**](docs/NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items | 获取分支下的配置项 -*NamespaceBranchManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post**](docs/NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge | 合并分支 -*NamespaceBranchManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch**](docs/NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch) | **PATCH** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 合并分支到主分支 -*NamespaceBranchManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post**](docs/NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases | 创建灰度发布 -*NamespaceManagementApi* | [**openapi_v1_appnamespaces_get**](docs/NamespaceManagementApi.md#openapi_v1_appnamespaces_get) | **GET** /openapi/v1/appnamespaces | 获取所有公共AppNamespace -*NamespaceManagementApi* | [**openapi_v1_apps_app_id_appnamespaces_get**](docs/NamespaceManagementApi.md#openapi_v1_apps_app_id_appnamespaces_get) | **GET** /openapi/v1/apps/{appId}/appnamespaces | 获取指定应用的AppNamespace -*NamespaceManagementApi* | [**openapi_v1_apps_app_id_appnamespaces_namespace_name_get**](docs/NamespaceManagementApi.md#openapi_v1_apps_app_id_appnamespaces_namespace_name_get) | **GET** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 获取指定的AppNamespace -*NamespaceManagementApi* | [**openapi_v1_apps_app_id_appnamespaces_post**](docs/NamespaceManagementApi.md#openapi_v1_apps_app_id_appnamespaces_post) | **POST** /openapi/v1/apps/{appId}/appnamespaces | 创建AppNamespace -*NamespaceManagementApi* | [**openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get**](docs/NamespaceManagementApi.md#openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check | 检查缺失的Namespace -*NamespaceManagementApi* | [**openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get**](docs/NamespaceManagementApi.md#openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association | 获取关联的公共Namespace -*NamespaceManagementApi* | [**openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get**](docs/NamespaceManagementApi.md#openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get) | **GET** /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances | 获取公共AppNamespace的所有实例 -*NamespaceManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get**](docs/NamespaceManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces | 获取指定集群下的所有Namespace -*NamespaceManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get**](docs/NamespaceManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock | 获取Namespace的锁状态 -*OrganizationManagementApi* | [**openapi_v1_organizations_get**](docs/OrganizationManagementApi.md#openapi_v1_organizations_get) | **GET** /openapi/v1/organizations | 获取所有组织信息 -*ReleaseManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get**](docs/ReleaseManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active | 获取活跃发布(分页) -*ReleaseManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get**](docs/ReleaseManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all | 获取所有发布(分页) -*ReleaseManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get**](docs/ReleaseManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest | 获取最新活跃发布 -*ReleaseManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post**](docs/ReleaseManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases | 创建发布 -*ReleaseManagementApi* | [**openapi_v1_envs_env_releases_compare_get**](docs/ReleaseManagementApi.md#openapi_v1_envs_env_releases_compare_get) | **GET** /openapi/v1/envs/{env}/releases/compare | 对比发布 -*ReleaseManagementApi* | [**openapi_v1_envs_env_releases_release_id_get**](docs/ReleaseManagementApi.md#openapi_v1_envs_env_releases_release_id_get) | **GET** /openapi/v1/envs/{env}/releases/{releaseId} | 获取发布详情 -*ReleaseManagementApi* | [**openapi_v1_envs_env_releases_release_id_rollback_put**](docs/ReleaseManagementApi.md#openapi_v1_envs_env_releases_release_id_rollback_put) | **PUT** /openapi/v1/envs/{env}/releases/{releaseId}/rollback | 回滚发布 - +*AppManagementApi* | [**create_app**](docs/apis/tags/AppManagementApi.md#create_app) | **post** /openapi/v1/apps | 创建应用 (original openapi) +*AppManagementApi* | [**create_app_in_env**](docs/apis/tags/AppManagementApi.md#create_app_in_env) | **post** /openapi/v1/apps/envs/{env} | 在指定环境创建应用(new added) +*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* | [**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* | [**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) +*InstanceManagementApi* | [**get_instance_count_by_namespace**](docs/apis/tags/InstanceManagementApi.md#get_instance_count_by_namespace) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 获取命名空间下的实例数量 (original openapi) +*InstanceManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get**](docs/apis/tags/InstanceManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int | 查询不在指定发布版本中的实例 (new added) +*InstanceManagementApi* | [**openapi_v1_envs_env_releases_release_id_instances_get**](docs/apis/tags/InstanceManagementApi.md#openapi_v1_envs_env_releases_release_id_instances_get) | **get** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) (new added) +*ItemManagementApi* | [**batch_update_items_by_text**](docs/apis/tags/ItemManagementApi.md#batch_update_items_by_text) | **put** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate | 通过文本批量修改配置项 (new added) +*ItemManagementApi* | [**compare_items**](docs/apis/tags/ItemManagementApi.md#compare_items) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare | 对比命名空间配置差异 (new added) +*ItemManagementApi* | [**create_item**](docs/apis/tags/ItemManagementApi.md#create_item) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 创建新的配置项 (original openapi) +*ItemManagementApi* | [**delete_item**](docs/apis/tags/ItemManagementApi.md#delete_item) | **delete** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 删除配置项 (original openapi) +*ItemManagementApi* | [**delete_item_by_encoded_key**](docs/apis/tags/ItemManagementApi.md#delete_item_by_encoded_key) | **delete** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key删除配置项 (original openapi) +*ItemManagementApi* | [**find_items_by_namespace**](docs/apis/tags/ItemManagementApi.md#find_items_by_namespace) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 获取命名空间下的配置项列表 (original openapi) +*ItemManagementApi* | [**get_branch_items**](docs/apis/tags/ItemManagementApi.md#get_branch_items) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items | 获取分支下的配置项 (new added) +*ItemManagementApi* | [**get_item**](docs/apis/tags/ItemManagementApi.md#get_item) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 获取单个配置项 (original openapi) +*ItemManagementApi* | [**get_item_by_encoded_key**](docs/apis/tags/ItemManagementApi.md#get_item_by_encoded_key) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过查询参数获取配置项(支持编码的key) (original openapi) +*ItemManagementApi* | [**revert_items**](docs/apis/tags/ItemManagementApi.md#revert_items) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert | 撤销配置项更改 (new added) +*ItemManagementApi* | [**sync_items**](docs/apis/tags/ItemManagementApi.md#sync_items) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync | 同步配置项到多个命名空间 (new added) +*ItemManagementApi* | [**update_item**](docs/apis/tags/ItemManagementApi.md#update_item) | **put** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 更新配置项 (original openapi) +*ItemManagementApi* | [**update_item_by_encoded_key**](docs/apis/tags/ItemManagementApi.md#update_item_by_encoded_key) | **put** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key更新配置项 (original openapi) +*ItemManagementApi* | [**validate_items**](docs/apis/tags/ItemManagementApi.md#validate_items) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate | 验证配置文本语法 (new added) +*NamespaceBranchManagementApi* | [**create_branch**](docs/apis/tags/NamespaceBranchManagementApi.md#create_branch) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches | 创建命名空间分支 (original openapi) +*NamespaceBranchManagementApi* | [**delete_branch**](docs/apis/tags/NamespaceBranchManagementApi.md#delete_branch) | **delete** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 删除命名空间分支 (original openapi) +*NamespaceBranchManagementApi* | [**find_branch**](docs/apis/tags/NamespaceBranchManagementApi.md#find_branch) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches | 获取命名空间分支信息 (original openapi) +*NamespaceBranchManagementApi* | [**get_branch_gray_rules**](docs/apis/tags/NamespaceBranchManagementApi.md#get_branch_gray_rules) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules | 获取分支灰度发布规则 (original openapi) +*NamespaceBranchManagementApi* | [**merge_branch**](docs/apis/tags/NamespaceBranchManagementApi.md#merge_branch) | **patch** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 合并分支到主分支 (new added) +*NamespaceBranchManagementApi* | [**update_branch_rules**](docs/apis/tags/NamespaceBranchManagementApi.md#update_branch_rules) | **put** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules | 更新分支灰度发布规则 (original openapi) +*NamespaceManagementApi* | [**check_namespace_integrity**](docs/apis/tags/NamespaceManagementApi.md#check_namespace_integrity) | **get** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check | 检查缺失的Namespace (new added) +*NamespaceManagementApi* | [**create_namespace**](docs/apis/tags/NamespaceManagementApi.md#create_namespace) | **post** /openapi/v1/apps/{appId}/appnamespaces | 创建AppNamespace (original openapi) +*NamespaceManagementApi* | [**delete_app_namespace**](docs/apis/tags/NamespaceManagementApi.md#delete_app_namespace) | **delete** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 删除AppNamespace (new added) +*NamespaceManagementApi* | [**delete_namespace_links**](docs/apis/tags/NamespaceManagementApi.md#delete_namespace_links) | **delete** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links | 删除关联的Namespace (new added) +*NamespaceManagementApi* | [**find_namespaces**](docs/apis/tags/NamespaceManagementApi.md#find_namespaces) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces | 获取指定集群下的所有Namespace (original openapi) +*NamespaceManagementApi* | [**get_app_namespace**](docs/apis/tags/NamespaceManagementApi.md#get_app_namespace) | **get** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 获取指定的AppNamespace (new added) +*NamespaceManagementApi* | [**get_app_namespaces**](docs/apis/tags/NamespaceManagementApi.md#get_app_namespaces) | **get** /openapi/v1/appnamespaces | 获取所有公共AppNamespace (new added) +*NamespaceManagementApi* | [**get_app_namespaces_by_app**](docs/apis/tags/NamespaceManagementApi.md#get_app_namespaces_by_app) | **get** /openapi/v1/apps/{appId}/appnamespaces | 获取指定应用的AppNamespace (new added) +*NamespaceManagementApi* | [**get_namespace_lock**](docs/apis/tags/NamespaceManagementApi.md#get_namespace_lock) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock | 获取Namespace的锁状态 (original openapi) +*NamespaceManagementApi* | [**get_namespaces_release_status**](docs/apis/tags/NamespaceManagementApi.md#get_namespaces_release_status) | **get** /openapi/v1/apps/{appId}/namespaces/releases/status | 获取应用下所有Namespace的发布状态 (new added) +*NamespaceManagementApi* | [**get_public_app_namespace_instances**](docs/apis/tags/NamespaceManagementApi.md#get_public_app_namespace_instances) | **get** /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances | 获取公共AppNamespace的所有实例 (new added) +*NamespaceManagementApi* | [**get_public_namespace_association**](docs/apis/tags/NamespaceManagementApi.md#get_public_namespace_association) | **get** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association | 获取关联的公共Namespace (new added) +*NamespaceManagementApi* | [**load_namespace**](docs/apis/tags/NamespaceManagementApi.md#load_namespace) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} | 获取指定的Namespace (original openapi) +*OrganizationManagementApi* | [**get_organization**](docs/apis/tags/OrganizationManagementApi.md#get_organization) | **get** /openapi/v1/organizations | 获取所有组织信息 (original openapi) +*ReleaseManagementApi* | [**create_gray_del_release**](docs/apis/tags/ReleaseManagementApi.md#create_gray_del_release) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases | 创建灰度删除发布 (original openapi) +*ReleaseManagementApi* | [**create_gray_release**](docs/apis/tags/ReleaseManagementApi.md#create_gray_release) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases | 创建灰度发布 (original openapi) +*ReleaseManagementApi* | [**create_release**](docs/apis/tags/ReleaseManagementApi.md#create_release) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases | 创建发布 (original openapi) +*ReleaseManagementApi* | [**find_active_releases**](docs/apis/tags/ReleaseManagementApi.md#find_active_releases) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active | 获取活跃发布(分页) (new added) +*ReleaseManagementApi* | [**find_all_releases**](docs/apis/tags/ReleaseManagementApi.md#find_all_releases) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all | 获取所有发布(分页) (new added) +*ReleaseManagementApi* | [**get_release_by_id**](docs/apis/tags/ReleaseManagementApi.md#get_release_by_id) | **get** /openapi/v1/envs/{env}/releases/{releaseId} | 获取发布详情 (new added) +*ReleaseManagementApi* | [**load_latest_active_release**](docs/apis/tags/ReleaseManagementApi.md#load_latest_active_release) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest | 获取最新活跃发布 (original openapi) +*ReleaseManagementApi* | [**merge**](docs/apis/tags/ReleaseManagementApi.md#merge) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge | 合并分支 (original openapi) +*ReleaseManagementApi* | [**rollback**](docs/apis/tags/ReleaseManagementApi.md#rollback) | **put** /openapi/v1/envs/{env}/releases/{releaseId}/rollback | 回滚发布 (original openapi) ## Documentation For Models - - [Change](docs/Change.md) - - [ClusterDTO](docs/ClusterDTO.md) - - [EntityPairKVEntity](docs/EntityPairKVEntity.md) - - [EnvClusterInfo](docs/EnvClusterInfo.md) - - [ItemChangeSets](docs/ItemChangeSets.md) - - [ItemDTO](docs/ItemDTO.md) - - [KVEntity](docs/KVEntity.md) - - [ListItemDiffs](docs/ListItemDiffs.md) - - [ListReleaseBO](docs/ListReleaseBO.md) - - [MapString](docs/MapString.md) - - [NamespaceGrayDelReleaseDTO](docs/NamespaceGrayDelReleaseDTO.md) - - [NamespaceIdentifier](docs/NamespaceIdentifier.md) - - [NamespaceReleaseDTO](docs/NamespaceReleaseDTO.md) - - [NamespaceSyncModel](docs/NamespaceSyncModel.md) - - [NamespaceTextModel](docs/NamespaceTextModel.md) - - [OpenAppDTO](docs/OpenAppDTO.md) - - [OpenAppNamespaceDTO](docs/OpenAppNamespaceDTO.md) - - [OpenClusterDTO](docs/OpenClusterDTO.md) - - [OpenCreateAppDTO](docs/OpenCreateAppDTO.md) - - [OpenEnvClusterDTO](docs/OpenEnvClusterDTO.md) - - [OpenGrayReleaseRuleDTO](docs/OpenGrayReleaseRuleDTO.md) - - [OpenGrayReleaseRuleItemDTO](docs/OpenGrayReleaseRuleItemDTO.md) - - [OpenInstanceConfigDTO](docs/OpenInstanceConfigDTO.md) - - [OpenInstanceDTO](docs/OpenInstanceDTO.md) - - [OpenItemDTO](docs/OpenItemDTO.md) - - [OpenNamespaceDTO](docs/OpenNamespaceDTO.md) - - [OpenNamespaceLockDTO](docs/OpenNamespaceLockDTO.md) - - [OpenOrganizationDto](docs/OpenOrganizationDto.md) - - [OpenPageDTOOpenInstanceDTO](docs/OpenPageDTOOpenInstanceDTO.md) - - [OpenPageDTOOpenItemDTO](docs/OpenPageDTOOpenItemDTO.md) - - [OpenReleaseDTO](docs/OpenReleaseDTO.md) - - [OpenapiV1AppsGet401Response](docs/OpenapiV1AppsGet401Response.md) - - [OpenapiV1AppsPost400Response](docs/OpenapiV1AppsPost400Response.md) - - [OpenapiV1AppsPostRequest](docs/OpenapiV1AppsPostRequest.md) - - [OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response](docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md) - - [OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response](docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md) - - [OpenapiV1EnvsEnvReleasesCompareGet200Response](docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md) - - [ReleaseDTO](docs/ReleaseDTO.md) - - - -## Documentation For Authorization + - [ExceptionResponse](docs/models/ExceptionResponse.md) + - [KVEntity](docs/models/KVEntity.md) + - [MapString](docs/models/MapString.md) + - [MultiResponseEntity](docs/models/MultiResponseEntity.md) + - [NamespaceGrayDelReleaseDTO](docs/models/NamespaceGrayDelReleaseDTO.md) + - [NamespaceReleaseDTO](docs/models/NamespaceReleaseDTO.md) + - [OpenAppDTO](docs/models/OpenAppDTO.md) + - [OpenAppNamespaceDTO](docs/models/OpenAppNamespaceDTO.md) + - [OpenClusterDTO](docs/models/OpenClusterDTO.md) + - [OpenCreateAppDTO](docs/models/OpenCreateAppDTO.md) + - [OpenEnvClusterDTO](docs/models/OpenEnvClusterDTO.md) + - [OpenEnvClusterInfo](docs/models/OpenEnvClusterInfo.md) + - [OpenGrayReleaseRuleDTO](docs/models/OpenGrayReleaseRuleDTO.md) + - [OpenGrayReleaseRuleItemDTO](docs/models/OpenGrayReleaseRuleItemDTO.md) + - [OpenInstanceConfigDTO](docs/models/OpenInstanceConfigDTO.md) + - [OpenInstanceDTO](docs/models/OpenInstanceDTO.md) + - [OpenItemChangeSets](docs/models/OpenItemChangeSets.md) + - [OpenItemDTO](docs/models/OpenItemDTO.md) + - [OpenItemDiffs](docs/models/OpenItemDiffs.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) + - [StringToStringBoolMap](docs/models/StringToStringBoolMap.md) +## Documentation For Authorization Authentication schemes defined for the API: @@ -246,3 +326,27 @@ Authentication schemes defined for the API: + + + + + + +## Notes for Large OpenAPI documents +If the OpenAPI document is large, imports in apollo_openapi.apis and apollo_openapi.models may fail with a +RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions: + +Solution 1: +Use specific imports for apis and models like: +- `from apollo_openapi.apis.default_api import DefaultApi` +- `from apollo_openapi.model.pet import Pet` + +Solution 1: +Before importing the package, adjust the maximum recursion limit as shown below: +``` +import sys +sys.setrecursionlimit(1500) +import apollo_openapi +from apollo_openapi.apis import * +from apollo_openapi.models import * +``` diff --git a/python/apollo_openapi/__init__.py b/python/apollo_openapi/__init__.py index dfc6915d..553e855f 100644 --- a/python/apollo_openapi/__init__.py +++ b/python/apollo_openapi/__init__.py @@ -5,209 +5,24 @@ """ Apollo OpenAPI - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` +

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 OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - + Generated by: https://openapi-generator.tech +""" __version__ = "0.0.1" -# Define package exports -__all__ = [ - "AppManagementApi", - "ClusterManagementApi", - "InstanceManagementApi", - "ItemManagementApi", - "NamespaceBranchManagementApi", - "NamespaceManagementApi", - "OrganizationManagementApi", - "ReleaseManagementApi", - "ApiResponse", - "ApiClient", - "Configuration", - "OpenApiException", - "ApiTypeError", - "ApiValueError", - "ApiKeyError", - "ApiAttributeError", - "ApiException", - "Change", - "ClusterDTO", - "EntityPairKVEntity", - "EnvClusterInfo", - "ItemChangeSets", - "ItemDTO", - "KVEntity", - "ListItemDiffs", - "ListReleaseBO", - "MapString", - "NamespaceGrayDelReleaseDTO", - "NamespaceIdentifier", - "NamespaceReleaseDTO", - "NamespaceSyncModel", - "NamespaceTextModel", - "OpenAppDTO", - "OpenAppNamespaceDTO", - "OpenClusterDTO", - "OpenCreateAppDTO", - "OpenEnvClusterDTO", - "OpenGrayReleaseRuleDTO", - "OpenGrayReleaseRuleItemDTO", - "OpenInstanceConfigDTO", - "OpenInstanceDTO", - "OpenItemDTO", - "OpenNamespaceDTO", - "OpenNamespaceLockDTO", - "OpenOrganizationDto", - "OpenPageDTOOpenInstanceDTO", - "OpenPageDTOOpenItemDTO", - "OpenReleaseDTO", - "OpenapiV1AppsGet401Response", - "OpenapiV1AppsPost400Response", - "OpenapiV1AppsPostRequest", - "OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response", - "OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response", - "OpenapiV1EnvsEnvReleasesCompareGet200Response", - "ReleaseDTO", -] - -if __import__("typing").TYPE_CHECKING: - # import apis into sdk package - from apollo_openapi.api.app_management_api import AppManagementApi as AppManagementApi - from apollo_openapi.api.cluster_management_api import ClusterManagementApi as ClusterManagementApi - from apollo_openapi.api.instance_management_api import InstanceManagementApi as InstanceManagementApi - from apollo_openapi.api.item_management_api import ItemManagementApi as ItemManagementApi - from apollo_openapi.api.namespace_branch_management_api import NamespaceBranchManagementApi as NamespaceBranchManagementApi - from apollo_openapi.api.namespace_management_api import NamespaceManagementApi as NamespaceManagementApi - from apollo_openapi.api.organization_management_api import OrganizationManagementApi as OrganizationManagementApi - from apollo_openapi.api.release_management_api import ReleaseManagementApi as ReleaseManagementApi - - # import ApiClient - from apollo_openapi.api_response import ApiResponse as ApiResponse - from apollo_openapi.api_client import ApiClient as ApiClient - from apollo_openapi.configuration import Configuration as Configuration - from apollo_openapi.exceptions import OpenApiException as OpenApiException - from apollo_openapi.exceptions import ApiTypeError as ApiTypeError - from apollo_openapi.exceptions import ApiValueError as ApiValueError - from apollo_openapi.exceptions import ApiKeyError as ApiKeyError - from apollo_openapi.exceptions import ApiAttributeError as ApiAttributeError - from apollo_openapi.exceptions import ApiException as ApiException - - # import models into sdk package - from apollo_openapi.models.change import Change as Change - from apollo_openapi.models.cluster_dto import ClusterDTO as ClusterDTO - from apollo_openapi.models.entity_pair_kv_entity import EntityPairKVEntity as EntityPairKVEntity - from apollo_openapi.models.env_cluster_info import EnvClusterInfo as EnvClusterInfo - from apollo_openapi.models.item_change_sets import ItemChangeSets as ItemChangeSets - from apollo_openapi.models.item_dto import ItemDTO as ItemDTO - from apollo_openapi.models.kv_entity import KVEntity as KVEntity - from apollo_openapi.models.list_item_diffs import ListItemDiffs as ListItemDiffs - from apollo_openapi.models.list_release_bo import ListReleaseBO as ListReleaseBO - from apollo_openapi.models.map_string import MapString as MapString - from apollo_openapi.models.namespace_gray_del_release_dto import NamespaceGrayDelReleaseDTO as NamespaceGrayDelReleaseDTO - from apollo_openapi.models.namespace_identifier import NamespaceIdentifier as NamespaceIdentifier - from apollo_openapi.models.namespace_release_dto import NamespaceReleaseDTO as NamespaceReleaseDTO - from apollo_openapi.models.namespace_sync_model import NamespaceSyncModel as NamespaceSyncModel - from apollo_openapi.models.namespace_text_model import NamespaceTextModel as NamespaceTextModel - from apollo_openapi.models.open_app_dto import OpenAppDTO as OpenAppDTO - from apollo_openapi.models.open_app_namespace_dto import OpenAppNamespaceDTO as OpenAppNamespaceDTO - from apollo_openapi.models.open_cluster_dto import OpenClusterDTO as OpenClusterDTO - from apollo_openapi.models.open_create_app_dto import OpenCreateAppDTO as OpenCreateAppDTO - from apollo_openapi.models.open_env_cluster_dto import OpenEnvClusterDTO as OpenEnvClusterDTO - from apollo_openapi.models.open_gray_release_rule_dto import OpenGrayReleaseRuleDTO as OpenGrayReleaseRuleDTO - from apollo_openapi.models.open_gray_release_rule_item_dto import OpenGrayReleaseRuleItemDTO as OpenGrayReleaseRuleItemDTO - from apollo_openapi.models.open_instance_config_dto import OpenInstanceConfigDTO as OpenInstanceConfigDTO - from apollo_openapi.models.open_instance_dto import OpenInstanceDTO as OpenInstanceDTO - from apollo_openapi.models.open_item_dto import OpenItemDTO as OpenItemDTO - from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO as OpenNamespaceDTO - from apollo_openapi.models.open_namespace_lock_dto import OpenNamespaceLockDTO as OpenNamespaceLockDTO - from apollo_openapi.models.open_organization_dto import OpenOrganizationDto as OpenOrganizationDto - from apollo_openapi.models.open_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO as OpenPageDTOOpenInstanceDTO - from apollo_openapi.models.open_page_dto_open_item_dto import OpenPageDTOOpenItemDTO as OpenPageDTOOpenItemDTO - from apollo_openapi.models.open_release_dto import OpenReleaseDTO as OpenReleaseDTO - from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response as OpenapiV1AppsGet401Response - from apollo_openapi.models.openapi_v1_apps_post400_response import OpenapiV1AppsPost400Response as OpenapiV1AppsPost400Response - from apollo_openapi.models.openapi_v1_apps_post_request import OpenapiV1AppsPostRequest as OpenapiV1AppsPostRequest - from apollo_openapi.models.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response as OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - from apollo_openapi.models.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response as OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - from apollo_openapi.models.openapi_v1_envs_env_releases_compare_get200_response import OpenapiV1EnvsEnvReleasesCompareGet200Response as OpenapiV1EnvsEnvReleasesCompareGet200Response - from apollo_openapi.models.release_dto import ReleaseDTO as ReleaseDTO - -else: - from lazy_imports import LazyModule, as_package, load - - load( - LazyModule( - *as_package(__file__), - ("__version__", __version__), - ("__all__", __all__), - """# import apis into sdk package -from apollo_openapi.api.app_management_api import AppManagementApi as AppManagementApi -from apollo_openapi.api.cluster_management_api import ClusterManagementApi as ClusterManagementApi -from apollo_openapi.api.instance_management_api import InstanceManagementApi as InstanceManagementApi -from apollo_openapi.api.item_management_api import ItemManagementApi as ItemManagementApi -from apollo_openapi.api.namespace_branch_management_api import NamespaceBranchManagementApi as NamespaceBranchManagementApi -from apollo_openapi.api.namespace_management_api import NamespaceManagementApi as NamespaceManagementApi -from apollo_openapi.api.organization_management_api import OrganizationManagementApi as OrganizationManagementApi -from apollo_openapi.api.release_management_api import ReleaseManagementApi as ReleaseManagementApi - # import ApiClient -from apollo_openapi.api_response import ApiResponse as ApiResponse -from apollo_openapi.api_client import ApiClient as ApiClient -from apollo_openapi.configuration import Configuration as Configuration -from apollo_openapi.exceptions import OpenApiException as OpenApiException -from apollo_openapi.exceptions import ApiTypeError as ApiTypeError -from apollo_openapi.exceptions import ApiValueError as ApiValueError -from apollo_openapi.exceptions import ApiKeyError as ApiKeyError -from apollo_openapi.exceptions import ApiAttributeError as ApiAttributeError -from apollo_openapi.exceptions import ApiException as ApiException - -# import models into sdk package -from apollo_openapi.models.change import Change as Change -from apollo_openapi.models.cluster_dto import ClusterDTO as ClusterDTO -from apollo_openapi.models.entity_pair_kv_entity import EntityPairKVEntity as EntityPairKVEntity -from apollo_openapi.models.env_cluster_info import EnvClusterInfo as EnvClusterInfo -from apollo_openapi.models.item_change_sets import ItemChangeSets as ItemChangeSets -from apollo_openapi.models.item_dto import ItemDTO as ItemDTO -from apollo_openapi.models.kv_entity import KVEntity as KVEntity -from apollo_openapi.models.list_item_diffs import ListItemDiffs as ListItemDiffs -from apollo_openapi.models.list_release_bo import ListReleaseBO as ListReleaseBO -from apollo_openapi.models.map_string import MapString as MapString -from apollo_openapi.models.namespace_gray_del_release_dto import NamespaceGrayDelReleaseDTO as NamespaceGrayDelReleaseDTO -from apollo_openapi.models.namespace_identifier import NamespaceIdentifier as NamespaceIdentifier -from apollo_openapi.models.namespace_release_dto import NamespaceReleaseDTO as NamespaceReleaseDTO -from apollo_openapi.models.namespace_sync_model import NamespaceSyncModel as NamespaceSyncModel -from apollo_openapi.models.namespace_text_model import NamespaceTextModel as NamespaceTextModel -from apollo_openapi.models.open_app_dto import OpenAppDTO as OpenAppDTO -from apollo_openapi.models.open_app_namespace_dto import OpenAppNamespaceDTO as OpenAppNamespaceDTO -from apollo_openapi.models.open_cluster_dto import OpenClusterDTO as OpenClusterDTO -from apollo_openapi.models.open_create_app_dto import OpenCreateAppDTO as OpenCreateAppDTO -from apollo_openapi.models.open_env_cluster_dto import OpenEnvClusterDTO as OpenEnvClusterDTO -from apollo_openapi.models.open_gray_release_rule_dto import OpenGrayReleaseRuleDTO as OpenGrayReleaseRuleDTO -from apollo_openapi.models.open_gray_release_rule_item_dto import OpenGrayReleaseRuleItemDTO as OpenGrayReleaseRuleItemDTO -from apollo_openapi.models.open_instance_config_dto import OpenInstanceConfigDTO as OpenInstanceConfigDTO -from apollo_openapi.models.open_instance_dto import OpenInstanceDTO as OpenInstanceDTO -from apollo_openapi.models.open_item_dto import OpenItemDTO as OpenItemDTO -from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO as OpenNamespaceDTO -from apollo_openapi.models.open_namespace_lock_dto import OpenNamespaceLockDTO as OpenNamespaceLockDTO -from apollo_openapi.models.open_organization_dto import OpenOrganizationDto as OpenOrganizationDto -from apollo_openapi.models.open_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO as OpenPageDTOOpenInstanceDTO -from apollo_openapi.models.open_page_dto_open_item_dto import OpenPageDTOOpenItemDTO as OpenPageDTOOpenItemDTO -from apollo_openapi.models.open_release_dto import OpenReleaseDTO as OpenReleaseDTO -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response as OpenapiV1AppsGet401Response -from apollo_openapi.models.openapi_v1_apps_post400_response import OpenapiV1AppsPost400Response as OpenapiV1AppsPost400Response -from apollo_openapi.models.openapi_v1_apps_post_request import OpenapiV1AppsPostRequest as OpenapiV1AppsPostRequest -from apollo_openapi.models.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response as OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response -from apollo_openapi.models.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response as OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response -from apollo_openapi.models.openapi_v1_envs_env_releases_compare_get200_response import OpenapiV1EnvsEnvReleasesCompareGet200Response as OpenapiV1EnvsEnvReleasesCompareGet200Response -from apollo_openapi.models.release_dto import ReleaseDTO as ReleaseDTO - -""", - name=__name__, - doc=__doc__, - ) - ) +from apollo_openapi.api_client import ApiClient + +# import Configuration +from apollo_openapi.configuration import Configuration + +# import exceptions +from apollo_openapi.exceptions import OpenApiException +from apollo_openapi.exceptions import ApiAttributeError +from apollo_openapi.exceptions import ApiTypeError +from apollo_openapi.exceptions import ApiValueError +from apollo_openapi.exceptions import ApiKeyError +from apollo_openapi.exceptions import ApiException diff --git a/python/apollo_openapi/api/__init__.py b/python/apollo_openapi/api/__init__.py deleted file mode 100644 index 97912d91..00000000 --- a/python/apollo_openapi/api/__init__.py +++ /dev/null @@ -1,34 +0,0 @@ -# flake8: noqa - -if __import__("typing").TYPE_CHECKING: - # import apis into api package - from apollo_openapi.api.app_management_api import AppManagementApi - from apollo_openapi.api.cluster_management_api import ClusterManagementApi - from apollo_openapi.api.instance_management_api import InstanceManagementApi - from apollo_openapi.api.item_management_api import ItemManagementApi - from apollo_openapi.api.namespace_branch_management_api import NamespaceBranchManagementApi - from apollo_openapi.api.namespace_management_api import NamespaceManagementApi - from apollo_openapi.api.organization_management_api import OrganizationManagementApi - from apollo_openapi.api.release_management_api import ReleaseManagementApi - -else: - from lazy_imports import LazyModule, as_package, load - - load( - LazyModule( - *as_package(__file__), - """# import apis into api package -from apollo_openapi.api.app_management_api import AppManagementApi -from apollo_openapi.api.cluster_management_api import ClusterManagementApi -from apollo_openapi.api.instance_management_api import InstanceManagementApi -from apollo_openapi.api.item_management_api import ItemManagementApi -from apollo_openapi.api.namespace_branch_management_api import NamespaceBranchManagementApi -from apollo_openapi.api.namespace_management_api import NamespaceManagementApi -from apollo_openapi.api.organization_management_api import OrganizationManagementApi -from apollo_openapi.api.release_management_api import ReleaseManagementApi - -""", - name=__name__, - doc=__doc__, - ) - ) diff --git a/python/apollo_openapi/api/app_management_api.py b/python/apollo_openapi/api/app_management_api.py deleted file mode 100644 index 106d0aeb..00000000 --- a/python/apollo_openapi/api/app_management_api.py +++ /dev/null @@ -1,3591 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import Field, StrictBool, StrictStr -from typing import Any, Dict, List, Optional -from typing_extensions import Annotated -from apollo_openapi.models.env_cluster_info import EnvClusterInfo -from apollo_openapi.models.open_app_dto import OpenAppDTO -from apollo_openapi.models.open_env_cluster_dto import OpenEnvClusterDTO -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response -from apollo_openapi.models.openapi_v1_apps_post_request import OpenapiV1AppsPostRequest - -from apollo_openapi.api_client import ApiClient, RequestSerialized -from apollo_openapi.api_response import ApiResponse -from apollo_openapi.rest import RESTResponseType - - -class AppManagementApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def openapi_v1_apps_app_id_appnamespaces_namespace_name_delete( - self, - app_id: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """删除AppNamespace - - DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - - :param app_id: (required) - :type app_id: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_appnamespaces_namespace_name_delete_serialize( - app_id=app_id, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_appnamespaces_namespace_name_delete_with_http_info( - self, - app_id: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """删除AppNamespace - - DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - - :param app_id: (required) - :type app_id: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_appnamespaces_namespace_name_delete_serialize( - app_id=app_id, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_appnamespaces_namespace_name_delete_without_preload_content( - self, - app_id: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """删除AppNamespace - - DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - - :param app_id: (required) - :type app_id: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_appnamespaces_namespace_name_delete_serialize( - app_id=app_id, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_appnamespaces_namespace_name_delete_serialize( - self, - app_id, - namespace_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_app_id_delete( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenapiV1AppsGet401Response: - """删除应用 - - DELETE /openapi/v1/apps/{appId} - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_delete_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_delete_with_http_info( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenapiV1AppsGet401Response]: - """删除应用 - - DELETE /openapi/v1/apps/{appId} - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_delete_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_delete_without_preload_content( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """删除应用 - - DELETE /openapi/v1/apps/{appId} - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_delete_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_delete_serialize( - self, - app_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/openapi/v1/apps/{appId}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_app_id_env_clusters_get( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[OpenEnvClusterDTO]: - """获取应用的环境集群信息 - - GET /openapi/v1/apps/{appId}/env-clusters - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_env_clusters_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenEnvClusterDTO]", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_env_clusters_get_with_http_info( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[OpenEnvClusterDTO]]: - """获取应用的环境集群信息 - - GET /openapi/v1/apps/{appId}/env-clusters - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_env_clusters_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenEnvClusterDTO]", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_env_clusters_get_without_preload_content( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取应用的环境集群信息 - - GET /openapi/v1/apps/{appId}/env-clusters - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_env_clusters_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenEnvClusterDTO]", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_env_clusters_get_serialize( - self, - app_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/apps/{appId}/env-clusters', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """删除关联的Namespace - - DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """删除关联的Namespace - - DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """删除关联的Namespace - - DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_app_id_get( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenAppDTO: - """获取单个应用信息 - - GET /openapi/v1/apps/{appId} - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_get_with_http_info( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenAppDTO]: - """获取单个应用信息 - - GET /openapi/v1/apps/{appId} - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_get_without_preload_content( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取单个应用信息 - - GET /openapi/v1/apps/{appId} - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_get_serialize( - self, - app_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/apps/{appId}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_app_id_miss_envs_get( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[str]: - """查找缺失的环境 - - GET /openapi/v1/apps/{appId}/miss_envs - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_miss_envs_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[str]", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_miss_envs_get_with_http_info( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[str]]: - """查找缺失的环境 - - GET /openapi/v1/apps/{appId}/miss_envs - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_miss_envs_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[str]", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_miss_envs_get_without_preload_content( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """查找缺失的环境 - - GET /openapi/v1/apps/{appId}/miss_envs - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_miss_envs_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[str]", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_miss_envs_get_serialize( - self, - app_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/apps/{appId}/miss_envs', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_app_id_namespaces_releases_status_get( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Dict[str, Dict[str, bool]]: - """获取应用下所有Namespace的发布状态 - - GET /openapi/v1/apps/{appId}/namespaces/releases/status - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_namespaces_releases_status_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, Dict[str, bool]]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_namespaces_releases_status_get_with_http_info( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Dict[str, Dict[str, bool]]]: - """获取应用下所有Namespace的发布状态 - - GET /openapi/v1/apps/{appId}/namespaces/releases/status - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_namespaces_releases_status_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, Dict[str, bool]]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_namespaces_releases_status_get_without_preload_content( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取应用下所有Namespace的发布状态 - - GET /openapi/v1/apps/{appId}/namespaces/releases/status - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_namespaces_releases_status_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, Dict[str, bool]]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_namespaces_releases_status_get_serialize( - self, - app_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/apps/{appId}/namespaces/releases/status', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_app_id_navtree_get( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[EnvClusterInfo]: - """获取应用导航树 - - GET /openapi/v1/apps/{appId}/navtree - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_navtree_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[EnvClusterInfo]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_navtree_get_with_http_info( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[EnvClusterInfo]]: - """获取应用导航树 - - GET /openapi/v1/apps/{appId}/navtree - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_navtree_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[EnvClusterInfo]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_navtree_get_without_preload_content( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取应用导航树 - - GET /openapi/v1/apps/{appId}/navtree - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_navtree_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[EnvClusterInfo]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_navtree_get_serialize( - self, - app_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/apps/{appId}/navtree', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_app_id_put( - self, - app_id: StrictStr, - open_app_dto: OpenAppDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenAppDTO: - """更新应用 - - PUT /openapi/v1/apps/{appId} - - :param app_id: (required) - :type app_id: str - :param open_app_dto: (required) - :type open_app_dto: OpenAppDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_put_serialize( - app_id=app_id, - open_app_dto=open_app_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_put_with_http_info( - self, - app_id: StrictStr, - open_app_dto: OpenAppDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenAppDTO]: - """更新应用 - - PUT /openapi/v1/apps/{appId} - - :param app_id: (required) - :type app_id: str - :param open_app_dto: (required) - :type open_app_dto: OpenAppDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_put_serialize( - app_id=app_id, - open_app_dto=open_app_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_put_without_preload_content( - self, - app_id: StrictStr, - open_app_dto: OpenAppDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """更新应用 - - PUT /openapi/v1/apps/{appId} - - :param app_id: (required) - :type app_id: str - :param open_app_dto: (required) - :type open_app_dto: OpenAppDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_put_serialize( - app_id=app_id, - open_app_dto=open_app_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_put_serialize( - self, - app_id, - open_app_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if open_app_dto is not None: - _body_params = open_app_dto - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/openapi/v1/apps/{appId}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_by_self_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[OpenAppDTO]: - """获取当前Consumer的应用列表(分页) - - GET /openapi/v1/apps/by-self - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_by_self_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenAppDTO]", - '401': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_by_self_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[OpenAppDTO]]: - """获取当前Consumer的应用列表(分页) - - GET /openapi/v1/apps/by-self - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_by_self_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenAppDTO]", - '401': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_by_self_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取当前Consumer的应用列表(分页) - - GET /openapi/v1/apps/by-self - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_by_self_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenAppDTO]", - '401': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_by_self_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/apps/by-self', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_envs_env_post( - self, - env: StrictStr, - open_app_dto: OpenAppDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenapiV1AppsGet401Response: - """在指定环境创建应用 - - POST /openapi/v1/apps/envs/{env} - - :param env: (required) - :type env: str - :param open_app_dto: (required) - :type open_app_dto: OpenAppDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_envs_env_post_serialize( - env=env, - open_app_dto=open_app_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_envs_env_post_with_http_info( - self, - env: StrictStr, - open_app_dto: OpenAppDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenapiV1AppsGet401Response]: - """在指定环境创建应用 - - POST /openapi/v1/apps/envs/{env} - - :param env: (required) - :type env: str - :param open_app_dto: (required) - :type open_app_dto: OpenAppDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_envs_env_post_serialize( - env=env, - open_app_dto=open_app_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_envs_env_post_without_preload_content( - self, - env: StrictStr, - open_app_dto: OpenAppDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """在指定环境创建应用 - - POST /openapi/v1/apps/envs/{env} - - :param env: (required) - :type env: str - :param open_app_dto: (required) - :type open_app_dto: OpenAppDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_envs_env_post_serialize( - env=env, - open_app_dto=open_app_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_envs_env_post_serialize( - self, - env, - open_app_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if env is not None: - _path_params['env'] = env - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if open_app_dto is not None: - _body_params = open_app_dto - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/openapi/v1/apps/envs/{env}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_get( - self, - authorized: Annotated[Optional[StrictStr], Field(description="是否只返回授权的应用")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[OpenAppDTO]: - """获取当前Consumer授权的应用列表 - - GET /openapi/v1/apps?authorized=true - - :param authorized: 是否只返回授权的应用 - :type authorized: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_get_serialize( - authorized=authorized, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenAppDTO]", - '401': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_get_with_http_info( - self, - authorized: Annotated[Optional[StrictStr], Field(description="是否只返回授权的应用")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[OpenAppDTO]]: - """获取当前Consumer授权的应用列表 - - GET /openapi/v1/apps?authorized=true - - :param authorized: 是否只返回授权的应用 - :type authorized: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_get_serialize( - authorized=authorized, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenAppDTO]", - '401': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_get_without_preload_content( - self, - authorized: Annotated[Optional[StrictStr], Field(description="是否只返回授权的应用")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取当前Consumer授权的应用列表 - - GET /openapi/v1/apps?authorized=true - - :param authorized: 是否只返回授权的应用 - :type authorized: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_get_serialize( - authorized=authorized, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenAppDTO]", - '401': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_get_serialize( - self, - authorized, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if authorized is not None: - - _query_params.append(('authorized', authorized)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/apps', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_post( - self, - openapi_v1_apps_post_request: OpenapiV1AppsPostRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenAppDTO: - """创建应用 - - POST /openapi/v1/apps - - :param openapi_v1_apps_post_request: (required) - :type openapi_v1_apps_post_request: OpenapiV1AppsPostRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_post_serialize( - openapi_v1_apps_post_request=openapi_v1_apps_post_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppDTO", - '400': "OpenapiV1AppsPost400Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_post_with_http_info( - self, - openapi_v1_apps_post_request: OpenapiV1AppsPostRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenAppDTO]: - """创建应用 - - POST /openapi/v1/apps - - :param openapi_v1_apps_post_request: (required) - :type openapi_v1_apps_post_request: OpenapiV1AppsPostRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_post_serialize( - openapi_v1_apps_post_request=openapi_v1_apps_post_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppDTO", - '400': "OpenapiV1AppsPost400Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_post_without_preload_content( - self, - openapi_v1_apps_post_request: OpenapiV1AppsPostRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """创建应用 - - POST /openapi/v1/apps - - :param openapi_v1_apps_post_request: (required) - :type openapi_v1_apps_post_request: OpenapiV1AppsPostRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_post_serialize( - openapi_v1_apps_post_request=openapi_v1_apps_post_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppDTO", - '400': "OpenapiV1AppsPost400Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_post_serialize( - self, - openapi_v1_apps_post_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if openapi_v1_apps_post_request is not None: - _body_params = openapi_v1_apps_post_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/openapi/v1/apps', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/python/apollo_openapi/api/cluster_management_api.py b/python/apollo_openapi/api/cluster_management_api.py deleted file mode 100644 index de10b520..00000000 --- a/python/apollo_openapi/api/cluster_management_api.py +++ /dev/null @@ -1,1545 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import StrictBool, StrictStr -from apollo_openapi.models.open_cluster_dto import OpenClusterDTO -from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response - -from apollo_openapi.api_client import ApiClient, RequestSerialized -from apollo_openapi.api_response import ApiResponse -from apollo_openapi.rest import RESTResponseType - - -class ClusterManagementApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def openapi_v1_apps_app_id_clusters_cluster_name_get( - self, - app_id: StrictStr, - cluster_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenClusterDTO: - """获取指定集群信息 - - GET /openapi/v1/apps/{appId}/clusters/{clusterName} - - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_clusters_cluster_name_get_serialize( - app_id=app_id, - cluster_name=cluster_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenClusterDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_clusters_cluster_name_get_with_http_info( - self, - app_id: StrictStr, - cluster_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenClusterDTO]: - """获取指定集群信息 - - GET /openapi/v1/apps/{appId}/clusters/{clusterName} - - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_clusters_cluster_name_get_serialize( - app_id=app_id, - cluster_name=cluster_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenClusterDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_clusters_cluster_name_get_without_preload_content( - self, - app_id: StrictStr, - cluster_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取指定集群信息 - - GET /openapi/v1/apps/{appId}/clusters/{clusterName} - - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_clusters_cluster_name_get_serialize( - app_id=app_id, - cluster_name=cluster_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenClusterDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_clusters_cluster_name_get_serialize( - self, - app_id, - cluster_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/apps/{appId}/clusters/{clusterName}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_app_id_clusters_post( - self, - app_id: StrictStr, - open_cluster_dto: OpenClusterDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenClusterDTO: - """创建集群 - - POST /openapi/v1/apps/{appId}/clusters - - :param app_id: (required) - :type app_id: str - :param open_cluster_dto: (required) - :type open_cluster_dto: OpenClusterDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_clusters_post_serialize( - app_id=app_id, - open_cluster_dto=open_cluster_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenClusterDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_clusters_post_with_http_info( - self, - app_id: StrictStr, - open_cluster_dto: OpenClusterDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenClusterDTO]: - """创建集群 - - POST /openapi/v1/apps/{appId}/clusters - - :param app_id: (required) - :type app_id: str - :param open_cluster_dto: (required) - :type open_cluster_dto: OpenClusterDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_clusters_post_serialize( - app_id=app_id, - open_cluster_dto=open_cluster_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenClusterDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_clusters_post_without_preload_content( - self, - app_id: StrictStr, - open_cluster_dto: OpenClusterDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """创建集群 - - POST /openapi/v1/apps/{appId}/clusters - - :param app_id: (required) - :type app_id: str - :param open_cluster_dto: (required) - :type open_cluster_dto: OpenClusterDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_clusters_post_serialize( - app_id=app_id, - open_cluster_dto=open_cluster_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenClusterDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_clusters_post_serialize( - self, - app_id, - open_cluster_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if open_cluster_dto is not None: - _body_params = open_cluster_dto - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/openapi/v1/apps/{appId}/clusters', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete( - self, - env: StrictStr, - app_id: StrictStr, - cluster_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenapiV1AppsGet401Response: - """删除集群 - - DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - - :param env: (required) - :type env: str - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete_serialize( - env=env, - app_id=app_id, - cluster_name=cluster_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete_with_http_info( - self, - env: StrictStr, - app_id: StrictStr, - cluster_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenapiV1AppsGet401Response]: - """删除集群 - - DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - - :param env: (required) - :type env: str - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete_serialize( - env=env, - app_id=app_id, - cluster_name=cluster_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete_without_preload_content( - self, - env: StrictStr, - app_id: StrictStr, - cluster_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """删除集群 - - DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - - :param env: (required) - :type env: str - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete_serialize( - env=env, - app_id=app_id, - cluster_name=cluster_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete_serialize( - self, - env, - app_id, - cluster_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if env is not None: - _path_params['env'] = env - if app_id is not None: - _path_params['appId'] = app_id - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenNamespaceDTO: - """获取命名空间分支信息 - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenNamespaceDTO]: - """获取命名空间分支信息 - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取命名空间分支信息 - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - fill_item_detail: StrictBool, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenNamespaceDTO: - """获取指定的Namespace - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param fill_item_detail: (required) - :type fill_item_detail: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - fill_item_detail=fill_item_detail, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - fill_item_detail: StrictBool, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenNamespaceDTO]: - """获取指定的Namespace - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param fill_item_detail: (required) - :type fill_item_detail: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - fill_item_detail=fill_item_detail, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - fill_item_detail: StrictBool, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取指定的Namespace - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param fill_item_detail: (required) - :type fill_item_detail: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - fill_item_detail=fill_item_detail, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - fill_item_detail, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - if fill_item_detail is not None: - - _query_params.append(('fillItemDetail', fill_item_detail)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/python/apollo_openapi/api/instance_management_api.py b/python/apollo_openapi/api/instance_management_api.py deleted file mode 100644 index f7c1c636..00000000 --- a/python/apollo_openapi/api/instance_management_api.py +++ /dev/null @@ -1,964 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import Field, StrictInt, StrictStr -from typing import List, Optional -from typing_extensions import Annotated -from apollo_openapi.models.open_instance_dto import OpenInstanceDTO -from apollo_openapi.models.open_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO - -from apollo_openapi.api_client import ApiClient, RequestSerialized -from apollo_openapi.api_response import ApiResponse -from apollo_openapi.rest import RESTResponseType - - -class InstanceManagementApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get( - self, - app_id: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> int: - """获取命名空间下的实例数量 - - GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances - - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get_serialize( - app_id=app_id, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "int", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get_with_http_info( - self, - app_id: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[int]: - """获取命名空间下的实例数量 - - GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances - - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get_serialize( - app_id=app_id, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "int", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get_without_preload_content( - self, - app_id: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取命名空间下的实例数量 - - GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances - - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get_serialize( - app_id=app_id, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "int", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get_serialize( - self, - app_id, - cluster_name, - namespace_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get( - self, - env: StrictStr, - app_id: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - exclude_releases: Annotated[Optional[StrictStr], Field(description="排除的发布ID列表,用逗号分隔")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[OpenInstanceDTO]: - """查询不在指定发布版本中的实例 - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 - - :param env: (required) - :type env: str - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param exclude_releases: 排除的发布ID列表,用逗号分隔 - :type exclude_releases: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get_serialize( - env=env, - app_id=app_id, - cluster_name=cluster_name, - namespace_name=namespace_name, - exclude_releases=exclude_releases, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenInstanceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get_with_http_info( - self, - env: StrictStr, - app_id: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - exclude_releases: Annotated[Optional[StrictStr], Field(description="排除的发布ID列表,用逗号分隔")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[OpenInstanceDTO]]: - """查询不在指定发布版本中的实例 - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 - - :param env: (required) - :type env: str - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param exclude_releases: 排除的发布ID列表,用逗号分隔 - :type exclude_releases: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get_serialize( - env=env, - app_id=app_id, - cluster_name=cluster_name, - namespace_name=namespace_name, - exclude_releases=exclude_releases, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenInstanceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get_without_preload_content( - self, - env: StrictStr, - app_id: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - exclude_releases: Annotated[Optional[StrictStr], Field(description="排除的发布ID列表,用逗号分隔")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """查询不在指定发布版本中的实例 - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 - - :param env: (required) - :type env: str - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param exclude_releases: 排除的发布ID列表,用逗号分隔 - :type exclude_releases: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get_serialize( - env=env, - app_id=app_id, - cluster_name=cluster_name, - namespace_name=namespace_name, - exclude_releases=exclude_releases, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenInstanceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get_serialize( - self, - env, - app_id, - cluster_name, - namespace_name, - exclude_releases, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if env is not None: - _path_params['env'] = env - if app_id is not None: - _path_params['appId'] = app_id - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - if exclude_releases is not None: - - _query_params.append(('excludeReleases', exclude_releases)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_releases_release_id_instances_get( - self, - env: StrictStr, - release_id: StrictInt, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenPageDTOOpenInstanceDTO: - """根据发布版本查询实例(支持分页) - - GET /openapi/v1/envs/{env}/releases/{releaseId}/instances - - :param env: (required) - :type env: str - :param release_id: (required) - :type release_id: int - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_releases_release_id_instances_get_serialize( - env=env, - release_id=release_id, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenPageDTOOpenInstanceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_releases_release_id_instances_get_with_http_info( - self, - env: StrictStr, - release_id: StrictInt, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenPageDTOOpenInstanceDTO]: - """根据发布版本查询实例(支持分页) - - GET /openapi/v1/envs/{env}/releases/{releaseId}/instances - - :param env: (required) - :type env: str - :param release_id: (required) - :type release_id: int - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_releases_release_id_instances_get_serialize( - env=env, - release_id=release_id, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenPageDTOOpenInstanceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_releases_release_id_instances_get_without_preload_content( - self, - env: StrictStr, - release_id: StrictInt, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """根据发布版本查询实例(支持分页) - - GET /openapi/v1/envs/{env}/releases/{releaseId}/instances - - :param env: (required) - :type env: str - :param release_id: (required) - :type release_id: int - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_releases_release_id_instances_get_serialize( - env=env, - release_id=release_id, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenPageDTOOpenInstanceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_releases_release_id_instances_get_serialize( - self, - env, - release_id, - page, - size, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if env is not None: - _path_params['env'] = env - if release_id is not None: - _path_params['releaseId'] = release_id - # process the query parameters - if page is not None: - - _query_params.append(('page', page)) - - if size is not None: - - _query_params.append(('size', size)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/releases/{releaseId}/instances', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/python/apollo_openapi/api/item_management_api.py b/python/apollo_openapi/api/item_management_api.py deleted file mode 100644 index 9f9bf1b1..00000000 --- a/python/apollo_openapi/api/item_management_api.py +++ /dev/null @@ -1,4464 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import StrictBool, StrictInt, StrictStr -from typing import Any, Dict, List -from apollo_openapi.models.list_item_diffs import ListItemDiffs -from apollo_openapi.models.namespace_sync_model import NamespaceSyncModel -from apollo_openapi.models.namespace_text_model import NamespaceTextModel -from apollo_openapi.models.open_item_dto import OpenItemDTO -from apollo_openapi.models.open_page_dto_open_item_dto import OpenPageDTOOpenItemDTO -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response -from apollo_openapi.models.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - -from apollo_openapi.api_client import ApiClient, RequestSerialized -from apollo_openapi.api_response import ApiResponse -from apollo_openapi.rest import RESTResponseType - - -class ItemManagementApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """通过编码的key删除配置项 - - DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """通过编码的key删除配置项 - - DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """通过编码的key删除配置项 - - DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - key, - operator, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - if key is not None: - _path_params['key'] = key - # process the query parameters - if operator is not None: - - _query_params.append(('operator', operator)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenItemDTO: - """通过查询参数获取配置项(支持编码的key) - - GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenItemDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenItemDTO]: - """通过查询参数获取配置项(支持编码的key) - - GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenItemDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """通过查询参数获取配置项(支持编码的key) - - GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenItemDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - key, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - if key is not None: - _path_params['key'] = key - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - create_if_not_exists: StrictBool, - open_item_dto: OpenItemDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenapiV1AppsGet401Response: - """通过编码的key更新配置项 - - PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param create_if_not_exists: (required) - :type create_if_not_exists: bool - :param open_item_dto: (required) - :type open_item_dto: OpenItemDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - create_if_not_exists=create_if_not_exists, - open_item_dto=open_item_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - create_if_not_exists: StrictBool, - open_item_dto: OpenItemDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenapiV1AppsGet401Response]: - """通过编码的key更新配置项 - - PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param create_if_not_exists: (required) - :type create_if_not_exists: bool - :param open_item_dto: (required) - :type open_item_dto: OpenItemDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - create_if_not_exists=create_if_not_exists, - open_item_dto=open_item_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - create_if_not_exists: StrictBool, - open_item_dto: OpenItemDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """通过编码的key更新配置项 - - PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param create_if_not_exists: (required) - :type create_if_not_exists: bool - :param open_item_dto: (required) - :type open_item_dto: OpenItemDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - create_if_not_exists=create_if_not_exists, - open_item_dto=open_item_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - key, - create_if_not_exists, - open_item_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - if key is not None: - _path_params['key'] = key - # process the query parameters - if create_if_not_exists is not None: - - _query_params.append(('createIfNotExists', create_if_not_exists)) - - # process the header parameters - # process the form parameters - # process the body parameter - if open_item_dto is not None: - _body_params = open_item_dto - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_text_model: NamespaceTextModel, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenapiV1AppsGet401Response: - """通过文本批量修改配置项 - - PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_text_model: (required) - :type namespace_text_model: NamespaceTextModel - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_text_model=namespace_text_model, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_text_model: NamespaceTextModel, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenapiV1AppsGet401Response]: - """通过文本批量修改配置项 - - PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_text_model: (required) - :type namespace_text_model: NamespaceTextModel - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_text_model=namespace_text_model, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_text_model: NamespaceTextModel, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """通过文本批量修改配置项 - - PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_text_model: (required) - :type namespace_text_model: NamespaceTextModel - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_text_model=namespace_text_model, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - namespace_text_model, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if namespace_text_model is not None: - _body_params = namespace_text_model - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_sync_model: NamespaceSyncModel, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[ListItemDiffs]: - """对比命名空间配置差异 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_sync_model: (required) - :type namespace_sync_model: NamespaceSyncModel - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_sync_model=namespace_sync_model, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ListItemDiffs]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_sync_model: NamespaceSyncModel, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[ListItemDiffs]]: - """对比命名空间配置差异 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_sync_model: (required) - :type namespace_sync_model: NamespaceSyncModel - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_sync_model=namespace_sync_model, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ListItemDiffs]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_sync_model: NamespaceSyncModel, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """对比命名空间配置差异 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_sync_model: (required) - :type namespace_sync_model: NamespaceSyncModel - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_sync_model=namespace_sync_model, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ListItemDiffs]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - namespace_sync_model, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if namespace_sync_model is not None: - _body_params = namespace_sync_model - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenPageDTOOpenItemDTO: - """获取命名空间下的配置项列表 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenPageDTOOpenItemDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenPageDTOOpenItemDTO]: - """获取命名空间下的配置项列表 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenPageDTOOpenItemDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取命名空间下的配置项列表 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenPageDTOOpenItemDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - page, - size, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - if page is not None: - - _query_params.append(('page', page)) - - if size is not None: - - _query_params.append(('size', size)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """删除配置项 - - DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """删除配置项 - - DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """删除配置项 - - DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - key, - operator, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - if key is not None: - _path_params['key'] = key - # process the query parameters - if operator is not None: - - _query_params.append(('operator', operator)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenItemDTO: - """获取单个配置项 - - GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenItemDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenItemDTO]: - """获取单个配置项 - - GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenItemDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取单个配置项 - - GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenItemDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - key, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - if key is not None: - _path_params['key'] = key - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - create_if_not_exists: StrictBool, - open_item_dto: OpenItemDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenapiV1AppsGet401Response: - """更新配置项 - - PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param create_if_not_exists: (required) - :type create_if_not_exists: bool - :param open_item_dto: (required) - :type open_item_dto: OpenItemDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - create_if_not_exists=create_if_not_exists, - open_item_dto=open_item_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - create_if_not_exists: StrictBool, - open_item_dto: OpenItemDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenapiV1AppsGet401Response]: - """更新配置项 - - PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param create_if_not_exists: (required) - :type create_if_not_exists: bool - :param open_item_dto: (required) - :type open_item_dto: OpenItemDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - create_if_not_exists=create_if_not_exists, - open_item_dto=open_item_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - create_if_not_exists: StrictBool, - open_item_dto: OpenItemDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """更新配置项 - - PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param create_if_not_exists: (required) - :type create_if_not_exists: bool - :param open_item_dto: (required) - :type open_item_dto: OpenItemDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - create_if_not_exists=create_if_not_exists, - open_item_dto=open_item_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - key, - create_if_not_exists, - open_item_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - if key is not None: - _path_params['key'] = key - # process the query parameters - if create_if_not_exists is not None: - - _query_params.append(('createIfNotExists', create_if_not_exists)) - - # process the header parameters - # process the form parameters - # process the body parameter - if open_item_dto is not None: - _body_params = open_item_dto - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - open_item_dto: OpenItemDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenItemDTO: - """创建新的配置项 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param open_item_dto: (required) - :type open_item_dto: OpenItemDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - open_item_dto=open_item_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenItemDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - open_item_dto: OpenItemDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenItemDTO]: - """创建新的配置项 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param open_item_dto: (required) - :type open_item_dto: OpenItemDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - open_item_dto=open_item_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenItemDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - open_item_dto: OpenItemDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """创建新的配置项 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param open_item_dto: (required) - :type open_item_dto: OpenItemDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - open_item_dto=open_item_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenItemDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - open_item_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if open_item_dto is not None: - _body_params = open_item_dto - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenapiV1AppsGet401Response: - """撤销配置项更改 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenapiV1AppsGet401Response]: - """撤销配置项更改 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """撤销配置项更改 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_sync_model: NamespaceSyncModel, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenapiV1AppsGet401Response: - """同步配置项到多个命名空间 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_sync_model: (required) - :type namespace_sync_model: NamespaceSyncModel - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_sync_model=namespace_sync_model, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_sync_model: NamespaceSyncModel, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenapiV1AppsGet401Response]: - """同步配置项到多个命名空间 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_sync_model: (required) - :type namespace_sync_model: NamespaceSyncModel - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_sync_model=namespace_sync_model, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_sync_model: NamespaceSyncModel, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """同步配置项到多个命名空间 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_sync_model: (required) - :type namespace_sync_model: NamespaceSyncModel - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_sync_model=namespace_sync_model, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - namespace_sync_model, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if namespace_sync_model is not None: - _body_params = namespace_sync_model - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_text_model: NamespaceTextModel, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response: - """验证配置文本语法 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_text_model: (required) - :type namespace_text_model: NamespaceTextModel - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_text_model=namespace_text_model, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response", - '400': "OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_text_model: NamespaceTextModel, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response]: - """验证配置文本语法 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_text_model: (required) - :type namespace_text_model: NamespaceTextModel - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_text_model=namespace_text_model, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response", - '400': "OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_text_model: NamespaceTextModel, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """验证配置文本语法 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_text_model: (required) - :type namespace_text_model: NamespaceTextModel - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_text_model=namespace_text_model, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response", - '400': "OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - namespace_text_model, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if namespace_text_model is not None: - _body_params = namespace_text_model - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/python/apollo_openapi/api/namespace_branch_management_api.py b/python/apollo_openapi/api/namespace_branch_management_api.py deleted file mode 100644 index 5a57a5ac..00000000 --- a/python/apollo_openapi/api/namespace_branch_management_api.py +++ /dev/null @@ -1,3164 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import StrictBool, StrictStr -from typing import Any, Dict, List -from apollo_openapi.models.namespace_gray_del_release_dto import NamespaceGrayDelReleaseDTO -from apollo_openapi.models.namespace_release_dto import NamespaceReleaseDTO -from apollo_openapi.models.open_gray_release_rule_dto import OpenGrayReleaseRuleDTO -from apollo_openapi.models.open_item_dto import OpenItemDTO -from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO -from apollo_openapi.models.open_release_dto import OpenReleaseDTO - -from apollo_openapi.api_client import ApiClient, RequestSerialized -from apollo_openapi.api_response import ApiResponse -from apollo_openapi.rest import RESTResponseType - - -class NamespaceBranchManagementApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenNamespaceDTO: - """创建命名空间分支 - - POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenNamespaceDTO]: - """创建命名空间分支 - - POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """创建命名空间分支 - - POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - operator, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - if operator is not None: - - _query_params.append(('operator', operator)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete( - self, - env: StrictStr, - app_id: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """删除命名空间分支 - - DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - - :param env: (required) - :type env: str - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete_serialize( - env=env, - app_id=app_id, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete_with_http_info( - self, - env: StrictStr, - app_id: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """删除命名空间分支 - - DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - - :param env: (required) - :type env: str - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete_serialize( - env=env, - app_id=app_id, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete_without_preload_content( - self, - env: StrictStr, - app_id: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """删除命名空间分支 - - DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - - :param env: (required) - :type env: str - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete_serialize( - env=env, - app_id=app_id, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete_serialize( - self, - env, - app_id, - cluster_name, - namespace_name, - branch_name, - operator, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if env is not None: - _path_params['env'] = env - if app_id is not None: - _path_params['appId'] = app_id - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - if branch_name is not None: - _path_params['branchName'] = branch_name - # process the query parameters - if operator is not None: - - _query_params.append(('operator', operator)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - namespace_gray_del_release_dto: NamespaceGrayDelReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenReleaseDTO: - """创建灰度删除发布 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param namespace_gray_del_release_dto: (required) - :type namespace_gray_del_release_dto: NamespaceGrayDelReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - namespace_gray_del_release_dto=namespace_gray_del_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - namespace_gray_del_release_dto: NamespaceGrayDelReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenReleaseDTO]: - """创建灰度删除发布 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param namespace_gray_del_release_dto: (required) - :type namespace_gray_del_release_dto: NamespaceGrayDelReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - namespace_gray_del_release_dto=namespace_gray_del_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - namespace_gray_del_release_dto: NamespaceGrayDelReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """创建灰度删除发布 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param namespace_gray_del_release_dto: (required) - :type namespace_gray_del_release_dto: NamespaceGrayDelReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - namespace_gray_del_release_dto=namespace_gray_del_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - branch_name, - namespace_gray_del_release_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - if branch_name is not None: - _path_params['branchName'] = branch_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if namespace_gray_del_release_dto is not None: - _body_params = namespace_gray_del_release_dto - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenGrayReleaseRuleDTO: - """获取分支灰度发布规则 - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenGrayReleaseRuleDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenGrayReleaseRuleDTO]: - """获取分支灰度发布规则 - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenGrayReleaseRuleDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取分支灰度发布规则 - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenGrayReleaseRuleDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - branch_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - if branch_name is not None: - _path_params['branchName'] = branch_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - operator: StrictStr, - open_gray_release_rule_dto: OpenGrayReleaseRuleDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """更新分支灰度发布规则 - - PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param operator: (required) - :type operator: str - :param open_gray_release_rule_dto: (required) - :type open_gray_release_rule_dto: OpenGrayReleaseRuleDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - operator=operator, - open_gray_release_rule_dto=open_gray_release_rule_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - operator: StrictStr, - open_gray_release_rule_dto: OpenGrayReleaseRuleDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """更新分支灰度发布规则 - - PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param operator: (required) - :type operator: str - :param open_gray_release_rule_dto: (required) - :type open_gray_release_rule_dto: OpenGrayReleaseRuleDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - operator=operator, - open_gray_release_rule_dto=open_gray_release_rule_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - operator: StrictStr, - open_gray_release_rule_dto: OpenGrayReleaseRuleDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """更新分支灰度发布规则 - - PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param operator: (required) - :type operator: str - :param open_gray_release_rule_dto: (required) - :type open_gray_release_rule_dto: OpenGrayReleaseRuleDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - operator=operator, - open_gray_release_rule_dto=open_gray_release_rule_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - branch_name, - operator, - open_gray_release_rule_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - if branch_name is not None: - _path_params['branchName'] = branch_name - # process the query parameters - # process the header parameters - if operator is not None: - _header_params['operator'] = operator - # process the form parameters - # process the body parameter - if open_gray_release_rule_dto is not None: - _body_params = open_gray_release_rule_dto - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[OpenItemDTO]: - """获取分支下的配置项 - - GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenItemDTO]", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[OpenItemDTO]]: - """获取分支下的配置项 - - GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenItemDTO]", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取分支下的配置项 - - GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenItemDTO]", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - branch_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - if branch_name is not None: - _path_params['branchName'] = branch_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - delete_branch: StrictBool, - namespace_release_dto: NamespaceReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenReleaseDTO: - """合并分支 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param delete_branch: (required) - :type delete_branch: bool - :param namespace_release_dto: (required) - :type namespace_release_dto: NamespaceReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - delete_branch=delete_branch, - namespace_release_dto=namespace_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - delete_branch: StrictBool, - namespace_release_dto: NamespaceReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenReleaseDTO]: - """合并分支 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param delete_branch: (required) - :type delete_branch: bool - :param namespace_release_dto: (required) - :type namespace_release_dto: NamespaceReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - delete_branch=delete_branch, - namespace_release_dto=namespace_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - delete_branch: StrictBool, - namespace_release_dto: NamespaceReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """合并分支 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param delete_branch: (required) - :type delete_branch: bool - :param namespace_release_dto: (required) - :type namespace_release_dto: NamespaceReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - delete_branch=delete_branch, - namespace_release_dto=namespace_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - branch_name, - delete_branch, - namespace_release_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - if branch_name is not None: - _path_params['branchName'] = branch_name - # process the query parameters - if delete_branch is not None: - - _query_params.append(('deleteBranch', delete_branch)) - - # process the header parameters - # process the form parameters - # process the body parameter - if namespace_release_dto is not None: - _body_params = namespace_release_dto - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch( - self, - env: StrictStr, - app_id: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - delete_branch: StrictBool, - x_apollo_operator: StrictStr, - namespace_release_dto: NamespaceReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenReleaseDTO: - """合并分支到主分支 - - PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") - - :param env: (required) - :type env: str - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param delete_branch: (required) - :type delete_branch: bool - :param x_apollo_operator: (required) - :type x_apollo_operator: str - :param namespace_release_dto: (required) - :type namespace_release_dto: NamespaceReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch_serialize( - env=env, - app_id=app_id, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - delete_branch=delete_branch, - x_apollo_operator=x_apollo_operator, - namespace_release_dto=namespace_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch_with_http_info( - self, - env: StrictStr, - app_id: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - delete_branch: StrictBool, - x_apollo_operator: StrictStr, - namespace_release_dto: NamespaceReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenReleaseDTO]: - """合并分支到主分支 - - PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") - - :param env: (required) - :type env: str - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param delete_branch: (required) - :type delete_branch: bool - :param x_apollo_operator: (required) - :type x_apollo_operator: str - :param namespace_release_dto: (required) - :type namespace_release_dto: NamespaceReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch_serialize( - env=env, - app_id=app_id, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - delete_branch=delete_branch, - x_apollo_operator=x_apollo_operator, - namespace_release_dto=namespace_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch_without_preload_content( - self, - env: StrictStr, - app_id: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - delete_branch: StrictBool, - x_apollo_operator: StrictStr, - namespace_release_dto: NamespaceReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """合并分支到主分支 - - PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") - - :param env: (required) - :type env: str - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param delete_branch: (required) - :type delete_branch: bool - :param x_apollo_operator: (required) - :type x_apollo_operator: str - :param namespace_release_dto: (required) - :type namespace_release_dto: NamespaceReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch_serialize( - env=env, - app_id=app_id, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - delete_branch=delete_branch, - x_apollo_operator=x_apollo_operator, - namespace_release_dto=namespace_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch_serialize( - self, - env, - app_id, - cluster_name, - namespace_name, - branch_name, - delete_branch, - x_apollo_operator, - namespace_release_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if env is not None: - _path_params['env'] = env - if app_id is not None: - _path_params['appId'] = app_id - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - if branch_name is not None: - _path_params['branchName'] = branch_name - # process the query parameters - if delete_branch is not None: - - _query_params.append(('deleteBranch', delete_branch)) - - # process the header parameters - if x_apollo_operator is not None: - _header_params['X-Apollo-Operator'] = x_apollo_operator - # process the form parameters - # process the body parameter - if namespace_release_dto is not None: - _body_params = namespace_release_dto - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='PATCH', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - namespace_release_dto: NamespaceReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenReleaseDTO: - """创建灰度发布 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param namespace_release_dto: (required) - :type namespace_release_dto: NamespaceReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - namespace_release_dto=namespace_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - namespace_release_dto: NamespaceReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenReleaseDTO]: - """创建灰度发布 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param namespace_release_dto: (required) - :type namespace_release_dto: NamespaceReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - namespace_release_dto=namespace_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - namespace_release_dto: NamespaceReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """创建灰度发布 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param namespace_release_dto: (required) - :type namespace_release_dto: NamespaceReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - namespace_release_dto=namespace_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - branch_name, - namespace_release_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - if branch_name is not None: - _path_params['branchName'] = branch_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if namespace_release_dto is not None: - _body_params = namespace_release_dto - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/python/apollo_openapi/api/namespace_management_api.py b/python/apollo_openapi/api/namespace_management_api.py deleted file mode 100644 index 1cbee728..00000000 --- a/python/apollo_openapi/api/namespace_management_api.py +++ /dev/null @@ -1,2656 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import StrictBool, StrictInt, StrictStr -from typing import List -from apollo_openapi.models.open_app_namespace_dto import OpenAppNamespaceDTO -from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO -from apollo_openapi.models.open_namespace_lock_dto import OpenNamespaceLockDTO - -from apollo_openapi.api_client import ApiClient, RequestSerialized -from apollo_openapi.api_response import ApiResponse -from apollo_openapi.rest import RESTResponseType - - -class NamespaceManagementApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def openapi_v1_appnamespaces_get( - self, - public_only: StrictBool, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[OpenAppNamespaceDTO]: - """获取所有公共AppNamespace - - GET /openapi/v1/appnamespaces?public=true - - :param public_only: (required) - :type public_only: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_appnamespaces_get_serialize( - public_only=public_only, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenAppNamespaceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_appnamespaces_get_with_http_info( - self, - public_only: StrictBool, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[OpenAppNamespaceDTO]]: - """获取所有公共AppNamespace - - GET /openapi/v1/appnamespaces?public=true - - :param public_only: (required) - :type public_only: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_appnamespaces_get_serialize( - public_only=public_only, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenAppNamespaceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_appnamespaces_get_without_preload_content( - self, - public_only: StrictBool, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取所有公共AppNamespace - - GET /openapi/v1/appnamespaces?public=true - - :param public_only: (required) - :type public_only: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_appnamespaces_get_serialize( - public_only=public_only, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenAppNamespaceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_appnamespaces_get_serialize( - self, - public_only, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if public_only is not None: - - _query_params.append(('publicOnly', public_only)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/appnamespaces', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_app_id_appnamespaces_get( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[OpenAppNamespaceDTO]: - """获取指定应用的AppNamespace - - GET /openapi/v1/apps/{appId}/appnamespaces - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_appnamespaces_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenAppNamespaceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_appnamespaces_get_with_http_info( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[OpenAppNamespaceDTO]]: - """获取指定应用的AppNamespace - - GET /openapi/v1/apps/{appId}/appnamespaces - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_appnamespaces_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenAppNamespaceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_appnamespaces_get_without_preload_content( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取指定应用的AppNamespace - - GET /openapi/v1/apps/{appId}/appnamespaces - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_appnamespaces_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenAppNamespaceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_appnamespaces_get_serialize( - self, - app_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/apps/{appId}/appnamespaces', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_app_id_appnamespaces_namespace_name_get( - self, - app_id: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenAppNamespaceDTO: - """获取指定的AppNamespace - - GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - - :param app_id: (required) - :type app_id: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_appnamespaces_namespace_name_get_serialize( - app_id=app_id, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppNamespaceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_appnamespaces_namespace_name_get_with_http_info( - self, - app_id: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenAppNamespaceDTO]: - """获取指定的AppNamespace - - GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - - :param app_id: (required) - :type app_id: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_appnamespaces_namespace_name_get_serialize( - app_id=app_id, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppNamespaceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_appnamespaces_namespace_name_get_without_preload_content( - self, - app_id: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取指定的AppNamespace - - GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - - :param app_id: (required) - :type app_id: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_appnamespaces_namespace_name_get_serialize( - app_id=app_id, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppNamespaceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_appnamespaces_namespace_name_get_serialize( - self, - app_id, - namespace_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_app_id_appnamespaces_post( - self, - app_id: StrictStr, - open_app_namespace_dto: OpenAppNamespaceDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenAppNamespaceDTO: - """创建AppNamespace - - POST /openapi/v1/apps/{appId}/appnamespaces - - :param app_id: (required) - :type app_id: str - :param open_app_namespace_dto: (required) - :type open_app_namespace_dto: OpenAppNamespaceDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_appnamespaces_post_serialize( - app_id=app_id, - open_app_namespace_dto=open_app_namespace_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppNamespaceDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_appnamespaces_post_with_http_info( - self, - app_id: StrictStr, - open_app_namespace_dto: OpenAppNamespaceDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenAppNamespaceDTO]: - """创建AppNamespace - - POST /openapi/v1/apps/{appId}/appnamespaces - - :param app_id: (required) - :type app_id: str - :param open_app_namespace_dto: (required) - :type open_app_namespace_dto: OpenAppNamespaceDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_appnamespaces_post_serialize( - app_id=app_id, - open_app_namespace_dto=open_app_namespace_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppNamespaceDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_appnamespaces_post_without_preload_content( - self, - app_id: StrictStr, - open_app_namespace_dto: OpenAppNamespaceDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """创建AppNamespace - - POST /openapi/v1/apps/{appId}/appnamespaces - - :param app_id: (required) - :type app_id: str - :param open_app_namespace_dto: (required) - :type open_app_namespace_dto: OpenAppNamespaceDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_appnamespaces_post_serialize( - app_id=app_id, - open_app_namespace_dto=open_app_namespace_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppNamespaceDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_appnamespaces_post_serialize( - self, - app_id, - open_app_namespace_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if open_app_namespace_dto is not None: - _body_params = open_app_namespace_dto - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/openapi/v1/apps/{appId}/appnamespaces', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[str]: - """检查缺失的Namespace - - GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[str]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[str]]: - """检查缺失的Namespace - - GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[str]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """检查缺失的Namespace - - GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[str]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get_serialize( - self, - app_id, - env, - cluster_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenNamespaceDTO: - """获取关联的公共Namespace - - GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenNamespaceDTO]: - """获取关联的公共Namespace - - GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取关联的公共Namespace - - GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get( - self, - env: StrictStr, - public_namespace_name: StrictStr, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[OpenNamespaceDTO]: - """获取公共AppNamespace的所有实例 - - GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - - :param env: (required) - :type env: str - :param public_namespace_name: (required) - :type public_namespace_name: str - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get_serialize( - env=env, - public_namespace_name=public_namespace_name, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenNamespaceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get_with_http_info( - self, - env: StrictStr, - public_namespace_name: StrictStr, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[OpenNamespaceDTO]]: - """获取公共AppNamespace的所有实例 - - GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - - :param env: (required) - :type env: str - :param public_namespace_name: (required) - :type public_namespace_name: str - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get_serialize( - env=env, - public_namespace_name=public_namespace_name, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenNamespaceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get_without_preload_content( - self, - env: StrictStr, - public_namespace_name: StrictStr, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取公共AppNamespace的所有实例 - - GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - - :param env: (required) - :type env: str - :param public_namespace_name: (required) - :type public_namespace_name: str - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get_serialize( - env=env, - public_namespace_name=public_namespace_name, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenNamespaceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get_serialize( - self, - env, - public_namespace_name, - page, - size, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if env is not None: - _path_params['env'] = env - if public_namespace_name is not None: - _path_params['publicNamespaceName'] = public_namespace_name - # process the query parameters - if page is not None: - - _query_params.append(('page', page)) - - if size is not None: - - _query_params.append(('size', size)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - fill_item_detail: StrictBool, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[OpenNamespaceDTO]: - """获取指定集群下的所有Namespace - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param fill_item_detail: (required) - :type fill_item_detail: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - fill_item_detail=fill_item_detail, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenNamespaceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - fill_item_detail: StrictBool, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[OpenNamespaceDTO]]: - """获取指定集群下的所有Namespace - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param fill_item_detail: (required) - :type fill_item_detail: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - fill_item_detail=fill_item_detail, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenNamespaceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - fill_item_detail: StrictBool, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取指定集群下的所有Namespace - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param fill_item_detail: (required) - :type fill_item_detail: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - fill_item_detail=fill_item_detail, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenNamespaceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get_serialize( - self, - app_id, - env, - cluster_name, - fill_item_detail, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - # process the query parameters - if fill_item_detail is not None: - - _query_params.append(('fillItemDetail', fill_item_detail)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenNamespaceLockDTO: - """获取Namespace的锁状态 - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceLockDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenNamespaceLockDTO]: - """获取Namespace的锁状态 - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceLockDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取Namespace的锁状态 - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceLockDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/python/apollo_openapi/api/organization_management_api.py b/python/apollo_openapi/api/organization_management_api.py deleted file mode 100644 index cae5f5df..00000000 --- a/python/apollo_openapi/api/organization_management_api.py +++ /dev/null @@ -1,286 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from typing import List -from apollo_openapi.models.open_organization_dto import OpenOrganizationDto - -from apollo_openapi.api_client import ApiClient, RequestSerialized -from apollo_openapi.api_response import ApiResponse -from apollo_openapi.rest import RESTResponseType - - -class OrganizationManagementApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def openapi_v1_organizations_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[OpenOrganizationDto]: - """获取所有组织信息 - - GET /openapi/v1/organizations - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_organizations_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenOrganizationDto]", - '401': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_organizations_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[OpenOrganizationDto]]: - """获取所有组织信息 - - GET /openapi/v1/organizations - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_organizations_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenOrganizationDto]", - '401': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_organizations_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取所有组织信息 - - GET /openapi/v1/organizations - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_organizations_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenOrganizationDto]", - '401': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_organizations_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/organizations', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/python/apollo_openapi/api/release_management_api.py b/python/apollo_openapi/api/release_management_api.py deleted file mode 100644 index 7bf8200a..00000000 --- a/python/apollo_openapi/api/release_management_api.py +++ /dev/null @@ -1,2234 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import StrictInt, StrictStr -from typing import Any, Dict, List -from apollo_openapi.models.list_release_bo import ListReleaseBO -from apollo_openapi.models.namespace_release_dto import NamespaceReleaseDTO -from apollo_openapi.models.open_release_dto import OpenReleaseDTO -from apollo_openapi.models.openapi_v1_envs_env_releases_compare_get200_response import OpenapiV1EnvsEnvReleasesCompareGet200Response - -from apollo_openapi.api_client import ApiClient, RequestSerialized -from apollo_openapi.api_response import ApiResponse -from apollo_openapi.rest import RESTResponseType - - -class ReleaseManagementApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[OpenReleaseDTO]: - """获取活跃发布(分页) - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenReleaseDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[OpenReleaseDTO]]: - """获取活跃发布(分页) - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenReleaseDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取活跃发布(分页) - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenReleaseDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - page, - size, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - if page is not None: - - _query_params.append(('page', page)) - - if size is not None: - - _query_params.append(('size', size)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[ListReleaseBO]: - """获取所有发布(分页) - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ListReleaseBO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[ListReleaseBO]]: - """获取所有发布(分页) - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ListReleaseBO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取所有发布(分页) - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ListReleaseBO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - page, - size, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - if page is not None: - - _query_params.append(('page', page)) - - if size is not None: - - _query_params.append(('size', size)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenReleaseDTO: - """获取最新活跃发布 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenReleaseDTO]: - """获取最新活跃发布 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取最新活跃发布 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_release_dto: NamespaceReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenReleaseDTO: - """创建发布 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_release_dto: (required) - :type namespace_release_dto: NamespaceReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_release_dto=namespace_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_release_dto: NamespaceReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenReleaseDTO]: - """创建发布 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_release_dto: (required) - :type namespace_release_dto: NamespaceReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_release_dto=namespace_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_release_dto: NamespaceReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """创建发布 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_release_dto: (required) - :type namespace_release_dto: NamespaceReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_release_dto=namespace_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - namespace_release_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if namespace_release_dto is not None: - _body_params = namespace_release_dto - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_releases_compare_get( - self, - env: StrictStr, - base_release_id: StrictInt, - to_compare_release_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenapiV1EnvsEnvReleasesCompareGet200Response: - """对比发布 - - GET /openapi/v1/envs/{env}/releases/compare - - :param env: (required) - :type env: str - :param base_release_id: (required) - :type base_release_id: int - :param to_compare_release_id: (required) - :type to_compare_release_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_releases_compare_get_serialize( - env=env, - base_release_id=base_release_id, - to_compare_release_id=to_compare_release_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1EnvsEnvReleasesCompareGet200Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_releases_compare_get_with_http_info( - self, - env: StrictStr, - base_release_id: StrictInt, - to_compare_release_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenapiV1EnvsEnvReleasesCompareGet200Response]: - """对比发布 - - GET /openapi/v1/envs/{env}/releases/compare - - :param env: (required) - :type env: str - :param base_release_id: (required) - :type base_release_id: int - :param to_compare_release_id: (required) - :type to_compare_release_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_releases_compare_get_serialize( - env=env, - base_release_id=base_release_id, - to_compare_release_id=to_compare_release_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1EnvsEnvReleasesCompareGet200Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_releases_compare_get_without_preload_content( - self, - env: StrictStr, - base_release_id: StrictInt, - to_compare_release_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """对比发布 - - GET /openapi/v1/envs/{env}/releases/compare - - :param env: (required) - :type env: str - :param base_release_id: (required) - :type base_release_id: int - :param to_compare_release_id: (required) - :type to_compare_release_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_releases_compare_get_serialize( - env=env, - base_release_id=base_release_id, - to_compare_release_id=to_compare_release_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1EnvsEnvReleasesCompareGet200Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_releases_compare_get_serialize( - self, - env, - base_release_id, - to_compare_release_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if env is not None: - _path_params['env'] = env - # process the query parameters - if base_release_id is not None: - - _query_params.append(('baseReleaseId', base_release_id)) - - if to_compare_release_id is not None: - - _query_params.append(('toCompareReleaseId', to_compare_release_id)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/releases/compare', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_releases_release_id_get( - self, - env: StrictStr, - release_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenReleaseDTO: - """获取发布详情 - - GET /openapi/v1/envs/{env}/releases/{releaseId} - - :param env: (required) - :type env: str - :param release_id: (required) - :type release_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_releases_release_id_get_serialize( - env=env, - release_id=release_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_releases_release_id_get_with_http_info( - self, - env: StrictStr, - release_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenReleaseDTO]: - """获取发布详情 - - GET /openapi/v1/envs/{env}/releases/{releaseId} - - :param env: (required) - :type env: str - :param release_id: (required) - :type release_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_releases_release_id_get_serialize( - env=env, - release_id=release_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_releases_release_id_get_without_preload_content( - self, - env: StrictStr, - release_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取发布详情 - - GET /openapi/v1/envs/{env}/releases/{releaseId} - - :param env: (required) - :type env: str - :param release_id: (required) - :type release_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_releases_release_id_get_serialize( - env=env, - release_id=release_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_releases_release_id_get_serialize( - self, - env, - release_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if env is not None: - _path_params['env'] = env - if release_id is not None: - _path_params['releaseId'] = release_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/releases/{releaseId}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_releases_release_id_rollback_put( - self, - env: StrictStr, - release_id: StrictInt, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """回滚发布 - - - - :param env: (required) - :type env: str - :param release_id: (required) - :type release_id: int - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_releases_release_id_rollback_put_serialize( - env=env, - release_id=release_id, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_releases_release_id_rollback_put_with_http_info( - self, - env: StrictStr, - release_id: StrictInt, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """回滚发布 - - - - :param env: (required) - :type env: str - :param release_id: (required) - :type release_id: int - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_releases_release_id_rollback_put_serialize( - env=env, - release_id=release_id, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_releases_release_id_rollback_put_without_preload_content( - self, - env: StrictStr, - release_id: StrictInt, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """回滚发布 - - - - :param env: (required) - :type env: str - :param release_id: (required) - :type release_id: int - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_releases_release_id_rollback_put_serialize( - env=env, - release_id=release_id, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_releases_release_id_rollback_put_serialize( - self, - env, - release_id, - operator, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if env is not None: - _path_params['env'] = env - if release_id is not None: - _path_params['releaseId'] = release_id - # process the query parameters - if operator is not None: - - _query_params.append(('operator', operator)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/openapi/v1/envs/{env}/releases/{releaseId}/rollback', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/python/apollo_openapi/api_client.py b/python/apollo_openapi/api_client.py index 15b20ede..629b1786 100644 --- a/python/apollo_openapi/api_client.py +++ b/python/apollo_openapi/api_client.py @@ -1,804 +1,1499 @@ # coding: utf-8 - """ Apollo OpenAPI - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` +

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 OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - + Generated by: https://openapi-generator.tech +""" -import datetime -from dateutil.parser import parse -from enum import Enum -import decimal +from dataclasses import dataclass +from decimal import Decimal +import enum +import email import json -import mimetypes import os +import io +import atexit +from multiprocessing.pool import ThreadPool import re import tempfile -import uuid +import typing +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict +from urllib.parse import urlparse, quote +from urllib3.fields import RequestField as RequestFieldBase -from urllib.parse import quote -from typing import Tuple, Optional, List, Dict, Union -from pydantic import SecretStr +import frozendict -from apollo_openapi.configuration import Configuration -from apollo_openapi.api_response import ApiResponse, T as ApiResponseT -import apollo_openapi.models from apollo_openapi import rest -from apollo_openapi.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException +from apollo_openapi.configuration import Configuration +from apollo_openapi.exceptions import ApiTypeError, ApiValueError +from apollo_openapi.schemas import ( + NoneClass, + BoolClass, + Schema, + FileIO, + BinarySchema, + date, + datetime, + none_type, + Unset, + unset, ) -RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ +class RequestField(RequestFieldBase): + def __eq__(self, other): + if not isinstance(other, RequestField): + return False + return self.__dict__ == other.__dict__ - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'decimal': decimal.Decimal, - 'object': object, - } - _pool = None - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration +class JSONEncoder(json.JSONEncoder): + compact_separators = (',', ':') - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/0.0.1/python' - self.client_side_validation = configuration.client_side_validation + def default(self, obj): + if isinstance(obj, str): + return str(obj) + elif isinstance(obj, float): + return float(obj) + elif isinstance(obj, int): + return int(obj) + elif isinstance(obj, Decimal): + if obj.as_tuple().exponent >= 0: + return int(obj) + return float(obj) + elif isinstance(obj, NoneClass): + return None + elif isinstance(obj, BoolClass): + return bool(obj) + elif isinstance(obj, (dict, frozendict.frozendict)): + return {key: self.default(val) for key, val in obj.items()} + elif isinstance(obj, (list, tuple)): + return [self.default(item) for item in obj] + raise ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) + + +class ParameterInType(enum.Enum): + QUERY = 'query' + HEADER = 'header' + PATH = 'path' + COOKIE = 'cookie' + + +class ParameterStyle(enum.Enum): + MATRIX = 'matrix' + LABEL = 'label' + FORM = 'form' + SIMPLE = 'simple' + SPACE_DELIMITED = 'spaceDelimited' + PIPE_DELIMITED = 'pipeDelimited' + DEEP_OBJECT = 'deepObject' + + +class PrefixSeparatorIterator: + # A class to store prefixes and separators for rfc6570 expansions + + def __init__(self, prefix: str, separator: str): + self.prefix = prefix + self.separator = separator + self.first = True + if separator in {'.', '|', '%20'}: + item_separator = separator + else: + item_separator = ',' + self.item_separator = item_separator - def __enter__(self): + def __iter__(self): return self - def __exit__(self, exc_type, exc_value, traceback): - pass + def __next__(self): + if self.first: + self.first = False + return self.prefix + return self.separator - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value +class ParameterSerializerBase: + @classmethod + def _get_default_explode(cls, style: ParameterStyle) -> bool: + return False - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value + @staticmethod + def __ref6570_item_value(in_data: typing.Any, percent_encode: bool): + """ + Get representation if str/float/int/None/items in list/ values in dict + None is returned if an item is undefined, use cases are value= + - None + - [] + - {} + - [None, None None] + - {'a': None, 'b': None} + """ + if type(in_data) in {str, float, int}: + if percent_encode: + return quote(str(in_data)) + return str(in_data) + elif isinstance(in_data, none_type): + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return None + elif isinstance(in_data, list) and not in_data: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return None + elif isinstance(in_data, dict) and not in_data: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return None + raise ApiValueError('Unable to generate a ref6570 item representation of {}'.format(in_data)) + @staticmethod + def _to_dict(name: str, value: str): + return {name: value} - _default = None + @classmethod + def __ref6570_str_float_int_expansion( + cls, + variable_name: str, + in_data: typing.Any, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: PrefixSeparatorIterator, + var_name_piece: str, + named_parameter_expansion: bool + ) -> str: + item_value = cls.__ref6570_item_value(in_data, percent_encode) + if item_value is None or (item_value == '' and prefix_separator_iterator.separator == ';'): + return next(prefix_separator_iterator) + var_name_piece + value_pair_equals = '=' if named_parameter_expansion else '' + return next(prefix_separator_iterator) + var_name_piece + value_pair_equals + item_value @classmethod - def get_default(cls): - """Return new instance of ApiClient. + def __ref6570_list_expansion( + cls, + variable_name: str, + in_data: typing.Any, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: PrefixSeparatorIterator, + var_name_piece: str, + named_parameter_expansion: bool + ) -> str: + item_values = [cls.__ref6570_item_value(v, percent_encode) for v in in_data] + item_values = [v for v in item_values if v is not None] + if not item_values: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return "" + value_pair_equals = '=' if named_parameter_expansion else '' + if not explode: + return ( + next(prefix_separator_iterator) + + var_name_piece + + value_pair_equals + + prefix_separator_iterator.item_separator.join(item_values) + ) + # exploded + return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( + [var_name_piece + value_pair_equals + val for val in item_values] + ) - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. + @classmethod + def __ref6570_dict_expansion( + cls, + variable_name: str, + in_data: typing.Any, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: PrefixSeparatorIterator, + var_name_piece: str, + named_parameter_expansion: bool + ) -> str: + in_data_transformed = {key: cls.__ref6570_item_value(val, percent_encode) for key, val in in_data.items()} + in_data_transformed = {key: val for key, val in in_data_transformed.items() if val is not None} + if not in_data_transformed: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return "" + value_pair_equals = '=' if named_parameter_expansion else '' + if not explode: + return ( + next(prefix_separator_iterator) + + var_name_piece + value_pair_equals + + prefix_separator_iterator.item_separator.join( + prefix_separator_iterator.item_separator.join( + item_pair + ) for item_pair in in_data_transformed.items() + ) + ) + # exploded + return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( + [key + '=' + val for key, val in in_data_transformed.items()] + ) - :return: The ApiClient object. + @classmethod + def _ref6570_expansion( + cls, + variable_name: str, + in_data: typing.Any, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: PrefixSeparatorIterator + ) -> str: + """ + Separator is for separate variables like dict with explode true, not for array item separation """ - if cls._default is None: - cls._default = ApiClient() - return cls._default + named_parameter_expansion = prefix_separator_iterator.separator in {'&', ';'} + var_name_piece = variable_name if named_parameter_expansion else '' + if type(in_data) in {str, float, int}: + return cls.__ref6570_str_float_int_expansion( + variable_name, + in_data, + explode, + percent_encode, + prefix_separator_iterator, + var_name_piece, + named_parameter_expansion + ) + elif isinstance(in_data, none_type): + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return "" + elif isinstance(in_data, list): + return cls.__ref6570_list_expansion( + variable_name, + in_data, + explode, + percent_encode, + prefix_separator_iterator, + var_name_piece, + named_parameter_expansion + ) + elif isinstance(in_data, dict): + return cls.__ref6570_dict_expansion( + variable_name, + in_data, + explode, + percent_encode, + prefix_separator_iterator, + var_name_piece, + named_parameter_expansion + ) + # bool, bytes, etc + raise ApiValueError('Unable to generate a ref6570 representation of {}'.format(in_data)) + +class StyleFormSerializer(ParameterSerializerBase): @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. + def _get_default_explode(cls, style: ParameterStyle) -> bool: + if style is ParameterStyle.FORM: + return True + return super()._get_default_explode(style) + + def _serialize_form( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list], + name: str, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None + ) -> str: + if prefix_separator_iterator is None: + prefix_separator_iterator = PrefixSeparatorIterator('', '&') + return self._ref6570_expansion( + variable_name=name, + in_data=in_data, + explode=explode, + percent_encode=percent_encode, + prefix_separator_iterator=prefix_separator_iterator + ) - It stores default ApiClient. - :param default: object of ApiClient. - """ - cls._default = default +class StyleSimpleSerializer(ParameterSerializerBase): - def param_serialize( + def _serialize_simple( self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> RequestSerialized: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ + in_data: typing.Union[None, int, float, str, bool, dict, list], + name: str, + explode: bool, + percent_encode: bool + ) -> str: + prefix_separator_iterator = PrefixSeparatorIterator('', ',') + return self._ref6570_expansion( + variable_name=name, + in_data=in_data, + explode=explode, + percent_encode=percent_encode, + prefix_separator_iterator=prefix_separator_iterator + ) - config = self.configuration - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) +class JSONDetector: + """ + Works for: + application/json + application/json; charset=UTF-8 + application/json-patch+json + application/geo+json + """ + __json_content_type_pattern = re.compile("application/[^+]*[+]?(json);?.*") - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) + @classmethod + def _content_type_is_json(cls, content_type: str) -> bool: + if cls.__json_content_type_pattern.match(content_type): + return True + return False + + +@dataclass +class ParameterBase(JSONDetector): + name: str + in_type: ParameterInType + required: bool + style: typing.Optional[ParameterStyle] + explode: typing.Optional[bool] + allow_reserved: typing.Optional[bool] + schema: typing.Optional[typing.Type[Schema]] + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] + + __style_to_in_type = { + ParameterStyle.MATRIX: {ParameterInType.PATH}, + ParameterStyle.LABEL: {ParameterInType.PATH}, + ParameterStyle.FORM: {ParameterInType.QUERY, ParameterInType.COOKIE}, + ParameterStyle.SIMPLE: {ParameterInType.PATH, ParameterInType.HEADER}, + ParameterStyle.SPACE_DELIMITED: {ParameterInType.QUERY}, + ParameterStyle.PIPE_DELIMITED: {ParameterInType.QUERY}, + ParameterStyle.DEEP_OBJECT: {ParameterInType.QUERY}, + } + __in_type_to_default_style = { + ParameterInType.QUERY: ParameterStyle.FORM, + ParameterInType.PATH: ParameterStyle.SIMPLE, + ParameterInType.HEADER: ParameterStyle.SIMPLE, + ParameterInType.COOKIE: ParameterStyle.FORM, + } + __disallowed_header_names = {'Accept', 'Content-Type', 'Authorization'} + _json_encoder = JSONEncoder() - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats + @classmethod + def __verify_style_to_in_type(cls, style: typing.Optional[ParameterStyle], in_type: ParameterInType): + if style is None: + return + in_type_set = cls.__style_to_in_type[style] + if in_type not in in_type_set: + raise ValueError( + 'Invalid style and in_type combination. For style={} only in_type={} are allowed'.format( + style, in_type_set + ) ) - if files: - post_params.extend(self.files_parameters(files)) - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) + def __init__( + self, + name: str, + in_type: ParameterInType, + required: bool = False, + style: typing.Optional[ParameterStyle] = None, + explode: bool = False, + allow_reserved: typing.Optional[bool] = None, + schema: typing.Optional[typing.Type[Schema]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + ): + if schema is None and content is None: + raise ValueError('Value missing; Pass in either schema or content') + if schema and content: + raise ValueError('Too many values provided. Both schema and content were provided. Only one may be input') + if name in self.__disallowed_header_names and in_type is ParameterInType.HEADER: + raise ValueError('Invalid name, name may not be one of {}'.format(self.__disallowed_header_names)) + self.__verify_style_to_in_type(style, in_type) + if content is None and style is None: + style = self.__in_type_to_default_style[in_type] + if content is not None and in_type in self.__in_type_to_default_style and len(content) != 1: + raise ValueError('Invalid content length, content length must equal 1') + self.in_type = in_type + self.name = name + self.required = required + self.style = style + self.explode = explode + self.allow_reserved = allow_reserved + self.schema = schema + self.content = content + + def _serialize_json( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list], + eliminate_whitespace: bool = False + ) -> str: + if eliminate_whitespace: + return json.dumps(in_data, separators=self._json_encoder.compact_separators) + return json.dumps(in_data) - # body - if body: - body = self.sanitize_for_serialization(body) - # request url - if _host is None or self.configuration.ignore_operation_servers: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query +class PathParameter(ParameterBase, StyleSimpleSerializer): - return method, url, header_params, body, post_params + def __init__( + self, + name: str, + required: bool = False, + style: typing.Optional[ParameterStyle] = None, + explode: bool = False, + allow_reserved: typing.Optional[bool] = None, + schema: typing.Optional[typing.Type[Schema]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + ): + super().__init__( + name, + in_type=ParameterInType.PATH, + required=required, + style=style, + explode=explode, + allow_reserved=allow_reserved, + schema=schema, + content=content + ) + def __serialize_label( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list] + ) -> typing.Dict[str, str]: + prefix_separator_iterator = PrefixSeparatorIterator('.', '.') + value = self._ref6570_expansion( + variable_name=self.name, + in_data=in_data, + explode=self.explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return self._to_dict(self.name, value) - def call_api( + def __serialize_matrix( self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ + in_data: typing.Union[None, int, float, str, bool, dict, list] + ) -> typing.Dict[str, str]: + prefix_separator_iterator = PrefixSeparatorIterator(';', ';') + value = self._ref6570_expansion( + variable_name=self.name, + in_data=in_data, + explode=self.explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return self._to_dict(self.name, value) - try: - # perform request and return response - response_data = self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) + def __serialize_simple( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list], + ) -> typing.Dict[str, str]: + value = self._serialize_simple( + in_data=in_data, + name=self.name, + explode=self.explode, + percent_encode=True + ) + return self._to_dict(self.name, value) + + def serialize( + self, + in_data: typing.Union[ + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] + ) -> typing.Dict[str, str]: + if self.schema: + cast_in_data = self.schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + """ + simple -> path + path: + returns path_params: dict + label -> path + returns path_params + matrix -> path + returns path_params + """ + if self.style: + if self.style is ParameterStyle.SIMPLE: + return self.__serialize_simple(cast_in_data) + elif self.style is ParameterStyle.LABEL: + return self.__serialize_label(cast_in_data) + elif self.style is ParameterStyle.MATRIX: + return self.__serialize_matrix(cast_in_data) + # self.content will be length one + for content_type, schema in self.content.items(): + cast_in_data = schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + if self._content_type_is_json(content_type): + value = self._serialize_json(cast_in_data) + return self._to_dict(self.name, value) + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + + +class QueryParameter(ParameterBase, StyleFormSerializer): - except ApiException as e: - raise e + def __init__( + self, + name: str, + required: bool = False, + style: typing.Optional[ParameterStyle] = None, + explode: typing.Optional[bool] = None, + allow_reserved: typing.Optional[bool] = None, + schema: typing.Optional[typing.Type[Schema]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + ): + used_style = ParameterStyle.FORM if style is None else style + used_explode = self._get_default_explode(used_style) if explode is None else explode + + super().__init__( + name, + in_type=ParameterInType.QUERY, + required=required, + style=used_style, + explode=used_explode, + allow_reserved=allow_reserved, + schema=schema, + content=content + ) - return response_data + def __serialize_space_delimited( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list], + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] + ) -> typing.Dict[str, str]: + if prefix_separator_iterator is None: + prefix_separator_iterator = self.get_prefix_separator_iterator() + value = self._ref6570_expansion( + variable_name=self.name, + in_data=in_data, + explode=self.explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return self._to_dict(self.name, value) - def response_deserialize( + def __serialize_pipe_delimited( self, - response_data: rest.RESTResponse, - response_types_map: Optional[Dict[str, ApiResponseT]]=None - ) -> ApiResponse[ApiResponseT]: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ + in_data: typing.Union[None, int, float, str, bool, dict, list], + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] + ) -> typing.Dict[str, str]: + if prefix_separator_iterator is None: + prefix_separator_iterator = self.get_prefix_separator_iterator() + value = self._ref6570_expansion( + variable_name=self.name, + in_data=in_data, + explode=self.explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return self._to_dict(self.name, value) - msg = "RESTResponse.read() must be called before passing it to response_deserialize()" - assert response_data.data is not None, msg + def __serialize_form( + self, + in_data: typing.Union[None, int, float, str, bool, dict, list], + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] + ) -> typing.Dict[str, str]: + if prefix_separator_iterator is None: + prefix_separator_iterator = self.get_prefix_separator_iterator() + value = self._serialize_form( + in_data, + name=self.name, + explode=self.explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return self._to_dict(self.name, value) - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + def get_prefix_separator_iterator(self) -> typing.Optional[PrefixSeparatorIterator]: + if self.style is ParameterStyle.FORM: + return PrefixSeparatorIterator('?', '&') + elif self.style is ParameterStyle.SPACE_DELIMITED: + return PrefixSeparatorIterator('', '%20') + elif self.style is ParameterStyle.PIPE_DELIMITED: + return PrefixSeparatorIterator('', '|') - # deserialize response data - response_text = None - return_data = None - try: - if response_type == "bytearray": - return_data = response_data.data - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - elif response_type is not None: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type, content_type) - finally: - if not 200 <= response_data.status <= 299: - raise ApiException.from_response( - http_resp=response_data, - body=response_text, - data=return_data, + def serialize( + self, + in_data: typing.Union[ + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict], + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None + ) -> typing.Dict[str, str]: + if self.schema: + cast_in_data = self.schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + """ + form -> query + query: + - GET/HEAD/DELETE: could use fields + - PUT/POST: must use urlencode to send parameters + returns fields: tuple + spaceDelimited -> query + returns fields + pipeDelimited -> query + returns fields + deepObject -> query, https://github.com/OAI/OpenAPI-Specification/issues/1706 + returns fields + """ + if self.style: + # TODO update query ones to omit setting values when [] {} or None is input + if self.style is ParameterStyle.FORM: + return self.__serialize_form(cast_in_data, prefix_separator_iterator) + elif self.style is ParameterStyle.SPACE_DELIMITED: + return self.__serialize_space_delimited(cast_in_data, prefix_separator_iterator) + elif self.style is ParameterStyle.PIPE_DELIMITED: + return self.__serialize_pipe_delimited(cast_in_data, prefix_separator_iterator) + # self.content will be length one + if prefix_separator_iterator is None: + prefix_separator_iterator = self.get_prefix_separator_iterator() + for content_type, schema in self.content.items(): + cast_in_data = schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + if self._content_type_is_json(content_type): + value = self._serialize_json(cast_in_data, eliminate_whitespace=True) + return self._to_dict( + self.name, + next(prefix_separator_iterator) + self.name + '=' + quote(value) ) + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data +class CookieParameter(ParameterBase, StyleFormSerializer): + + def __init__( + self, + name: str, + required: bool = False, + style: typing.Optional[ParameterStyle] = None, + explode: typing.Optional[bool] = None, + allow_reserved: typing.Optional[bool] = None, + schema: typing.Optional[typing.Type[Schema]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + ): + used_style = ParameterStyle.FORM if style is None and content is None and schema else style + used_explode = self._get_default_explode(used_style) if explode is None else explode + + super().__init__( + name, + in_type=ParameterInType.COOKIE, + required=required, + style=used_style, + explode=used_explode, + allow_reserved=allow_reserved, + schema=schema, + content=content ) - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is SecretStr, return obj.get_secret_value() - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is decimal.Decimal return string representation. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, Enum): - return obj.value - elif isinstance(obj, SecretStr): - return obj.get_secret_value() - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, uuid.UUID): - return str(obj) - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - elif isinstance(obj, decimal.Decimal): - return str(obj) + def serialize( + self, + in_data: typing.Union[ + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] + ) -> typing.Dict[str, str]: + if self.schema: + cast_in_data = self.schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + """ + form -> cookie + returns fields: tuple + """ + if self.style: + """ + TODO add escaping of comma, space, equals + or turn encoding on + """ + value = self._serialize_form( + cast_in_data, + explode=self.explode, + name=self.name, + percent_encode=False, + prefix_separator_iterator=PrefixSeparatorIterator('', '&') + ) + return self._to_dict(self.name, value) + # self.content will be length one + for content_type, schema in self.content.items(): + cast_in_data = schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + if self._content_type_is_json(content_type): + value = self._serialize_json(cast_in_data) + return self._to_dict(self.name, value) + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + + +class HeaderParameter(ParameterBase, StyleSimpleSerializer): + def __init__( + self, + name: str, + required: bool = False, + style: typing.Optional[ParameterStyle] = None, + explode: bool = False, + allow_reserved: typing.Optional[bool] = None, + schema: typing.Optional[typing.Type[Schema]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + ): + super().__init__( + name, + in_type=ParameterInType.HEADER, + required=required, + style=style, + explode=explode, + allow_reserved=allow_reserved, + schema=schema, + content=content + ) - elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): - obj_dict = obj.to_dict() - else: - obj_dict = obj.__dict__ + @staticmethod + def __to_headers(in_data: typing.Tuple[typing.Tuple[str, str], ...]) -> HTTPHeaderDict: + data = tuple(t for t in in_data if t) + headers = HTTPHeaderDict() + if not data: + return headers + headers.extend(data) + return headers + + def serialize( + self, + in_data: typing.Union[ + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] + ) -> HTTPHeaderDict: + if self.schema: + cast_in_data = self.schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + """ + simple -> header + headers: PoolManager needs a mapping, tuple is close + returns headers: dict + """ + if self.style: + value = self._serialize_simple(cast_in_data, self.name, self.explode, False) + return self.__to_headers(((self.name, value),)) + # self.content will be length one + for content_type, schema in self.content.items(): + cast_in_data = schema(in_data) + cast_in_data = self._json_encoder.default(cast_in_data) + if self._content_type_is_json(content_type): + value = self._serialize_json(cast_in_data) + return self.__to_headers(((self.name, value),)) + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + + +class Encoding: + def __init__( + self, + content_type: str, + headers: typing.Optional[typing.Dict[str, HeaderParameter]] = None, + style: typing.Optional[ParameterStyle] = None, + explode: bool = False, + allow_reserved: bool = False, + ): + self.content_type = content_type + self.headers = headers + self.style = style + self.explode = explode + self.allow_reserved = allow_reserved - if isinstance(obj_dict, list): - # here we handle instances that can either be a list or something else, and only became a real list by calling to_dict() - return self.sanitize_for_serialization(obj_dict) - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } +@dataclass +class MediaType: + """ + Used to store request and response body schema information + encoding: + A map between a property name and its encoding information. + The key, being the property name, MUST exist in the schema as a property. + The encoding object SHALL only apply to requestBody objects when the media type is + multipart or application/x-www-form-urlencoded. + """ + schema: typing.Optional[typing.Type[Schema]] = None + encoding: typing.Optional[typing.Dict[str, Encoding]] = None - def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): - """Deserializes response into an object. - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - :param content_type: content type of response. +@dataclass +class ApiResponse: + response: urllib3.HTTPResponse + body: typing.Union[Unset, Schema] = unset + headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset - :return: deserialized object. + def __init__( + self, + response: urllib3.HTTPResponse, + body: typing.Union[Unset, Schema] = unset, + headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset + ): + """ + pycharm needs this to prevent 'Unexpected argument' warnings """ + self.response = response + self.body = body + self.headers = headers - # fetch data from response object - if content_type is None: - try: - data = json.loads(response_text) - except ValueError: - data = response_text - elif re.match(r'^application/(json|[\w!#$&.+\-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): - if response_text == "": - data = "" - else: - data = json.loads(response_text) - elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE): - data = response_text - else: - raise ApiException( - status=0, - reason="Unsupported content type: {0}".format(content_type) - ) - return self.__deserialize(data, response_type) +@dataclass +class ApiResponseWithoutDeserialization(ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[Unset, typing.Type[Schema]] = unset + headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - :param data: dict, list or str. - :param klass: class literal, or string of class name. +class OpenApiResponse(JSONDetector): + __filename_content_disposition_pattern = re.compile('filename="(.+?)"') - :return: object. - """ - if data is None: + def __init__( + self, + response_cls: typing.Type[ApiResponse] = ApiResponse, + content: typing.Optional[typing.Dict[str, MediaType]] = None, + headers: typing.Optional[typing.List[HeaderParameter]] = None, + ): + self.headers = headers + if content is not None and len(content) == 0: + raise ValueError('Invalid value for content, the content dict must have >= 1 entry') + self.content = content + self.response_cls = response_cls + + @staticmethod + def __deserialize_json(response: urllib3.HTTPResponse) -> typing.Any: + # python must be >= 3.9 so we can pass in bytes into json.loads + return json.loads(response.data) + + @staticmethod + def __file_name_from_response_url(response_url: typing.Optional[str]) -> typing.Optional[str]: + if response_url is None: + return None + url_path = urlparse(response_url).path + if url_path: + path_basename = os.path.basename(url_path) + if path_basename: + _filename, ext = os.path.splitext(path_basename) + if ext: + return path_basename + return None + + @classmethod + def __file_name_from_content_disposition(cls, content_disposition: typing.Optional[str]) -> typing.Optional[str]: + if content_disposition is None: + return None + match = cls.__filename_content_disposition_pattern.search(content_disposition) + if not match: return None + return match.group(1) - if isinstance(klass, str): - if klass.startswith('List['): - m = re.match(r'List\[(.*)]', klass) - assert m is not None, "Malformed List type definition" - sub_kls = m.group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - m = re.match(r'Dict\[([^,]*), (.*)]', klass) - assert m is not None, "Malformed Dict type definition" - sub_kls = m.group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] + def __deserialize_application_octet_stream( + self, response: urllib3.HTTPResponse + ) -> typing.Union[bytes, io.BufferedReader]: + """ + urllib3 use cases: + 1. when preload_content=True (stream=False) then supports_chunked_reads is False and bytes are returned + 2. when preload_content=False (stream=True) then supports_chunked_reads is True and + a file will be written and returned + """ + if response.supports_chunked_reads(): + file_name = ( + self.__file_name_from_content_disposition(response.headers.get('content-disposition')) + or self.__file_name_from_response_url(response.geturl()) + ) + + if file_name is None: + _fd, path = tempfile.mkstemp() else: - klass = getattr(apollo_openapi.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - elif klass == decimal.Decimal: - return decimal.Decimal(data) - elif issubclass(klass, Enum): - return self.__deserialize_enum(data, klass) + path = os.path.join(tempfile.gettempdir(), file_name) + + with open(path, 'wb') as new_file: + chunk_size = 1024 + while True: + data = response.read(chunk_size) + if not data: + break + new_file.write(data) + # release_conn is needed for streaming connections only + response.release_conn() + new_file = open(path, 'rb') + return new_file else: - return self.__deserialize_model(data, klass) + return response.data - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. + @staticmethod + def __deserialize_multipart_form_data( + response: urllib3.HTTPResponse + ) -> typing.Dict[str, typing.Any]: + msg = email.message_from_bytes(response.data) + return { + part.get_param("name", header="Content-Disposition"): part.get_payload( + decode=True + ).decode(part.get_content_charset()) + if part.get_content_charset() + else part.get_payload() + for part in msg.get_payload() + } - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params: List[Tuple[str, str]] = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) + def deserialize(self, response: urllib3.HTTPResponse, configuration: Configuration) -> ApiResponse: + content_type = response.getheader('content-type') + deserialized_body = unset + streamed = response.supports_chunked_reads() + + deserialized_headers = unset + if self.headers is not None: + # TODO add header deserialiation here + pass + + if self.content is not None: + if content_type not in self.content: + raise ApiValueError( + f"Invalid content_type returned. Content_type='{content_type}' was returned " + f"when only {str(set(self.content))} are defined for status_code={str(response.status)}" + ) + body_schema = self.content[content_type].schema + if body_schema is None: + # some specs do not define response content media type schemas + return self.response_cls( + response=response, + headers=deserialized_headers, + body=unset + ) + + if self._content_type_is_json(content_type): + body_data = self.__deserialize_json(response) + elif content_type == 'application/octet-stream': + body_data = self.__deserialize_application_octet_stream(response) + elif content_type.startswith('multipart/form-data'): + body_data = self.__deserialize_multipart_form_data(response) + content_type = 'multipart/form-data' else: - new_params.append((k, v)) - return new_params + raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) + deserialized_body = body_schema.from_openapi_data_oapg( + body_data, _configuration=configuration) + elif streamed: + response.release_conn() + + return self.response_cls( + response=response, + headers=deserialized_headers, + body=deserialized_body + ) - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params: List[Tuple[str, str]] = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, quote(str(value))) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) +class ApiClient: + """Generic API client for OpenAPI client library builds. - return "&".join(["=".join(map(str, item)) for item in new_params]) + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + Do not edit the class manually. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ - def files_parameters( + _pool = None + + def __init__( self, - files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], + configuration: typing.Optional[Configuration] = None, + header_name: typing.Optional[str] = None, + header_value: typing.Optional[str] = None, + cookie: typing.Optional[str] = None, + pool_threads: int = 1 ): - """Builds form parameters. + if configuration is None: + configuration = Configuration() + self.configuration = configuration + self.pool_threads = pool_threads - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - for k, v in files.items(): - if isinstance(v, str): - with open(v, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - elif isinstance(v, bytes): - filename = k - filedata = v - elif isinstance(v, tuple): - filename, filedata = v - elif isinstance(v, list): - for file_param in v: - params.extend(self.files_parameters({k: file_param})) - continue - else: - raise ValueError("Unsupported file value") - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - return params + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = HTTPHeaderDict() + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/0.0.1/python' + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() - def select_header_accept(self, accepts: List[str]) -> Optional[str]: - """Returns `Accept` based on an array of accepts provided. + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) - :param accepts: List of headers. - :return: Accept (e.g. application/json). + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. """ - if not accepts: - return None + if self._pool is None: + atexit.register(self.close) + self._pool = ThreadPool(self.pool_threads) + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value - return accepts[0] + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. + def __call_api( + self, + resource_path: str, + method: str, + headers: typing.Optional[HTTPHeaderDict] = None, + body: typing.Optional[typing.Union[str, bytes]] = None, + fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + auth_settings: typing.Optional[typing.List[str]] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + host: typing.Optional[str] = None, + ) -> urllib3.HTTPResponse: - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None + # header parameters + used_headers = HTTPHeaderDict(self.default_headers) + if self.cookie: + headers['Cookie'] = self.cookie - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type + # auth setting + self.update_params_for_auth(used_headers, + auth_settings, resource_path, method, body) - return content_types[0] + # must happen after cookie setting and auth setting in case user is overriding those + if headers: + used_headers.update(headers) - def update_params_for_auth( + # request url + if host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = host + resource_path + + # perform request and return response + response = self.request( + method, + url, + headers=used_headers, + fields=fields, + body=body, + stream=stream, + timeout=timeout, + ) + return response + + def call_api( self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: - """Updates header and query params based on authentication setting. + resource_path: str, + method: str, + headers: typing.Optional[HTTPHeaderDict] = None, + body: typing.Optional[typing.Union[str, bytes]] = None, + fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + auth_settings: typing.Optional[typing.List[str]] = None, + async_req: typing.Optional[bool] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + host: typing.Optional[str] = None, + ) -> urllib3.HTTPResponse: + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async_req request, set the async_req parameter. - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param headers: Header parameters to be + placed in the request header. + :param body: Request body. + :param fields: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings: Auth Settings names for the request. + :param async_req: execute request asynchronously + :type async_req: bool, optional TODO remove, unused + :param stream: if True, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Also when True, if the openapi spec describes a file download, + the data will be written to a local filesystem file and the BinarySchema + instance will also inherit from FileSchema and FileIO + Default is False. + :type stream: bool, optional + :param timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param host: api endpoint host + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. """ - if not auth_settings: - return - if request_auth: - self._apply_auth_params( + if not async_req: + return self.__call_api( + resource_path, + method, headers, - queries, + body, + fields, + auth_settings, + stream, + timeout, + host, + ) + + return self.pool.apply_async( + self.__call_api, + ( resource_path, method, + headers, body, - request_auth + json, + fields, + auth_settings, + stream, + timeout, + host, ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting + ) - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) + def request( + self, + method: str, + url: str, + headers: typing.Optional[HTTPHeaderDict] = None, + fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + body: typing.Optional[typing.Union[str, bytes]] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> urllib3.HTTPResponse: + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.GET(url, + stream=stream, + timeout=timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.HEAD(url, + stream=stream, + timeout=timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.OPTIONS(url, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "POST": + return self.rest_client.POST(url, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "PUT": + return self.rest_client.PUT(url, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "PATCH": + return self.rest_client.PATCH(url, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "DELETE": + return self.rest_client.DELETE(url, + headers=headers, + stream=stream, + timeout=timeout, + body=body) else: raise ApiValueError( - 'Authentication token must be in `query` or `header`' + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." ) - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance + def update_params_for_auth(self, headers, auth_settings, + resource_path, method, body): + """Updates header and query params based on authentication setting. - :param response: RESTResponse. - :return: file path. + :param headers: Header parameters dict to be updated. + :param auth_settings: Authentication setting identifiers list. + :param resource_path: A string representation of the HTTP request resource path. + :param method: A string representation of the HTTP request method. + :param body: A object representing the body of the HTTP request. + The object type is the return value of _encoder.default(). """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - m = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ) - assert m is not None, "Unexpected 'content-disposition' header value" - filename = m.group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) + if not auth_settings: + return - return path + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if not auth_setting: + continue + if auth_setting['in'] == 'cookie': + headers.add('Cookie', auth_setting['value']) + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers.add(auth_setting['key'], auth_setting['value']) + elif auth_setting['in'] == 'query': + """ TODO implement auth in query + need to pass in prefix_separator_iterator + and need to output resource_path with query params added + """ + raise ApiValueError("Auth in query not yet implemented") + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - :param data: str. - :param klass: class literal. +class Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data + Do not edit the class manually. + """ - def __deserialize_object(self, value): - """Return an original value. + def __init__(self, api_client: typing.Optional[ApiClient] = None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client - :return: object. + @staticmethod + def _verify_typed_dict_inputs_oapg(cls: typing.Type[typing_extensions.TypedDict], data: typing.Dict[str, typing.Any]): """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. + Ensures that: + - required keys are present + - additional properties are not input + - value stored under required keys do not have the value unset + Note: detailed value checking is done in schema classes """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) + missing_required_keys = [] + required_keys_with_unset_values = [] + for required_key in cls.__required_keys__: + if required_key not in data: + missing_required_keys.append(required_key) + continue + value = data[required_key] + if value is unset: + required_keys_with_unset_values.append(required_key) + if missing_required_keys: + raise ApiTypeError( + '{} missing {} required arguments: {}'.format( + cls.__name__, len(missing_required_keys), missing_required_keys + ) + ) + if required_keys_with_unset_values: + raise ApiValueError( + '{} contains invalid unset values for {} required keys: {}'.format( + cls.__name__, len(required_keys_with_unset_values), required_keys_with_unset_values + ) ) - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. + disallowed_additional_keys = [] + for key in data: + if key in cls.__required_keys__ or key in cls.__optional_keys__: + continue + disallowed_additional_keys.append(key) + if disallowed_additional_keys: + raise ApiTypeError( + '{} got {} unexpected keyword arguments: {}'.format( + cls.__name__, len(disallowed_additional_keys), disallowed_additional_keys + ) + ) - :param string: str. - :return: datetime. - """ + def _get_host_oapg( + self, + operation_id: str, + servers: typing.Tuple[typing.Dict[str, str], ...] = tuple(), + host_index: typing.Optional[int] = None + ) -> typing.Optional[str]: + configuration = self.api_client.configuration try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) + if host_index is None: + index = configuration.server_operation_index.get( + operation_id, configuration.server_index ) + else: + index = host_index + server_variables = configuration.server_operation_variables.get( + operation_id, configuration.server_variables + ) + host = configuration.get_host_from_settings( + index, variables=server_variables, servers=servers ) + except IndexError: + if servers: + raise ApiValueError( + "Invalid host index. Must be 0 <= index < %s" % + len(servers) + ) + host = None + return host + + +class SerializedRequestBody(typing_extensions.TypedDict, total=False): + body: typing.Union[str, bytes] + fields: typing.Tuple[typing.Union[RequestField, typing.Tuple[str, str]], ...] - def __deserialize_enum(self, data, klass): - """Deserializes primitive type to enum. - :param data: primitive type. - :param klass: class literal. - :return: enum value. +class RequestBody(StyleFormSerializer, JSONDetector): + """ + A request body parameter + content: content_type to MediaType Schema info + """ + __json_encoder = JSONEncoder() + + def __init__( + self, + content: typing.Dict[str, MediaType], + required: bool = False, + ): + self.required = required + if len(content) == 0: + raise ValueError('Invalid value for content, the content dict must have >= 1 entry') + self.content = content + + def __serialize_json( + self, + in_data: typing.Any + ) -> typing.Dict[str, bytes]: + in_data = self.__json_encoder.default(in_data) + json_str = json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode( + "utf-8" + ) + return dict(body=json_str) + + @staticmethod + def __serialize_text_plain(in_data: typing.Any) -> typing.Dict[str, str]: + if isinstance(in_data, frozendict.frozendict): + raise ValueError('Unable to serialize type frozendict.frozendict to text/plain') + elif isinstance(in_data, tuple): + raise ValueError('Unable to serialize type tuple to text/plain') + elif isinstance(in_data, NoneClass): + raise ValueError('Unable to serialize type NoneClass to text/plain') + elif isinstance(in_data, BoolClass): + raise ValueError('Unable to serialize type BoolClass to text/plain') + return dict(body=str(in_data)) + + def __multipart_json_item(self, key: str, value: Schema) -> RequestField: + json_value = self.__json_encoder.default(value) + request_field = RequestField(name=key, data=json.dumps(json_value)) + request_field.make_multipart(content_type='application/json') + return request_field + + def __multipart_form_item(self, key: str, value: Schema) -> RequestField: + if isinstance(value, str): + request_field = RequestField(name=key, data=str(value)) + request_field.make_multipart(content_type='text/plain') + elif isinstance(value, bytes): + request_field = RequestField(name=key, data=value) + request_field.make_multipart(content_type='application/octet-stream') + elif isinstance(value, FileIO): + # TODO use content.encoding to limit allowed content types if they are present + request_field = RequestField.from_tuples(key, (os.path.basename(value.name), value.read())) + value.close() + else: + request_field = self.__multipart_json_item(key=key, value=value) + return request_field + + def __serialize_multipart_form_data( + self, in_data: Schema + ) -> typing.Dict[str, typing.Tuple[RequestField, ...]]: + if not isinstance(in_data, frozendict.frozendict): + raise ValueError(f'Unable to serialize {in_data} to multipart/form-data because it is not a dict of data') """ - try: - return klass(data) - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as `{1}`" - .format(data, klass) - ) - ) + In a multipart/form-data request body, each schema property, or each element of a schema array property, + takes a section in the payload with an internal header as defined by RFC7578. The serialization strategy + for each property of a multipart/form-data request body can be specified in an associated Encoding Object. - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. + When passing in multipart types, boundaries MAY be used to separate sections of the content being + transferred – thus, the following default Content-Types are defined for multipart: - :param data: dict, list. - :param klass: class literal. - :return: model object. + If the (object) property is a primitive, or an array of primitive values, the default Content-Type is text/plain + If the property is complex, or an array of complex values, the default Content-Type is application/json + Question: how is the array of primitives encoded? + If the property is a type: string with a contentEncoding, the default Content-Type is application/octet-stream + """ + fields = [] + for key, value in in_data.items(): + if isinstance(value, tuple): + if value: + # values use explode = True, so the code makes a RequestField for each item with name=key + for item in value: + request_field = self.__multipart_form_item(key=key, value=item) + fields.append(request_field) + else: + # send an empty array as json because exploding will not send it + request_field = self.__multipart_json_item(key=key, value=value) + fields.append(request_field) + else: + request_field = self.__multipart_form_item(key=key, value=value) + fields.append(request_field) + + return dict(fields=tuple(fields)) + + def __serialize_application_octet_stream(self, in_data: BinarySchema) -> typing.Dict[str, bytes]: + if isinstance(in_data, bytes): + return dict(body=in_data) + # FileIO type + result = dict(body=in_data.read()) + in_data.close() + return result + + def __serialize_application_x_www_form_data( + self, in_data: typing.Any + ) -> SerializedRequestBody: + """ + POST submission of form data in body + """ + if not isinstance(in_data, frozendict.frozendict): + raise ValueError( + f'Unable to serialize {in_data} to application/x-www-form-urlencoded because it is not a dict of data') + cast_in_data = self.__json_encoder.default(in_data) + value = self._serialize_form(cast_in_data, name='', explode=True, percent_encode=True) + return dict(body=value) + + def serialize( + self, in_data: typing.Any, content_type: str + ) -> SerializedRequestBody: """ + If a str is returned then the result will be assigned to data when making the request + If a tuple is returned then the result will be used as fields input in encode_multipart_formdata + Return a tuple of - return klass.from_dict(data) + The key of the return dict is + - body for application/json + - encode_multipart and fields for multipart/form-data + """ + media_type = self.content[content_type] + if isinstance(in_data, media_type.schema): + cast_in_data = in_data + elif isinstance(in_data, (dict, frozendict.frozendict)) and in_data: + cast_in_data = media_type.schema(**in_data) + else: + cast_in_data = media_type.schema(in_data) + # TODO check for and use encoding if it exists + # and content_type is multipart or application/x-www-form-urlencoded + if self._content_type_is_json(content_type): + return self.__serialize_json(cast_in_data) + elif content_type == 'text/plain': + return self.__serialize_text_plain(cast_in_data) + elif content_type == 'multipart/form-data': + return self.__serialize_multipart_form_data(cast_in_data) + elif content_type == 'application/x-www-form-urlencoded': + return self.__serialize_application_x_www_form_data(cast_in_data) + elif content_type == 'application/octet-stream': + return self.__serialize_application_octet_stream(cast_in_data) + raise NotImplementedError('Serialization has not yet been implemented for {}'.format(content_type)) diff --git a/python/apollo_openapi/api_response.py b/python/apollo_openapi/api_response.py deleted file mode 100644 index 9bc7c11f..00000000 --- a/python/apollo_openapi/api_response.py +++ /dev/null @@ -1,21 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Optional, Generic, Mapping, TypeVar -from pydantic import Field, StrictInt, StrictBytes, BaseModel - -T = TypeVar("T") - -class ApiResponse(BaseModel, Generic[T]): - """ - API response object - """ - - status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") - data: T = Field(description="Deserialized data given the data type") - raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - - model_config = { - "arbitrary_types_allowed": True - } diff --git a/python/apollo_openapi/apis/__init__.py b/python/apollo_openapi/apis/__init__.py new file mode 100644 index 00000000..5ca66b80 --- /dev/null +++ b/python/apollo_openapi/apis/__init__.py @@ -0,0 +1,3 @@ +# 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 then import them from +# tags, paths, or path_to_api, or tag_to_api diff --git a/python/apollo_openapi/apis/path_to_api.py b/python/apollo_openapi/apis/path_to_api.py new file mode 100644 index 00000000..1850d561 --- /dev/null +++ b/python/apollo_openapi/apis/path_to_api.py @@ -0,0 +1,152 @@ +import typing_extensions + +from apollo_openapi.paths import PathValues +from apollo_openapi.apis.paths.openapi_v1_apps import OpenapiV1Apps +from apollo_openapi.apis.paths.openapi_v1_apps_authorized import OpenapiV1AppsAuthorized +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_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 +from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItems +from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKey +from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdate +from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItems +from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsCompare +from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSync +from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidate +from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevert +from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name import OpenapiV1EnvsEnvAppsAppIdClustersClusterName +from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters import OpenapiV1EnvsEnvAppsAppIdClusters +from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleases +from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatest +from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMerge +from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleases +from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleases +from apollo_openapi.apis.paths.openapi_v1_envs_env_releases_release_id_rollback import OpenapiV1EnvsEnvReleasesReleaseIdRollback +from apollo_openapi.apis.paths.openapi_v1_envs_env_releases_release_id import OpenapiV1EnvsEnvReleasesReleaseId +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_int import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotInt +from apollo_openapi.apis.paths.openapi_v1_apps_app_id_appnamespaces import OpenapiV1AppsAppIdAppnamespaces +from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespaces +from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceName +from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLock +from apollo_openapi.apis.paths.openapi_v1_appnamespaces import OpenapiV1Appnamespaces +from apollo_openapi.apis.paths.openapi_v1_apps_app_id_appnamespaces_namespace_name import OpenapiV1AppsAppIdAppnamespacesNamespaceName +from apollo_openapi.apis.paths.openapi_v1_apps_app_id_namespaces_releases_status import OpenapiV1AppsAppIdNamespacesReleasesStatus +from apollo_openapi.apis.paths.openapi_v1_envs_env_appnamespaces_public_namespace_name_instances import OpenapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstances +from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association import OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociation +from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check import OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheck +from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links import OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinks +from apollo_openapi.apis.paths.openapi_v1_organizations import OpenapiV1Organizations +from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranches +from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchName +from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameRules + +PathToApi = typing_extensions.TypedDict( + 'PathToApi', + { + PathValues.OPENAPI_V1_APPS: OpenapiV1Apps, + PathValues.OPENAPI_V1_APPS_AUTHORIZED: OpenapiV1AppsAuthorized, + 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_ENVS_ENV: OpenapiV1AppsEnvsEnv, + PathValues.OPENAPI_V1_APPS_APP_ID_MISS_ENVS: 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, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_BATCH_UPDATE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdate, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_ITEMS: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItems, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_COMPARE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsCompare, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_SYNC: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSync, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_VALIDATE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidate, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_REVERT: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevert, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME: OpenapiV1EnvsEnvAppsAppIdClustersClusterName, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS: OpenapiV1EnvsEnvAppsAppIdClusters, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleases, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_LATEST: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatest, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_MERGE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMerge, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_RELEASES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleases, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_GRAYDELRELEASES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleases, + PathValues.OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID_ROLLBACK: OpenapiV1EnvsEnvReleasesReleaseIdRollback, + PathValues.OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID: OpenapiV1EnvsEnvReleasesReleaseId, + 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_INT: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotInt, + PathValues.OPENAPI_V1_APPS_APP_ID_APPNAMESPACES: OpenapiV1AppsAppIdAppnamespaces, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespaces, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceName, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_LOCK: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLock, + PathValues.OPENAPI_V1_APPNAMESPACES: OpenapiV1Appnamespaces, + PathValues.OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_NAMESPACE_NAME: OpenapiV1AppsAppIdAppnamespacesNamespaceName, + PathValues.OPENAPI_V1_APPS_APP_ID_NAMESPACES_RELEASES_STATUS: OpenapiV1AppsAppIdNamespacesReleasesStatus, + PathValues.OPENAPI_V1_ENVS_ENV_APPNAMESPACES_PUBLIC_NAMESPACE_NAME_INSTANCES: OpenapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstances, + PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_PUBLICASSOCIATION: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociation, + PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_INTEGRITYCHECK: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheck, + PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_LINKS: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinks, + PathValues.OPENAPI_V1_ORGANIZATIONS: OpenapiV1Organizations, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranches, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchName, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_RULES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameRules, + } +) + +path_to_api = PathToApi( + { + PathValues.OPENAPI_V1_APPS: OpenapiV1Apps, + PathValues.OPENAPI_V1_APPS_AUTHORIZED: OpenapiV1AppsAuthorized, + 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_ENVS_ENV: OpenapiV1AppsEnvsEnv, + PathValues.OPENAPI_V1_APPS_APP_ID_MISS_ENVS: 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, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_BATCH_UPDATE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdate, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_ITEMS: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItems, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_COMPARE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsCompare, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_SYNC: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSync, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_VALIDATE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidate, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_REVERT: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevert, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME: OpenapiV1EnvsEnvAppsAppIdClustersClusterName, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS: OpenapiV1EnvsEnvAppsAppIdClusters, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleases, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_LATEST: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatest, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_MERGE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMerge, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_RELEASES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleases, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_GRAYDELRELEASES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleases, + PathValues.OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID_ROLLBACK: OpenapiV1EnvsEnvReleasesReleaseIdRollback, + PathValues.OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID: OpenapiV1EnvsEnvReleasesReleaseId, + 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_INT: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotInt, + PathValues.OPENAPI_V1_APPS_APP_ID_APPNAMESPACES: OpenapiV1AppsAppIdAppnamespaces, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespaces, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceName, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_LOCK: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLock, + PathValues.OPENAPI_V1_APPNAMESPACES: OpenapiV1Appnamespaces, + PathValues.OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_NAMESPACE_NAME: OpenapiV1AppsAppIdAppnamespacesNamespaceName, + PathValues.OPENAPI_V1_APPS_APP_ID_NAMESPACES_RELEASES_STATUS: OpenapiV1AppsAppIdNamespacesReleasesStatus, + PathValues.OPENAPI_V1_ENVS_ENV_APPNAMESPACES_PUBLIC_NAMESPACE_NAME_INSTANCES: OpenapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstances, + PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_PUBLICASSOCIATION: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociation, + PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_INTEGRITYCHECK: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheck, + PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_LINKS: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinks, + PathValues.OPENAPI_V1_ORGANIZATIONS: OpenapiV1Organizations, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranches, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchName, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_RULES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameRules, + } +) diff --git a/python/apollo_openapi/apis/paths/__init__.py b/python/apollo_openapi/apis/paths/__init__.py new file mode 100644 index 00000000..0de7f5e0 --- /dev/null +++ b/python/apollo_openapi/apis/paths/__init__.py @@ -0,0 +1,3 @@ +# 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.apis.path_to_api import path_to_api diff --git a/python/apollo_openapi/apis/paths/openapi_v1_appnamespaces.py b/python/apollo_openapi/apis/paths/openapi_v1_appnamespaces.py new file mode 100644 index 00000000..73accafd --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_appnamespaces.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_appnamespaces.get import ApiForget + + +class OpenapiV1Appnamespaces( + ApiForget, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps.py b/python/apollo_openapi/apis/paths/openapi_v1_apps.py new file mode 100644 index 00000000..8f372842 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_apps.py @@ -0,0 +1,9 @@ +from apollo_openapi.paths.openapi_v1_apps.get import ApiForget +from apollo_openapi.paths.openapi_v1_apps.post import ApiForpost + + +class OpenapiV1Apps( + ApiForget, + ApiForpost, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id.py new file mode 100644 index 00000000..d4d66868 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id.py @@ -0,0 +1,11 @@ +from apollo_openapi.paths.openapi_v1_apps_app_id.get import ApiForget +from apollo_openapi.paths.openapi_v1_apps_app_id.put import ApiForput +from apollo_openapi.paths.openapi_v1_apps_app_id.delete import ApiFordelete + + +class OpenapiV1AppsAppId( + ApiForget, + ApiForput, + ApiFordelete, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_appnamespaces.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_appnamespaces.py new file mode 100644 index 00000000..3bcda20b --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_appnamespaces.py @@ -0,0 +1,9 @@ +from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces.get import ApiForget +from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces.post import ApiForpost + + +class OpenapiV1AppsAppIdAppnamespaces( + ApiForget, + ApiForpost, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name.py new file mode 100644 index 00000000..312c75e9 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name.py @@ -0,0 +1,9 @@ +from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces_namespace_name.get import ApiForget +from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces_namespace_name.delete import ApiFordelete + + +class OpenapiV1AppsAppIdAppnamespacesNamespaceName( + ApiForget, + ApiFordelete, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envclusters.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envclusters.py new file mode 100644 index 00000000..e904661a --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envclusters.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_apps_app_id_envclusters.get import ApiForget + + +class OpenapiV1AppsAppIdEnvclusters( + ApiForget, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check.py new file mode 100644 index 00000000..77a0c3cc --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check.get import ApiForget + + +class OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheck( + ApiForget, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links.py new file mode 100644 index 00000000..cf1045d0 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links.delete import ApiFordelete + + +class OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinks( + ApiFordelete, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association.py new file mode 100644 index 00000000..f089f288 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association.get import ApiForget + + +class OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociation( + ApiForget, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_miss_envs.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_miss_envs.py new file mode 100644 index 00000000..f257aed8 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_miss_envs.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_apps_app_id_miss_envs.get import ApiForget + + +class OpenapiV1AppsAppIdMissEnvs( + ApiForget, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_namespaces_releases_status.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_namespaces_releases_status.py new file mode 100644 index 00000000..f1c8c200 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_namespaces_releases_status.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_apps_app_id_namespaces_releases_status.get import ApiForget + + +class OpenapiV1AppsAppIdNamespacesReleasesStatus( + 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 new file mode 100644 index 00000000..80b8180d --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_navtree.py @@ -0,0 +1,7 @@ +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_apps_authorized.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_authorized.py new file mode 100644 index 00000000..beba2d23 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_apps_authorized.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_apps_authorized.get import ApiForget + + +class OpenapiV1AppsAuthorized( + ApiForget, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_by_self.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_by_self.py new file mode 100644 index 00000000..9a672f00 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_apps_by_self.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_apps_by_self.get import ApiForget + + +class OpenapiV1AppsBySelf( + ApiForget, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_envs_env.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_envs_env.py new file mode 100644 index 00000000..fa33f273 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_apps_envs_env.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_apps_envs_env.post import ApiForpost + + +class OpenapiV1AppsEnvsEnv( + ApiForpost, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_appnamespaces_public_namespace_name_instances.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_appnamespaces_public_namespace_name_instances.py new file mode 100644 index 00000000..faacdfe6 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_appnamespaces_public_namespace_name_instances.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_envs_env_appnamespaces_public_namespace_name_instances.get import ApiForget + + +class OpenapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstances( + ApiForget, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters.py new file mode 100644 index 00000000..2973643b --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters.post import ApiForpost + + +class OpenapiV1EnvsEnvAppsAppIdClusters( + ApiForpost, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name.py new file mode 100644 index 00000000..a4035040 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name.py @@ -0,0 +1,9 @@ +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name.get import ApiForget +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name.delete import ApiFordelete + + +class OpenapiV1EnvsEnvAppsAppIdClustersClusterName( + ApiForget, + ApiFordelete, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces.py new file mode 100644 index 00000000..0a26a78a --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces.get import ApiForget + + +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespaces( + ApiForget, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name.py new file mode 100644 index 00000000..1cc37c18 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name.get import ApiForget + + +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceName( + ApiForget, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches.py new file mode 100644 index 00000000..de663211 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches.py @@ -0,0 +1,9 @@ +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches.get import ApiForget +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches.post import ApiForpost + + +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranches( + ApiForget, + ApiForpost, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name.py new file mode 100644 index 00000000..ece2b786 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name.py @@ -0,0 +1,9 @@ +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name.delete import ApiFordelete +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name.patch import ApiForpatch + + +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchName( + ApiFordelete, + ApiForpatch, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases.py new file mode 100644 index 00000000..547118f8 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases.post import ApiForpost + + +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleases( + ApiForpost, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items.py new file mode 100644 index 00000000..ac8d34d1 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items.get import ApiForget + + +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItems( + ApiForget, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge.py new file mode 100644 index 00000000..fe318f72 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge.post import ApiForpost + + +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMerge( + ApiForpost, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases.py new file mode 100644 index 00000000..f3969837 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases.post import ApiForpost + + +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleases( + ApiForpost, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules.py new file mode 100644 index 00000000..0a6e965f --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules.py @@ -0,0 +1,9 @@ +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules.get import ApiForget +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules.put import ApiForput + + +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameRules( + ApiForget, + ApiForput, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key.py new file mode 100644 index 00000000..c60e7099 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key.py @@ -0,0 +1,11 @@ +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key.get import ApiForget +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key.put import ApiForput +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key.delete import ApiFordelete + + +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKey( + ApiForget, + ApiForput, + ApiFordelete, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances.py new file mode 100644 index 00000000..cf2b2268 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances.get import ApiForget + + +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstances( + ApiForget, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int.py new file mode 100644 index 00000000..74a45f75 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int.get import ApiForget + + +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotInt( + ApiForget, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items.py new file mode 100644 index 00000000..0438cb93 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items.py @@ -0,0 +1,9 @@ +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items.get import ApiForget +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items.post import ApiForpost + + +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItems( + ApiForget, + ApiForpost, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update.py new file mode 100644 index 00000000..706086b7 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update.put import ApiForput + + +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdate( + ApiForput, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare.py new file mode 100644 index 00000000..e43b1d6a --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare.post import ApiForpost + + +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsCompare( + ApiForpost, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key.py new file mode 100644 index 00000000..30b5b1e9 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key.py @@ -0,0 +1,11 @@ +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key.get import ApiForget +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key.put import ApiForput +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key.delete import ApiFordelete + + +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKey( + ApiForget, + ApiForput, + ApiFordelete, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert.py new file mode 100644 index 00000000..5c8218a9 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert.post import ApiForpost + + +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevert( + ApiForpost, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync.py new file mode 100644 index 00000000..9a5c0272 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync.post import ApiForpost + + +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSync( + ApiForpost, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate.py new file mode 100644 index 00000000..1819eed1 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate.post import ApiForpost + + +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidate( + ApiForpost, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock.py new file mode 100644 index 00000000..e269c3c7 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock.get import ApiForget + + +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLock( + ApiForget, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases.py new file mode 100644 index 00000000..0ea7414e --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases.post import ApiForpost + + +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleases( + ApiForpost, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active.py new file mode 100644 index 00000000..fa8b2a4c --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active.get import ApiForget + + +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActive( + ApiForget, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all.py new file mode 100644 index 00000000..da3e56ee --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all.get import ApiForget + + +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAll( + ApiForget, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest.py new file mode 100644 index 00000000..60683fb6 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest.get import ApiForget + + +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatest( + ApiForget, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_releases_release_id.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_releases_release_id.py new file mode 100644 index 00000000..45317652 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_releases_release_id.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_envs_env_releases_release_id.get import ApiForget + + +class OpenapiV1EnvsEnvReleasesReleaseId( + 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 new file mode 100644 index 00000000..73945760 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_releases_release_id_instances.py @@ -0,0 +1,7 @@ +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/paths/openapi_v1_envs_env_releases_release_id_rollback.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_releases_release_id_rollback.py new file mode 100644 index 00000000..0022e5fc --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_releases_release_id_rollback.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_envs_env_releases_release_id_rollback.put import ApiForput + + +class OpenapiV1EnvsEnvReleasesReleaseIdRollback( + ApiForput, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_organizations.py b/python/apollo_openapi/apis/paths/openapi_v1_organizations.py new file mode 100644 index 00000000..2b46c02e --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_organizations.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_organizations.get import ApiForget + + +class OpenapiV1Organizations( + ApiForget, +): + pass diff --git a/python/apollo_openapi/apis/tag_to_api.py b/python/apollo_openapi/apis/tag_to_api.py new file mode 100644 index 00000000..396e7df3 --- /dev/null +++ b/python/apollo_openapi/apis/tag_to_api.py @@ -0,0 +1,41 @@ +import typing_extensions + +from apollo_openapi.apis.tags import TagValues +from apollo_openapi.apis.tags.app_management_api import AppManagementApi +from apollo_openapi.apis.tags.item_management_api import ItemManagementApi +from apollo_openapi.apis.tags.release_management_api import ReleaseManagementApi +from apollo_openapi.apis.tags.cluster_management_api import ClusterManagementApi +from apollo_openapi.apis.tags.namespace_management_api import NamespaceManagementApi +from apollo_openapi.apis.tags.namespace_namespace_branch_management_api import NamespaceNamespaceBranchManagementApi +from apollo_openapi.apis.tags.instance_management_api import InstanceManagementApi +from apollo_openapi.apis.tags.organization_management_api import OrganizationManagementApi +from apollo_openapi.apis.tags.namespace_branch_management_api import NamespaceBranchManagementApi + +TagToApi = typing_extensions.TypedDict( + 'TagToApi', + { + TagValues.APP_MANAGEMENT: AppManagementApi, + TagValues.ITEM_MANAGEMENT: ItemManagementApi, + TagValues.RELEASE_MANAGEMENT: ReleaseManagementApi, + TagValues.CLUSTER_MANAGEMENT: ClusterManagementApi, + TagValues.NAMESPACE_MANAGEMENT: NamespaceManagementApi, + TagValues.NAMESPACE_NAMESPACE_BRANCH_MANAGEMENT: NamespaceNamespaceBranchManagementApi, + TagValues.INSTANCE_MANAGEMENT: InstanceManagementApi, + TagValues.ORGANIZATION_MANAGEMENT: OrganizationManagementApi, + TagValues.NAMESPACE_BRANCH_MANAGEMENT: NamespaceBranchManagementApi, + } +) + +tag_to_api = TagToApi( + { + TagValues.APP_MANAGEMENT: AppManagementApi, + TagValues.ITEM_MANAGEMENT: ItemManagementApi, + TagValues.RELEASE_MANAGEMENT: ReleaseManagementApi, + TagValues.CLUSTER_MANAGEMENT: ClusterManagementApi, + TagValues.NAMESPACE_MANAGEMENT: NamespaceManagementApi, + TagValues.NAMESPACE_NAMESPACE_BRANCH_MANAGEMENT: NamespaceNamespaceBranchManagementApi, + TagValues.INSTANCE_MANAGEMENT: InstanceManagementApi, + TagValues.ORGANIZATION_MANAGEMENT: OrganizationManagementApi, + TagValues.NAMESPACE_BRANCH_MANAGEMENT: NamespaceBranchManagementApi, + } +) diff --git a/python/apollo_openapi/apis/tags/__init__.py b/python/apollo_openapi/apis/tags/__init__.py new file mode 100644 index 00000000..d1a9aefd --- /dev/null +++ b/python/apollo_openapi/apis/tags/__init__.py @@ -0,0 +1,17 @@ +# 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.apis.tag_to_api import tag_to_api + +import enum + + +class TagValues(str, enum.Enum): + APP_MANAGEMENT = "App Management" + ITEM_MANAGEMENT = "Item Management" + RELEASE_MANAGEMENT = "Release Management" + CLUSTER_MANAGEMENT = "Cluster Management" + NAMESPACE_MANAGEMENT = "Namespace Management" + NAMESPACE_NAMESPACE_BRANCH_MANAGEMENT = "Namespace Namespace Branch Management" + INSTANCE_MANAGEMENT = "Instance Management" + ORGANIZATION_MANAGEMENT = "Organization Management" + NAMESPACE_BRANCH_MANAGEMENT = "Namespace Branch Management" diff --git a/python/apollo_openapi/apis/tags/app_management_api.py b/python/apollo_openapi/apis/tags/app_management_api.py new file mode 100644 index 00000000..5ee25dc7 --- /dev/null +++ b/python/apollo_openapi/apis/tags/app_management_api.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from apollo_openapi.paths.openapi_v1_apps.post import CreateApp +from apollo_openapi.paths.openapi_v1_apps_envs_env.post import CreateAppInEnv +from apollo_openapi.paths.openapi_v1_apps_app_id.delete import DeleteApp +from apollo_openapi.paths.openapi_v1_apps.get import FindApps +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.put import UpdateApp + + +class AppManagementApi( + CreateApp, + CreateAppInEnv, + DeleteApp, + FindApps, + FindAppsAuthorized, + FindMissEnvs, + GetApp, + GetAppNavTree, + GetAppsBySelf, + GetEnvClusterInfo, + UpdateApp, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/python/apollo_openapi/apis/tags/cluster_management_api.py b/python/apollo_openapi/apis/tags/cluster_management_api.py new file mode 100644 index 00000000..0a82d94a --- /dev/null +++ b/python/apollo_openapi/apis/tags/cluster_management_api.py @@ -0,0 +1,27 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters.post import CreateCluster +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name.delete import DeleteCluster +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name.get import GetCluster + + +class ClusterManagementApi( + CreateCluster, + DeleteCluster, + GetCluster, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/python/apollo_openapi/apis/tags/instance_management_api.py b/python/apollo_openapi/apis/tags/instance_management_api.py new file mode 100644 index 00000000..c381c87c --- /dev/null +++ b/python/apollo_openapi/apis/tags/instance_management_api.py @@ -0,0 +1,27 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances.get import GetInstanceCountByNamespace +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int.get import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet +from apollo_openapi.paths.openapi_v1_envs_env_releases_release_id_instances.get import OpenapiV1EnvsEnvReleasesReleaseIdInstancesGet + + +class InstanceManagementApi( + GetInstanceCountByNamespace, + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet, + OpenapiV1EnvsEnvReleasesReleaseIdInstancesGet, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/python/apollo_openapi/apis/tags/item_management_api.py b/python/apollo_openapi/apis/tags/item_management_api.py new file mode 100644 index 00000000..909e30b6 --- /dev/null +++ b/python/apollo_openapi/apis/tags/item_management_api.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update.put import BatchUpdateItemsByText +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare.post import CompareItems +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items.post import CreateItem +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key.delete import DeleteItem +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key.delete import DeleteItemByEncodedKey +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items.get import FindItemsByNamespace +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items.get import GetBranchItems +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key.get import GetItem +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key.get import GetItemByEncodedKey +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert.post import RevertItems +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync.post import SyncItems +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key.put import UpdateItem +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key.put import UpdateItemByEncodedKey +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate.post import ValidateItems + + +class ItemManagementApi( + BatchUpdateItemsByText, + CompareItems, + CreateItem, + DeleteItem, + DeleteItemByEncodedKey, + FindItemsByNamespace, + GetBranchItems, + GetItem, + GetItemByEncodedKey, + RevertItems, + SyncItems, + UpdateItem, + UpdateItemByEncodedKey, + ValidateItems, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/python/apollo_openapi/apis/tags/namespace_branch_management_api.py b/python/apollo_openapi/apis/tags/namespace_branch_management_api.py new file mode 100644 index 00000000..2f328bdf --- /dev/null +++ b/python/apollo_openapi/apis/tags/namespace_branch_management_api.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches.post import CreateBranch +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name.delete import DeleteBranch +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches.get import FindBranch +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules.get import GetBranchGrayRules +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name.patch import MergeBranch +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules.put import UpdateBranchRules + + +class NamespaceBranchManagementApi( + CreateBranch, + DeleteBranch, + FindBranch, + GetBranchGrayRules, + MergeBranch, + UpdateBranchRules, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/python/apollo_openapi/apis/tags/namespace_management_api.py b/python/apollo_openapi/apis/tags/namespace_management_api.py new file mode 100644 index 00000000..56b7a876 --- /dev/null +++ b/python/apollo_openapi/apis/tags/namespace_management_api.py @@ -0,0 +1,47 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check.get import CheckNamespaceIntegrity +from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces.post import CreateNamespace +from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces_namespace_name.delete import DeleteAppNamespace +from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links.delete import DeleteNamespaceLinks +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces.get import FindNamespaces +from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces_namespace_name.get import GetAppNamespace +from apollo_openapi.paths.openapi_v1_appnamespaces.get import GetAppNamespaces +from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces.get import GetAppNamespacesByApp +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock.get import GetNamespaceLock +from apollo_openapi.paths.openapi_v1_apps_app_id_namespaces_releases_status.get import GetNamespacesReleaseStatus +from apollo_openapi.paths.openapi_v1_envs_env_appnamespaces_public_namespace_name_instances.get import GetPublicAppNamespaceInstances +from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association.get import GetPublicNamespaceAssociation +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name.get import LoadNamespace + + +class NamespaceManagementApi( + CheckNamespaceIntegrity, + CreateNamespace, + DeleteAppNamespace, + DeleteNamespaceLinks, + FindNamespaces, + GetAppNamespace, + GetAppNamespaces, + GetAppNamespacesByApp, + GetNamespaceLock, + GetNamespacesReleaseStatus, + GetPublicAppNamespaceInstances, + GetPublicNamespaceAssociation, + LoadNamespace, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/python/apollo_openapi/apis/tags/organization_management_api.py b/python/apollo_openapi/apis/tags/organization_management_api.py new file mode 100644 index 00000000..93a903b1 --- /dev/null +++ b/python/apollo_openapi/apis/tags/organization_management_api.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from apollo_openapi.paths.openapi_v1_organizations.get import GetOrganization + + +class OrganizationManagementApi( + GetOrganization, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/python/apollo_openapi/apis/tags/release_management_api.py b/python/apollo_openapi/apis/tags/release_management_api.py new file mode 100644 index 00000000..1487c1f4 --- /dev/null +++ b/python/apollo_openapi/apis/tags/release_management_api.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases.post import CreateGrayDelRelease +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases.post import CreateGrayRelease +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases.post import CreateRelease +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active.get import FindActiveReleases +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all.get import FindAllReleases +from apollo_openapi.paths.openapi_v1_envs_env_releases_release_id.get import GetReleaseById +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest.get import LoadLatestActiveRelease +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge.post import Merge +from apollo_openapi.paths.openapi_v1_envs_env_releases_release_id_rollback.put import Rollback + + +class ReleaseManagementApi( + CreateGrayDelRelease, + CreateGrayRelease, + CreateRelease, + FindActiveReleases, + FindAllReleases, + GetReleaseById, + LoadLatestActiveRelease, + Merge, + Rollback, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/python/apollo_openapi/configuration.py b/python/apollo_openapi/configuration.py index 2a65cd87..479da71a 100644 --- a/python/apollo_openapi/configuration.py +++ b/python/apollo_openapi/configuration.py @@ -3,151 +3,69 @@ """ Apollo OpenAPI - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` +

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 OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - + Generated by: https://openapi-generator.tech +""" import copy -import http.client as httplib import logging -from logging import FileHandler import multiprocessing import sys -from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union -from typing_extensions import NotRequired, Self - import urllib3 +from http import client as http_client +from apollo_openapi.exceptions import ApiValueError + JSON_SCHEMA_VALIDATION_KEYWORDS = { 'multipleOf', 'maximum', 'exclusiveMaximum', 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' + 'minLength', 'pattern', 'maxItems', 'minItems', + 'uniqueItems', 'maxProperties', 'minProperties', } -ServerVariablesT = Dict[str, str] - -GenericAuthSetting = TypedDict( - "GenericAuthSetting", - { - "type": str, - "in": str, - "key": str, - "value": str, - }, -) - - -OAuth2AuthSetting = TypedDict( - "OAuth2AuthSetting", - { - "type": Literal["oauth2"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": str, - }, -) - - -APIKeyAuthSetting = TypedDict( - "APIKeyAuthSetting", - { - "type": Literal["api_key"], - "in": str, - "key": str, - "value": Optional[str], - }, -) - - -BasicAuthSetting = TypedDict( - "BasicAuthSetting", - { - "type": Literal["basic"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": Optional[str], - }, -) - - -BearerFormatAuthSetting = TypedDict( - "BearerFormatAuthSetting", - { - "type": Literal["bearer"], - "in": Literal["header"], - "format": Literal["JWT"], - "key": Literal["Authorization"], - "value": str, - }, -) - - -BearerAuthSetting = TypedDict( - "BearerAuthSetting", - { - "type": Literal["bearer"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": str, - }, -) - - -HTTPSignatureAuthSetting = TypedDict( - "HTTPSignatureAuthSetting", - { - "type": Literal["http-signature"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": None, - }, -) - +class Configuration(object): + """NOTE: This class is auto generated by OpenAPI Generator -AuthSettings = TypedDict( - "AuthSettings", - { - "ApiKeyAuth": APIKeyAuthSetting, - }, - total=False, -) - - -class HostSettingVariable(TypedDict): - description: str - default_value: str - enum_values: List[str] - - -class HostSetting(TypedDict): - url: str - description: str - variables: NotRequired[Dict[str, HostSettingVariable]] - - -class Configuration: - """This class contains various settings of the API client. + Ref: https://openapi-generator.tech + Do not edit the class manually. - :param host: Base url. - :param ignore_operation_servers - Boolean to ignore operation servers for the API client. - Config will use `host` as the base url regardless of the operation servers. + :param host: Base url :param api_key: Dict to store API key(s). Each entry in the dict specifies an API key. The dict key is the name of the security scheme in the OAS specification. The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + :param api_key_prefix: Dict to store API prefix (e.g. Bearer) The dict key is the name of the security scheme in the OAS specification. The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. + :param username: Username for HTTP basic authentication + :param password: Password for HTTP basic authentication + :param discard_unknown_keys: Boolean value indicating whether to discard + unknown properties. A server may send a response that includes additional + properties that are not known by the client in the following scenarios: + 1. The OpenAPI document is incomplete, i.e. it does not match the server + implementation. + 2. The client was generated using an older version of the OpenAPI document + and the server has been upgraded since then. + If a schema in the OpenAPI document defines the additionalProperties attribute, + then all undeclared properties received by the server are injected into the + additional properties map. In that case, there are undeclared properties, and + nothing to discard. + :param disabled_client_side_validations (string): Comma-separated list of + JSON schema validation keywords to disable JSON schema structural validation + rules. The following keywords may be specified: multipleOf, maximum, + exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, + maxItems, minItems. + By default, the validation is performed for data generated locally by the client + and data received from the server, independent of any validation performed by + the server side. If the input data does not satisfy the JSON schema validation + rules specified in the OpenAPI document, an exception is raised. + If disabled_client_side_validations is set, structural validation is + disabled. This can be useful to troubleshoot data validation problem, such as + when the OpenAPI document validation rules do not match the actual API data + received by the server. :param server_index: Index to servers configuration. :param server_variables: Mapping with string values to replace variables in templated server configuration. The validation of enums is performed for @@ -156,13 +74,7 @@ class Configuration: configuration. :param server_operation_variables: Mapping from operation ID to a mapping with string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - :param retries: Number of retries for API requests. - :param ca_cert_data: verify the peer using concatenated CA certificate data - in PEM (str) or DER (bytes) format. + The validation of enums is performed for variables with defined enum values before. :Example: @@ -186,27 +98,20 @@ class Configuration: Cookie: JSESSIONID abc123 """ - _default: ClassVar[Optional[Self]] = None + _default = None def __init__( self, - host: Optional[str]=None, - api_key: Optional[Dict[str, str]]=None, - api_key_prefix: Optional[Dict[str, str]]=None, - username: Optional[str]=None, - password: Optional[str]=None, - access_token: Optional[str]=None, - server_index: Optional[int]=None, - server_variables: Optional[ServerVariablesT]=None, - server_operation_index: Optional[Dict[int, int]]=None, - server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, - ignore_operation_servers: bool=False, - ssl_ca_cert: Optional[str]=None, - retries: Optional[int] = None, - ca_cert_data: Optional[Union[str, bytes]] = None, - *, - debug: Optional[bool] = None, - ) -> None: + host=None, + api_key=None, + api_key_prefix=None, + discard_unknown_keys=False, + disabled_client_side_validations="", + server_index=None, + server_variables=None, + server_operation_index=None, + server_operation_variables=None, + ): """Constructor """ self._base_path = "http://localhost" if host is None else host @@ -220,9 +125,6 @@ def __init__( self.server_operation_variables = server_operation_variables or {} """Default server variables """ - self.ignore_operation_servers = ignore_operation_servers - """Ignore operation servers - """ self.temp_folder_path = None """Temp file folder for downloading files """ @@ -240,15 +142,7 @@ def __init__( self.refresh_api_key_hook = None """function hook to refresh API key if expired """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ + self.disabled_client_side_validations = disabled_client_side_validations self.logger = {} """Logging Settings """ @@ -260,16 +154,13 @@ def __init__( self.logger_stream_handler = None """Log stream handler """ - self.logger_file_handler: Optional[FileHandler] = None + self.logger_file_handler = None """Log file handler """ self.logger_file = None """Debug file location """ - if debug is not None: - self.debug = debug - else: - self.__debug = False + self.debug = False """Debug switch """ @@ -278,13 +169,9 @@ def __init__( Set this to false to skip verifying SSL certificate when calling API from https server. """ - self.ssl_ca_cert = ssl_ca_cert + self.ssl_ca_cert = None """Set this to customize the certificate file to verify the peer. """ - self.ca_cert_data = ca_cert_data - """Set this to verify the peer using PEM (str) or DER (bytes) - certificate data. - """ self.cert_file = None """client certificate file """ @@ -307,7 +194,7 @@ def __init__( cpu_count * 5 is used as default value to increase performance. """ - self.proxy: Optional[str] = None + self.proxy = None """Proxy URL """ self.proxy_headers = None @@ -316,25 +203,16 @@ def __init__( self.safe_chars_for_path_param = '' """Safe chars for path_param """ - self.retries = retries + self.retries = None """Adding retries to override urllib3 default value 3 """ # Enable client side validation self.client_side_validation = True + # Options to pass down to the underlying urllib3 socket self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo: Dict[int, Any]) -> Self: + def __deepcopy__(self, memo): cls = self.__class__ result = cls.__new__(cls) memo[id(self)] = result @@ -348,11 +226,18 @@ def __deepcopy__(self, memo: Dict[int, Any]) -> Self: result.debug = self.debug return result - def __setattr__(self, name: str, value: Any) -> None: + def __setattr__(self, name, value): object.__setattr__(self, name, value) + if name == 'disabled_client_side_validations': + s = set(filter(None, value.split(','))) + for v in s: + if v not in JSON_SCHEMA_VALIDATION_KEYWORDS: + raise ApiValueError( + "Invalid keyword: '{0}''".format(v)) + self._disabled_client_side_validations = s @classmethod - def set_default(cls, default: Optional[Self]) -> None: + def set_default(cls, default): """Set default instance of configuration. It stores default configuration, which can be @@ -360,34 +245,24 @@ def set_default(cls, default: Optional[Self]) -> None: :param default: object of Configuration """ - cls._default = default + cls._default = copy.deepcopy(default) @classmethod - def get_default_copy(cls) -> Self: - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls) -> Self: - """Return the default configuration. + def get_default_copy(cls): + """Return new instance of configuration. This method returns newly created, based on default constructor, object of Configuration class or returns a copy of default - configuration. + configuration passed by the set_default method. :return: The configuration object. """ - if cls._default is None: - cls._default = cls() - return cls._default + if cls._default is not None: + return copy.deepcopy(cls._default) + return Configuration() @property - def logger_file(self) -> Optional[str]: + def logger_file(self): """The logger file. If the logger_file is None, then add stream handler and remove file @@ -399,7 +274,7 @@ def logger_file(self) -> Optional[str]: return self.__logger_file @logger_file.setter - def logger_file(self, value: Optional[str]) -> None: + def logger_file(self, value): """The logger file. If the logger_file is None, then add stream handler and remove file @@ -418,7 +293,7 @@ def logger_file(self, value: Optional[str]) -> None: logger.addHandler(self.logger_file_handler) @property - def debug(self) -> bool: + def debug(self): """Debug status :param value: The debug status, True or False. @@ -427,7 +302,7 @@ def debug(self) -> bool: return self.__debug @debug.setter - def debug(self, value: bool) -> None: + def debug(self, value): """Debug status :param value: The debug status, True or False. @@ -438,18 +313,18 @@ def debug(self, value: bool) -> None: # if debug status is True, turn on debug logging for _, logger in self.logger.items(): logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 + # turn on http_client debug + http_client.HTTPConnection.debuglevel = 1 else: # if debug status is False, turn off debug logging, # setting log level to default `logging.WARNING` for _, logger in self.logger.items(): logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 + # turn off http_client debug + http_client.HTTPConnection.debuglevel = 0 @property - def logger_format(self) -> str: + def logger_format(self): """The logger format. The logger_formatter will be updated when sets logger_format. @@ -460,7 +335,7 @@ def logger_format(self) -> str: return self.__logger_format @logger_format.setter - def logger_format(self, value: str) -> None: + def logger_format(self, value): """The logger format. The logger_formatter will be updated when sets logger_format. @@ -471,7 +346,7 @@ def logger_format(self, value: str) -> None: self.__logger_format = value self.logger_formatter = logging.Formatter(self.__logger_format) - def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: + def get_api_key_with_prefix(self, identifier, alias=None): """Gets API key (with prefix if set). :param identifier: The identifier of apiKey. @@ -488,9 +363,7 @@ def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> else: return key - return None - - def get_basic_auth_token(self) -> Optional[str]: + def get_basic_auth_token(self): """Gets HTTP basic authentication header (string). :return: The token for basic HTTP authentication. @@ -505,12 +378,12 @@ def get_basic_auth_token(self) -> Optional[str]: basic_auth=username + ':' + password ).get('authorization') - def auth_settings(self)-> AuthSettings: + def auth_settings(self): """Gets Auth Settings dict for api client. :return: The Auth Settings information dict. """ - auth: AuthSettings = {} + auth = {} if 'ApiKeyAuth' in self.api_key: auth['ApiKeyAuth'] = { 'type': 'api_key', @@ -522,7 +395,7 @@ def auth_settings(self)-> AuthSettings: } return auth - def to_debug_report(self) -> str: + def to_debug_report(self): """Gets the essential information for debugging. :return: The report for debugging. @@ -534,7 +407,7 @@ def to_debug_report(self) -> str: "SDK Package Version: 0.0.1".\ format(env=sys.platform, pyversion=sys.version) - def get_host_settings(self) -> List[HostSetting]: + def get_host_settings(self): """Gets an array of host settings :return: An array of host settings @@ -546,12 +419,7 @@ def get_host_settings(self) -> List[HostSetting]: } ] - def get_host_from_settings( - self, - index: Optional[int], - variables: Optional[ServerVariablesT]=None, - servers: Optional[List[HostSetting]]=None, - ) -> str: + def get_host_from_settings(self, index, variables=None, servers=None): """Gets host URL based on the index and variables :param index: array index of the host settings :param variables: hash of variable and the corresponding value @@ -591,12 +459,12 @@ def get_host_from_settings( return url @property - def host(self) -> str: + def host(self): """Return generated host.""" return self.get_host_from_settings(self.server_index, variables=self.server_variables) @host.setter - def host(self, value: str) -> None: + def host(self, value): """Fix base path.""" self._base_path = value self.server_index = None diff --git a/python/apollo_openapi/exceptions.py b/python/apollo_openapi/exceptions.py index 2dfa3935..b0792d46 100644 --- a/python/apollo_openapi/exceptions.py +++ b/python/apollo_openapi/exceptions.py @@ -3,16 +3,16 @@ """ Apollo OpenAPI - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` +

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 OpenAPI Generator (https://openapi-generator.tech) + Generated by: https://openapi-generator.tech +""" +import dataclasses +import typing - Do not edit the class manually. -""" # noqa: E501 +from urllib3._collections import HTTPHeaderDict -from typing import Any, Optional -from typing_extensions import Self class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" @@ -20,7 +20,7 @@ class OpenApiException(Exception): class ApiTypeError(OpenApiException, TypeError): def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: + key_type=None): """ Raises an exception for TypeErrors Args: @@ -48,7 +48,7 @@ def __init__(self, msg, path_to_item=None, valid_classes=None, class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: + def __init__(self, msg, path_to_item=None): """ Args: msg (str): the exception message @@ -66,7 +66,7 @@ def __init__(self, msg, path_to_item=None) -> None: class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: + def __init__(self, msg, path_to_item=None): """ Raised when an attribute reference or assignment fails. @@ -85,7 +85,7 @@ def __init__(self, msg, path_to_item=None) -> None: class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: + def __init__(self, msg, path_to_item=None): """ Args: msg (str): the exception message @@ -101,65 +101,26 @@ def __init__(self, msg, path_to_item=None) -> None: super(ApiKeyError, self).__init__(full_msg) -class ApiException(OpenApiException): - - def __init__( - self, - status=None, - reason=None, - http_resp=None, - *, - body: Optional[str] = None, - data: Optional[Any] = None, - ) -> None: - self.status = status - self.reason = reason - self.body = body - self.data = data - self.headers = None - - if http_resp: - if self.status is None: - self.status = http_resp.status - if self.reason is None: - self.reason = http_resp.reason - if self.body is None: - try: - self.body = http_resp.data.decode('utf-8') - except Exception: - pass - self.headers = http_resp.getheaders() - - @classmethod - def from_response( - cls, - *, - http_resp, - body: Optional[str], - data: Optional[Any], - ) -> Self: - if http_resp.status == 400: - raise BadRequestException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 401: - raise UnauthorizedException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 403: - raise ForbiddenException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 404: - raise NotFoundException(http_resp=http_resp, body=body, data=data) - - # Added new conditions for 409 and 422 - if http_resp.status == 409: - raise ConflictException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 422: - raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data) - - if 500 <= http_resp.status <= 599: - raise ServiceException(http_resp=http_resp, body=body, data=data) - raise ApiException(http_resp=http_resp, body=body, data=data) +T = typing.TypeVar("T") + + +@dataclasses.dataclass +class ApiException(OpenApiException, typing.Generic[T]): + status: int + reason: str + api_response: typing.Optional[T] = None + + @property + def body(self) -> typing.Union[str, bytes, None]: + if not self.api_response: + return None + return self.api_response.response.data + + @property + def headers(self) -> typing.Optional[HTTPHeaderDict]: + if not self.api_response: + return None + return self.api_response.response.getheaders() def __str__(self): """Custom error messages for exception""" @@ -169,42 +130,12 @@ def __str__(self): error_message += "HTTP response headers: {0}\n".format( self.headers) - if self.data or self.body: - error_message += "HTTP response body: {0}\n".format(self.data or self.body) + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) return error_message -class BadRequestException(ApiException): - pass - - -class NotFoundException(ApiException): - pass - - -class UnauthorizedException(ApiException): - pass - - -class ForbiddenException(ApiException): - pass - - -class ServiceException(ApiException): - pass - - -class ConflictException(ApiException): - """Exception for HTTP 409 Conflict.""" - pass - - -class UnprocessableEntityException(ApiException): - """Exception for HTTP 422 Unprocessable Entity.""" - pass - - def render_path(path_to_item): """Returns a string representation of a path""" result = "" diff --git a/python/apollo_openapi/model/__init__.py b/python/apollo_openapi/model/__init__.py new file mode 100644 index 00000000..0305d033 --- /dev/null +++ b/python/apollo_openapi/model/__init__.py @@ -0,0 +1,5 @@ +# we can not import model classes here because that would create a circular +# reference which would not work in python2 +# do not import all models into this module because that uses a lot of memory and stack frames +# if you need the ability to import all models from one package, import them with +# from apollo_openapi.models import ModelA, ModelB diff --git a/python/apollo_openapi/model/exception_response.py b/python/apollo_openapi/model/exception_response.py new file mode 100644 index 00000000..d11665ca --- /dev/null +++ b/python/apollo_openapi/model/exception_response.py @@ -0,0 +1,60 @@ +# 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 ExceptionResponse( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + 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: + # dict_instance[name] accessor + return super().__getitem__(name) + + def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + return super().get_item_oapg(name) + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + _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, ], + ) -> 'ExceptionResponse': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/exception_response.pyi b/python/apollo_openapi/model/exception_response.pyi new file mode 100644 index 00000000..d11665ca --- /dev/null +++ b/python/apollo_openapi/model/exception_response.pyi @@ -0,0 +1,60 @@ +# 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 ExceptionResponse( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + 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: + # dict_instance[name] accessor + return super().__getitem__(name) + + def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + return super().get_item_oapg(name) + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + _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, ], + ) -> 'ExceptionResponse': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/kv_entity.py b/python/apollo_openapi/model/kv_entity.py new file mode 100644 index 00000000..b511e03a --- /dev/null +++ b/python/apollo_openapi/model/kv_entity.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 KVEntity( + 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: + key = schemas.StrSchema + value = schemas.StrSchema + __annotations__ = { + "key": key, + "value": value, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["key"]) -> MetaOapg.properties.key: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["value"]) -> MetaOapg.properties.value: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["key", "value", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["key"]) -> typing.Union[MetaOapg.properties.key, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["value"]) -> typing.Union[MetaOapg.properties.value, 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["key", "value", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + key: typing.Union[MetaOapg.properties.key, str, schemas.Unset] = schemas.unset, + value: typing.Union[MetaOapg.properties.value, str, schemas.Unset] = schemas.unset, + _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], + ) -> 'KVEntity': + return super().__new__( + cls, + *_args, + key=key, + value=value, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/kv_entity.pyi b/python/apollo_openapi/model/kv_entity.pyi new file mode 100644 index 00000000..b511e03a --- /dev/null +++ b/python/apollo_openapi/model/kv_entity.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 KVEntity( + 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: + key = schemas.StrSchema + value = schemas.StrSchema + __annotations__ = { + "key": key, + "value": value, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["key"]) -> MetaOapg.properties.key: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["value"]) -> MetaOapg.properties.value: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["key", "value", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["key"]) -> typing.Union[MetaOapg.properties.key, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["value"]) -> typing.Union[MetaOapg.properties.value, 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["key", "value", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + key: typing.Union[MetaOapg.properties.key, str, schemas.Unset] = schemas.unset, + value: typing.Union[MetaOapg.properties.value, str, schemas.Unset] = schemas.unset, + _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], + ) -> 'KVEntity': + return super().__new__( + cls, + *_args, + key=key, + value=value, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/map_string.py b/python/apollo_openapi/model/map_string.py new file mode 100644 index 00000000..ad35f54b --- /dev/null +++ b/python/apollo_openapi/model/map_string.py @@ -0,0 +1,57 @@ +# 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 MapString( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + additional_properties = schemas.StrSchema + + def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + # dict_instance[name] accessor + return super().__getitem__(name) + + def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + return super().get_item_oapg(name) + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[MetaOapg.additional_properties, str, ], + ) -> 'MapString': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/map_string.pyi b/python/apollo_openapi/model/map_string.pyi new file mode 100644 index 00000000..ad35f54b --- /dev/null +++ b/python/apollo_openapi/model/map_string.pyi @@ -0,0 +1,57 @@ +# 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 MapString( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + additional_properties = schemas.StrSchema + + def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + # dict_instance[name] accessor + return super().__getitem__(name) + + def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + return super().get_item_oapg(name) + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[MetaOapg.additional_properties, str, ], + ) -> 'MapString': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/multi_response_entity.py b/python/apollo_openapi/model/multi_response_entity.py new file mode 100644 index 00000000..bb463e4b --- /dev/null +++ b/python/apollo_openapi/model/multi_response_entity.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

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

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + + +class MultiResponseEntity( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A response container holding multiple RichResponseEntity objects + """ + + + class MetaOapg: + required = { + "code", + "entities", + } + + class properties: + code = schemas.IntSchema + + + class entities( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['RichResponseEntity']: + return RichResponseEntity + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['RichResponseEntity'], typing.List['RichResponseEntity']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'entities': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'RichResponseEntity': + return super().__getitem__(i) + __annotations__ = { + "code": code, + "entities": entities, + } + + code: MetaOapg.properties.code + entities: MetaOapg.properties.entities + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["entities"]) -> MetaOapg.properties.entities: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "entities", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["entities"]) -> MetaOapg.properties.entities: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "entities", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + code: typing.Union[MetaOapg.properties.code, decimal.Decimal, int, ], + entities: typing.Union[MetaOapg.properties.entities, list, tuple, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'MultiResponseEntity': + return super().__new__( + cls, + *_args, + code=code, + entities=entities, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.rich_response_entity import RichResponseEntity diff --git a/python/apollo_openapi/model/namespace_gray_del_release_dto.py b/python/apollo_openapi/model/namespace_gray_del_release_dto.py new file mode 100644 index 00000000..6626d896 --- /dev/null +++ b/python/apollo_openapi/model/namespace_gray_del_release_dto.py @@ -0,0 +1,142 @@ +# 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 NamespaceGrayDelReleaseDTO( + 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: + releaseTitle = schemas.StrSchema + releaseComment = schemas.StrSchema + releasedBy = schemas.StrSchema + isEmergencyPublish = schemas.BoolSchema + + + class grayDelKeys( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'grayDelKeys': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + __annotations__ = { + "releaseTitle": releaseTitle, + "releaseComment": releaseComment, + "releasedBy": releasedBy, + "isEmergencyPublish": isEmergencyPublish, + "grayDelKeys": grayDelKeys, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["releaseTitle"]) -> MetaOapg.properties.releaseTitle: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["releaseComment"]) -> MetaOapg.properties.releaseComment: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["releasedBy"]) -> MetaOapg.properties.releasedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["isEmergencyPublish"]) -> MetaOapg.properties.isEmergencyPublish: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["grayDelKeys"]) -> MetaOapg.properties.grayDelKeys: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["releaseTitle", "releaseComment", "releasedBy", "isEmergencyPublish", "grayDelKeys", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["releaseTitle"]) -> typing.Union[MetaOapg.properties.releaseTitle, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["releaseComment"]) -> typing.Union[MetaOapg.properties.releaseComment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["releasedBy"]) -> typing.Union[MetaOapg.properties.releasedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["isEmergencyPublish"]) -> typing.Union[MetaOapg.properties.isEmergencyPublish, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["grayDelKeys"]) -> typing.Union[MetaOapg.properties.grayDelKeys, 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["releaseTitle", "releaseComment", "releasedBy", "isEmergencyPublish", "grayDelKeys", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + releaseTitle: typing.Union[MetaOapg.properties.releaseTitle, str, schemas.Unset] = schemas.unset, + releaseComment: typing.Union[MetaOapg.properties.releaseComment, str, schemas.Unset] = schemas.unset, + releasedBy: typing.Union[MetaOapg.properties.releasedBy, str, schemas.Unset] = schemas.unset, + isEmergencyPublish: typing.Union[MetaOapg.properties.isEmergencyPublish, bool, schemas.Unset] = schemas.unset, + grayDelKeys: typing.Union[MetaOapg.properties.grayDelKeys, 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], + ) -> 'NamespaceGrayDelReleaseDTO': + return super().__new__( + cls, + *_args, + releaseTitle=releaseTitle, + releaseComment=releaseComment, + releasedBy=releasedBy, + isEmergencyPublish=isEmergencyPublish, + grayDelKeys=grayDelKeys, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/namespace_gray_del_release_dto.pyi b/python/apollo_openapi/model/namespace_gray_del_release_dto.pyi new file mode 100644 index 00000000..6626d896 --- /dev/null +++ b/python/apollo_openapi/model/namespace_gray_del_release_dto.pyi @@ -0,0 +1,142 @@ +# 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 NamespaceGrayDelReleaseDTO( + 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: + releaseTitle = schemas.StrSchema + releaseComment = schemas.StrSchema + releasedBy = schemas.StrSchema + isEmergencyPublish = schemas.BoolSchema + + + class grayDelKeys( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'grayDelKeys': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + __annotations__ = { + "releaseTitle": releaseTitle, + "releaseComment": releaseComment, + "releasedBy": releasedBy, + "isEmergencyPublish": isEmergencyPublish, + "grayDelKeys": grayDelKeys, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["releaseTitle"]) -> MetaOapg.properties.releaseTitle: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["releaseComment"]) -> MetaOapg.properties.releaseComment: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["releasedBy"]) -> MetaOapg.properties.releasedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["isEmergencyPublish"]) -> MetaOapg.properties.isEmergencyPublish: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["grayDelKeys"]) -> MetaOapg.properties.grayDelKeys: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["releaseTitle", "releaseComment", "releasedBy", "isEmergencyPublish", "grayDelKeys", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["releaseTitle"]) -> typing.Union[MetaOapg.properties.releaseTitle, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["releaseComment"]) -> typing.Union[MetaOapg.properties.releaseComment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["releasedBy"]) -> typing.Union[MetaOapg.properties.releasedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["isEmergencyPublish"]) -> typing.Union[MetaOapg.properties.isEmergencyPublish, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["grayDelKeys"]) -> typing.Union[MetaOapg.properties.grayDelKeys, 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["releaseTitle", "releaseComment", "releasedBy", "isEmergencyPublish", "grayDelKeys", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + releaseTitle: typing.Union[MetaOapg.properties.releaseTitle, str, schemas.Unset] = schemas.unset, + releaseComment: typing.Union[MetaOapg.properties.releaseComment, str, schemas.Unset] = schemas.unset, + releasedBy: typing.Union[MetaOapg.properties.releasedBy, str, schemas.Unset] = schemas.unset, + isEmergencyPublish: typing.Union[MetaOapg.properties.isEmergencyPublish, bool, schemas.Unset] = schemas.unset, + grayDelKeys: typing.Union[MetaOapg.properties.grayDelKeys, 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], + ) -> 'NamespaceGrayDelReleaseDTO': + return super().__new__( + cls, + *_args, + releaseTitle=releaseTitle, + releaseComment=releaseComment, + releasedBy=releasedBy, + isEmergencyPublish=isEmergencyPublish, + grayDelKeys=grayDelKeys, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/namespace_release_dto.py b/python/apollo_openapi/model/namespace_release_dto.py new file mode 100644 index 00000000..45b8dd94 --- /dev/null +++ b/python/apollo_openapi/model/namespace_release_dto.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + + +class NamespaceReleaseDTO( + 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: + releaseTitle = schemas.StrSchema + releaseComment = schemas.StrSchema + releasedBy = schemas.StrSchema + isEmergencyPublish = schemas.BoolSchema + __annotations__ = { + "releaseTitle": releaseTitle, + "releaseComment": releaseComment, + "releasedBy": releasedBy, + "isEmergencyPublish": isEmergencyPublish, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["releaseTitle"]) -> MetaOapg.properties.releaseTitle: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["releaseComment"]) -> MetaOapg.properties.releaseComment: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["releasedBy"]) -> MetaOapg.properties.releasedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["isEmergencyPublish"]) -> MetaOapg.properties.isEmergencyPublish: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["releaseTitle", "releaseComment", "releasedBy", "isEmergencyPublish", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["releaseTitle"]) -> typing.Union[MetaOapg.properties.releaseTitle, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["releaseComment"]) -> typing.Union[MetaOapg.properties.releaseComment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["releasedBy"]) -> typing.Union[MetaOapg.properties.releasedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["isEmergencyPublish"]) -> typing.Union[MetaOapg.properties.isEmergencyPublish, 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["releaseTitle", "releaseComment", "releasedBy", "isEmergencyPublish", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + releaseTitle: typing.Union[MetaOapg.properties.releaseTitle, str, schemas.Unset] = schemas.unset, + releaseComment: typing.Union[MetaOapg.properties.releaseComment, str, schemas.Unset] = schemas.unset, + releasedBy: typing.Union[MetaOapg.properties.releasedBy, str, schemas.Unset] = schemas.unset, + isEmergencyPublish: typing.Union[MetaOapg.properties.isEmergencyPublish, bool, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'NamespaceReleaseDTO': + return super().__new__( + cls, + *_args, + releaseTitle=releaseTitle, + releaseComment=releaseComment, + releasedBy=releasedBy, + isEmergencyPublish=isEmergencyPublish, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/namespace_release_dto.pyi b/python/apollo_openapi/model/namespace_release_dto.pyi new file mode 100644 index 00000000..45b8dd94 --- /dev/null +++ b/python/apollo_openapi/model/namespace_release_dto.pyi @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + + +class NamespaceReleaseDTO( + 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: + releaseTitle = schemas.StrSchema + releaseComment = schemas.StrSchema + releasedBy = schemas.StrSchema + isEmergencyPublish = schemas.BoolSchema + __annotations__ = { + "releaseTitle": releaseTitle, + "releaseComment": releaseComment, + "releasedBy": releasedBy, + "isEmergencyPublish": isEmergencyPublish, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["releaseTitle"]) -> MetaOapg.properties.releaseTitle: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["releaseComment"]) -> MetaOapg.properties.releaseComment: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["releasedBy"]) -> MetaOapg.properties.releasedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["isEmergencyPublish"]) -> MetaOapg.properties.isEmergencyPublish: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["releaseTitle", "releaseComment", "releasedBy", "isEmergencyPublish", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["releaseTitle"]) -> typing.Union[MetaOapg.properties.releaseTitle, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["releaseComment"]) -> typing.Union[MetaOapg.properties.releaseComment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["releasedBy"]) -> typing.Union[MetaOapg.properties.releasedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["isEmergencyPublish"]) -> typing.Union[MetaOapg.properties.isEmergencyPublish, 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["releaseTitle", "releaseComment", "releasedBy", "isEmergencyPublish", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + releaseTitle: typing.Union[MetaOapg.properties.releaseTitle, str, schemas.Unset] = schemas.unset, + releaseComment: typing.Union[MetaOapg.properties.releaseComment, str, schemas.Unset] = schemas.unset, + releasedBy: typing.Union[MetaOapg.properties.releasedBy, str, schemas.Unset] = schemas.unset, + isEmergencyPublish: typing.Union[MetaOapg.properties.isEmergencyPublish, bool, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'NamespaceReleaseDTO': + return super().__new__( + cls, + *_args, + releaseTitle=releaseTitle, + releaseComment=releaseComment, + releasedBy=releasedBy, + isEmergencyPublish=isEmergencyPublish, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/open_app_dto.py b/python/apollo_openapi/model/open_app_dto.py new file mode 100644 index 00000000..e64ede59 --- /dev/null +++ b/python/apollo_openapi/model/open_app_dto.py @@ -0,0 +1,170 @@ +# 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 OpenAppDTO( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Apollo应用信息数据传输对象,包含应用的基本信息和元数据 + """ + + + class MetaOapg: + + class properties: + dataChangeCreatedBy = schemas.StrSchema + dataChangeLastModifiedBy = schemas.StrSchema + dataChangeCreatedTime = schemas.StrSchema + dataChangeLastModifiedTime = schemas.StrSchema + name = schemas.StrSchema + appId = schemas.StrSchema + orgId = schemas.StrSchema + orgName = schemas.StrSchema + ownerName = schemas.StrSchema + ownerEmail = schemas.StrSchema + __annotations__ = { + "dataChangeCreatedBy": dataChangeCreatedBy, + "dataChangeLastModifiedBy": dataChangeLastModifiedBy, + "dataChangeCreatedTime": dataChangeCreatedTime, + "dataChangeLastModifiedTime": dataChangeLastModifiedTime, + "name": name, + "appId": appId, + "orgId": orgId, + "orgName": orgName, + "ownerName": ownerName, + "ownerEmail": ownerEmail, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> MetaOapg.properties.dataChangeCreatedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> MetaOapg.properties.dataChangeCreatedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> MetaOapg.properties.dataChangeLastModifiedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["orgId"]) -> MetaOapg.properties.orgId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["orgName"]) -> MetaOapg.properties.orgName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["ownerName"]) -> MetaOapg.properties.ownerName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["ownerEmail"]) -> MetaOapg.properties.ownerEmail: ... + + @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]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["appId"]) -> typing.Union[MetaOapg.properties.appId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["orgId"]) -> typing.Union[MetaOapg.properties.orgId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["orgName"]) -> typing.Union[MetaOapg.properties.orgName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["ownerName"]) -> typing.Union[MetaOapg.properties.ownerName, schemas.Unset]: ... + + @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: 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]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + dataChangeCreatedBy: typing.Union[MetaOapg.properties.dataChangeCreatedBy, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, str, schemas.Unset] = schemas.unset, + dataChangeCreatedTime: typing.Union[MetaOapg.properties.dataChangeCreatedTime, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedTime: typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, str, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset, + orgId: typing.Union[MetaOapg.properties.orgId, str, schemas.Unset] = schemas.unset, + 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, + _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': + return super().__new__( + cls, + *_args, + dataChangeCreatedBy=dataChangeCreatedBy, + dataChangeLastModifiedBy=dataChangeLastModifiedBy, + dataChangeCreatedTime=dataChangeCreatedTime, + dataChangeLastModifiedTime=dataChangeLastModifiedTime, + name=name, + appId=appId, + orgId=orgId, + orgName=orgName, + ownerName=ownerName, + ownerEmail=ownerEmail, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/open_app_dto.pyi b/python/apollo_openapi/model/open_app_dto.pyi new file mode 100644 index 00000000..e64ede59 --- /dev/null +++ b/python/apollo_openapi/model/open_app_dto.pyi @@ -0,0 +1,170 @@ +# 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 OpenAppDTO( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Apollo应用信息数据传输对象,包含应用的基本信息和元数据 + """ + + + class MetaOapg: + + class properties: + dataChangeCreatedBy = schemas.StrSchema + dataChangeLastModifiedBy = schemas.StrSchema + dataChangeCreatedTime = schemas.StrSchema + dataChangeLastModifiedTime = schemas.StrSchema + name = schemas.StrSchema + appId = schemas.StrSchema + orgId = schemas.StrSchema + orgName = schemas.StrSchema + ownerName = schemas.StrSchema + ownerEmail = schemas.StrSchema + __annotations__ = { + "dataChangeCreatedBy": dataChangeCreatedBy, + "dataChangeLastModifiedBy": dataChangeLastModifiedBy, + "dataChangeCreatedTime": dataChangeCreatedTime, + "dataChangeLastModifiedTime": dataChangeLastModifiedTime, + "name": name, + "appId": appId, + "orgId": orgId, + "orgName": orgName, + "ownerName": ownerName, + "ownerEmail": ownerEmail, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> MetaOapg.properties.dataChangeCreatedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> MetaOapg.properties.dataChangeCreatedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> MetaOapg.properties.dataChangeLastModifiedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["orgId"]) -> MetaOapg.properties.orgId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["orgName"]) -> MetaOapg.properties.orgName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["ownerName"]) -> MetaOapg.properties.ownerName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["ownerEmail"]) -> MetaOapg.properties.ownerEmail: ... + + @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]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["appId"]) -> typing.Union[MetaOapg.properties.appId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["orgId"]) -> typing.Union[MetaOapg.properties.orgId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["orgName"]) -> typing.Union[MetaOapg.properties.orgName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["ownerName"]) -> typing.Union[MetaOapg.properties.ownerName, schemas.Unset]: ... + + @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: 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]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + dataChangeCreatedBy: typing.Union[MetaOapg.properties.dataChangeCreatedBy, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, str, schemas.Unset] = schemas.unset, + dataChangeCreatedTime: typing.Union[MetaOapg.properties.dataChangeCreatedTime, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedTime: typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, str, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset, + orgId: typing.Union[MetaOapg.properties.orgId, str, schemas.Unset] = schemas.unset, + 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, + _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': + return super().__new__( + cls, + *_args, + dataChangeCreatedBy=dataChangeCreatedBy, + dataChangeLastModifiedBy=dataChangeLastModifiedBy, + dataChangeCreatedTime=dataChangeCreatedTime, + dataChangeLastModifiedTime=dataChangeLastModifiedTime, + name=name, + appId=appId, + orgId=orgId, + orgName=orgName, + ownerName=ownerName, + ownerEmail=ownerEmail, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/open_app_namespace_dto.py b/python/apollo_openapi/model/open_app_namespace_dto.py new file mode 100644 index 00000000..e3fc945a --- /dev/null +++ b/python/apollo_openapi/model/open_app_namespace_dto.py @@ -0,0 +1,170 @@ +# 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 OpenAppNamespaceDTO( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 + """ + + + class MetaOapg: + + class properties: + dataChangeCreatedBy = schemas.StrSchema + dataChangeLastModifiedBy = schemas.StrSchema + dataChangeCreatedTime = schemas.StrSchema + dataChangeLastModifiedTime = schemas.StrSchema + name = schemas.StrSchema + appId = schemas.StrSchema + format = schemas.StrSchema + isPublic = schemas.BoolSchema + appendNamespacePrefix = schemas.BoolSchema + comment = schemas.StrSchema + __annotations__ = { + "dataChangeCreatedBy": dataChangeCreatedBy, + "dataChangeLastModifiedBy": dataChangeLastModifiedBy, + "dataChangeCreatedTime": dataChangeCreatedTime, + "dataChangeLastModifiedTime": dataChangeLastModifiedTime, + "name": name, + "appId": appId, + "format": format, + "isPublic": isPublic, + "appendNamespacePrefix": appendNamespacePrefix, + "comment": comment, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> MetaOapg.properties.dataChangeCreatedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> MetaOapg.properties.dataChangeCreatedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> MetaOapg.properties.dataChangeLastModifiedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["format"]) -> MetaOapg.properties.format: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["isPublic"]) -> MetaOapg.properties.isPublic: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["appendNamespacePrefix"]) -> MetaOapg.properties.appendNamespacePrefix: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "format", "isPublic", "appendNamespacePrefix", "comment", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["appId"]) -> typing.Union[MetaOapg.properties.appId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["format"]) -> typing.Union[MetaOapg.properties.format, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["isPublic"]) -> typing.Union[MetaOapg.properties.isPublic, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["appendNamespacePrefix"]) -> typing.Union[MetaOapg.properties.appendNamespacePrefix, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "format", "isPublic", "appendNamespacePrefix", "comment", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + dataChangeCreatedBy: typing.Union[MetaOapg.properties.dataChangeCreatedBy, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, str, schemas.Unset] = schemas.unset, + dataChangeCreatedTime: typing.Union[MetaOapg.properties.dataChangeCreatedTime, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedTime: typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, str, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset, + format: typing.Union[MetaOapg.properties.format, str, schemas.Unset] = schemas.unset, + isPublic: typing.Union[MetaOapg.properties.isPublic, bool, schemas.Unset] = schemas.unset, + appendNamespacePrefix: typing.Union[MetaOapg.properties.appendNamespacePrefix, bool, schemas.Unset] = schemas.unset, + comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OpenAppNamespaceDTO': + return super().__new__( + cls, + *_args, + dataChangeCreatedBy=dataChangeCreatedBy, + dataChangeLastModifiedBy=dataChangeLastModifiedBy, + dataChangeCreatedTime=dataChangeCreatedTime, + dataChangeLastModifiedTime=dataChangeLastModifiedTime, + name=name, + appId=appId, + format=format, + isPublic=isPublic, + appendNamespacePrefix=appendNamespacePrefix, + comment=comment, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/open_app_namespace_dto.pyi b/python/apollo_openapi/model/open_app_namespace_dto.pyi new file mode 100644 index 00000000..e3fc945a --- /dev/null +++ b/python/apollo_openapi/model/open_app_namespace_dto.pyi @@ -0,0 +1,170 @@ +# 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 OpenAppNamespaceDTO( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 + """ + + + class MetaOapg: + + class properties: + dataChangeCreatedBy = schemas.StrSchema + dataChangeLastModifiedBy = schemas.StrSchema + dataChangeCreatedTime = schemas.StrSchema + dataChangeLastModifiedTime = schemas.StrSchema + name = schemas.StrSchema + appId = schemas.StrSchema + format = schemas.StrSchema + isPublic = schemas.BoolSchema + appendNamespacePrefix = schemas.BoolSchema + comment = schemas.StrSchema + __annotations__ = { + "dataChangeCreatedBy": dataChangeCreatedBy, + "dataChangeLastModifiedBy": dataChangeLastModifiedBy, + "dataChangeCreatedTime": dataChangeCreatedTime, + "dataChangeLastModifiedTime": dataChangeLastModifiedTime, + "name": name, + "appId": appId, + "format": format, + "isPublic": isPublic, + "appendNamespacePrefix": appendNamespacePrefix, + "comment": comment, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> MetaOapg.properties.dataChangeCreatedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> MetaOapg.properties.dataChangeCreatedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> MetaOapg.properties.dataChangeLastModifiedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["format"]) -> MetaOapg.properties.format: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["isPublic"]) -> MetaOapg.properties.isPublic: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["appendNamespacePrefix"]) -> MetaOapg.properties.appendNamespacePrefix: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "format", "isPublic", "appendNamespacePrefix", "comment", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["appId"]) -> typing.Union[MetaOapg.properties.appId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["format"]) -> typing.Union[MetaOapg.properties.format, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["isPublic"]) -> typing.Union[MetaOapg.properties.isPublic, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["appendNamespacePrefix"]) -> typing.Union[MetaOapg.properties.appendNamespacePrefix, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "format", "isPublic", "appendNamespacePrefix", "comment", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + dataChangeCreatedBy: typing.Union[MetaOapg.properties.dataChangeCreatedBy, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, str, schemas.Unset] = schemas.unset, + dataChangeCreatedTime: typing.Union[MetaOapg.properties.dataChangeCreatedTime, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedTime: typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, str, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset, + format: typing.Union[MetaOapg.properties.format, str, schemas.Unset] = schemas.unset, + isPublic: typing.Union[MetaOapg.properties.isPublic, bool, schemas.Unset] = schemas.unset, + appendNamespacePrefix: typing.Union[MetaOapg.properties.appendNamespacePrefix, bool, schemas.Unset] = schemas.unset, + comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OpenAppNamespaceDTO': + return super().__new__( + cls, + *_args, + dataChangeCreatedBy=dataChangeCreatedBy, + dataChangeLastModifiedBy=dataChangeLastModifiedBy, + dataChangeCreatedTime=dataChangeCreatedTime, + dataChangeLastModifiedTime=dataChangeLastModifiedTime, + name=name, + appId=appId, + format=format, + isPublic=isPublic, + appendNamespacePrefix=appendNamespacePrefix, + comment=comment, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/open_cluster_dto.py b/python/apollo_openapi/model/open_cluster_dto.py new file mode 100644 index 00000000..f46ca779 --- /dev/null +++ b/python/apollo_openapi/model/open_cluster_dto.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + + +class OpenClusterDTO( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 + """ + + + class MetaOapg: + + class properties: + dataChangeCreatedBy = schemas.StrSchema + dataChangeLastModifiedBy = schemas.StrSchema + dataChangeCreatedTime = schemas.StrSchema + dataChangeLastModifiedTime = schemas.StrSchema + name = schemas.StrSchema + appId = schemas.StrSchema + __annotations__ = { + "dataChangeCreatedBy": dataChangeCreatedBy, + "dataChangeLastModifiedBy": dataChangeLastModifiedBy, + "dataChangeCreatedTime": dataChangeCreatedTime, + "dataChangeLastModifiedTime": dataChangeLastModifiedTime, + "name": name, + "appId": appId, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> MetaOapg.properties.dataChangeCreatedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> MetaOapg.properties.dataChangeCreatedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> MetaOapg.properties.dataChangeLastModifiedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["appId"]) -> typing.Union[MetaOapg.properties.appId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + dataChangeCreatedBy: typing.Union[MetaOapg.properties.dataChangeCreatedBy, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, str, schemas.Unset] = schemas.unset, + dataChangeCreatedTime: typing.Union[MetaOapg.properties.dataChangeCreatedTime, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedTime: typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, str, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OpenClusterDTO': + return super().__new__( + cls, + *_args, + dataChangeCreatedBy=dataChangeCreatedBy, + dataChangeLastModifiedBy=dataChangeLastModifiedBy, + dataChangeCreatedTime=dataChangeCreatedTime, + dataChangeLastModifiedTime=dataChangeLastModifiedTime, + name=name, + appId=appId, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/open_cluster_dto.pyi b/python/apollo_openapi/model/open_cluster_dto.pyi new file mode 100644 index 00000000..f46ca779 --- /dev/null +++ b/python/apollo_openapi/model/open_cluster_dto.pyi @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + + +class OpenClusterDTO( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 + """ + + + class MetaOapg: + + class properties: + dataChangeCreatedBy = schemas.StrSchema + dataChangeLastModifiedBy = schemas.StrSchema + dataChangeCreatedTime = schemas.StrSchema + dataChangeLastModifiedTime = schemas.StrSchema + name = schemas.StrSchema + appId = schemas.StrSchema + __annotations__ = { + "dataChangeCreatedBy": dataChangeCreatedBy, + "dataChangeLastModifiedBy": dataChangeLastModifiedBy, + "dataChangeCreatedTime": dataChangeCreatedTime, + "dataChangeLastModifiedTime": dataChangeLastModifiedTime, + "name": name, + "appId": appId, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> MetaOapg.properties.dataChangeCreatedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> MetaOapg.properties.dataChangeCreatedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> MetaOapg.properties.dataChangeLastModifiedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["appId"]) -> typing.Union[MetaOapg.properties.appId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + dataChangeCreatedBy: typing.Union[MetaOapg.properties.dataChangeCreatedBy, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, str, schemas.Unset] = schemas.unset, + dataChangeCreatedTime: typing.Union[MetaOapg.properties.dataChangeCreatedTime, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedTime: typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, str, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OpenClusterDTO': + return super().__new__( + cls, + *_args, + dataChangeCreatedBy=dataChangeCreatedBy, + dataChangeLastModifiedBy=dataChangeLastModifiedBy, + dataChangeCreatedTime=dataChangeCreatedTime, + dataChangeLastModifiedTime=dataChangeLastModifiedTime, + name=name, + appId=appId, + _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 new file mode 100644 index 00000000..97b1ef15 --- /dev/null +++ b/python/apollo_openapi/model/open_create_app_dto.py @@ -0,0 +1,127 @@ +# 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 OpenCreateAppDTO( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 + """ + + + class MetaOapg: + + class properties: + assignAppRoleToSelf = schemas.BoolSchema + + + class admins( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'admins': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + @staticmethod + def app() -> typing.Type['OpenAppDTO']: + return OpenAppDTO + __annotations__ = { + "assignAppRoleToSelf": assignAppRoleToSelf, + "admins": admins, + "app": app, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["assignAppRoleToSelf"]) -> MetaOapg.properties.assignAppRoleToSelf: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["admins"]) -> MetaOapg.properties.admins: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["app"]) -> 'OpenAppDTO': ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["assignAppRoleToSelf", "admins", "app", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["assignAppRoleToSelf"]) -> typing.Union[MetaOapg.properties.assignAppRoleToSelf, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["admins"]) -> typing.Union[MetaOapg.properties.admins, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["app"]) -> typing.Union['OpenAppDTO', 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["assignAppRoleToSelf", "admins", "app", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + assignAppRoleToSelf: typing.Union[MetaOapg.properties.assignAppRoleToSelf, bool, schemas.Unset] = schemas.unset, + admins: typing.Union[MetaOapg.properties.admins, list, tuple, schemas.Unset] = schemas.unset, + app: typing.Union['OpenAppDTO', 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], + ) -> 'OpenCreateAppDTO': + return super().__new__( + cls, + *_args, + assignAppRoleToSelf=assignAppRoleToSelf, + admins=admins, + app=app, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.open_app_dto import OpenAppDTO diff --git a/python/apollo_openapi/model/open_create_app_dto.pyi b/python/apollo_openapi/model/open_create_app_dto.pyi new file mode 100644 index 00000000..97b1ef15 --- /dev/null +++ b/python/apollo_openapi/model/open_create_app_dto.pyi @@ -0,0 +1,127 @@ +# 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 OpenCreateAppDTO( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 + """ + + + class MetaOapg: + + class properties: + assignAppRoleToSelf = schemas.BoolSchema + + + class admins( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'admins': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + @staticmethod + def app() -> typing.Type['OpenAppDTO']: + return OpenAppDTO + __annotations__ = { + "assignAppRoleToSelf": assignAppRoleToSelf, + "admins": admins, + "app": app, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["assignAppRoleToSelf"]) -> MetaOapg.properties.assignAppRoleToSelf: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["admins"]) -> MetaOapg.properties.admins: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["app"]) -> 'OpenAppDTO': ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["assignAppRoleToSelf", "admins", "app", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["assignAppRoleToSelf"]) -> typing.Union[MetaOapg.properties.assignAppRoleToSelf, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["admins"]) -> typing.Union[MetaOapg.properties.admins, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["app"]) -> typing.Union['OpenAppDTO', 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["assignAppRoleToSelf", "admins", "app", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + assignAppRoleToSelf: typing.Union[MetaOapg.properties.assignAppRoleToSelf, bool, schemas.Unset] = schemas.unset, + admins: typing.Union[MetaOapg.properties.admins, list, tuple, schemas.Unset] = schemas.unset, + app: typing.Union['OpenAppDTO', 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], + ) -> 'OpenCreateAppDTO': + return super().__new__( + cls, + *_args, + assignAppRoleToSelf=assignAppRoleToSelf, + admins=admins, + app=app, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.open_app_dto import OpenAppDTO diff --git a/python/apollo_openapi/model/open_env_cluster_dto.py b/python/apollo_openapi/model/open_env_cluster_dto.py new file mode 100644 index 00000000..3cc64a76 --- /dev/null +++ b/python/apollo_openapi/model/open_env_cluster_dto.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + + +class OpenEnvClusterDTO( + 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: + env = schemas.StrSchema + + + class clusters( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'clusters': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + __annotations__ = { + "env": env, + "clusters": clusters, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["env"]) -> MetaOapg.properties.env: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["clusters"]) -> MetaOapg.properties.clusters: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["env", "clusters", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["env"]) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["clusters"]) -> typing.Union[MetaOapg.properties.clusters, 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["env", "clusters", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + 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, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OpenEnvClusterDTO': + return super().__new__( + cls, + *_args, + env=env, + clusters=clusters, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/open_env_cluster_dto.pyi b/python/apollo_openapi/model/open_env_cluster_dto.pyi new file mode 100644 index 00000000..3cc64a76 --- /dev/null +++ b/python/apollo_openapi/model/open_env_cluster_dto.pyi @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + + +class OpenEnvClusterDTO( + 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: + env = schemas.StrSchema + + + class clusters( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'clusters': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + __annotations__ = { + "env": env, + "clusters": clusters, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["env"]) -> MetaOapg.properties.env: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["clusters"]) -> MetaOapg.properties.clusters: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["env", "clusters", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["env"]) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["clusters"]) -> typing.Union[MetaOapg.properties.clusters, 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["env", "clusters", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + 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, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OpenEnvClusterDTO': + return super().__new__( + cls, + *_args, + env=env, + clusters=clusters, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/open_env_cluster_info.py b/python/apollo_openapi/model/open_env_cluster_info.py new file mode 100644 index 00000000..f73e1d6f --- /dev/null +++ b/python/apollo_openapi/model/open_env_cluster_info.py @@ -0,0 +1,115 @@ +# 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 OpenEnvClusterInfo( + 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: + env = schemas.StrSchema + + + class clusters( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenClusterDTO']: + return OpenClusterDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenClusterDTO'], typing.List['OpenClusterDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'clusters': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenClusterDTO': + return super().__getitem__(i) + __annotations__ = { + "env": env, + "clusters": clusters, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["env"]) -> MetaOapg.properties.env: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["clusters"]) -> MetaOapg.properties.clusters: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["env", "clusters", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["env"]) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["clusters"]) -> typing.Union[MetaOapg.properties.clusters, 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["env", "clusters", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + 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, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OpenEnvClusterInfo': + return super().__new__( + cls, + *_args, + env=env, + clusters=clusters, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.open_cluster_dto import OpenClusterDTO diff --git a/python/apollo_openapi/model/open_env_cluster_info.pyi b/python/apollo_openapi/model/open_env_cluster_info.pyi new file mode 100644 index 00000000..f73e1d6f --- /dev/null +++ b/python/apollo_openapi/model/open_env_cluster_info.pyi @@ -0,0 +1,115 @@ +# 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 OpenEnvClusterInfo( + 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: + env = schemas.StrSchema + + + class clusters( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenClusterDTO']: + return OpenClusterDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenClusterDTO'], typing.List['OpenClusterDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'clusters': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenClusterDTO': + return super().__getitem__(i) + __annotations__ = { + "env": env, + "clusters": clusters, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["env"]) -> MetaOapg.properties.env: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["clusters"]) -> MetaOapg.properties.clusters: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["env", "clusters", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["env"]) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["clusters"]) -> typing.Union[MetaOapg.properties.clusters, 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["env", "clusters", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + 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, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OpenEnvClusterInfo': + return super().__new__( + cls, + *_args, + env=env, + clusters=clusters, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.open_cluster_dto import OpenClusterDTO diff --git a/python/apollo_openapi/model/open_gray_release_rule_dto.py b/python/apollo_openapi/model/open_gray_release_rule_dto.py new file mode 100644 index 00000000..3ebb6ec2 --- /dev/null +++ b/python/apollo_openapi/model/open_gray_release_rule_dto.py @@ -0,0 +1,187 @@ +# 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 OpenGrayReleaseRuleDTO( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 + """ + + + class MetaOapg: + + class properties: + dataChangeCreatedBy = schemas.StrSchema + dataChangeLastModifiedBy = schemas.StrSchema + dataChangeCreatedTime = schemas.StrSchema + dataChangeLastModifiedTime = schemas.StrSchema + appId = schemas.StrSchema + clusterName = schemas.StrSchema + namespaceName = schemas.StrSchema + branchName = schemas.StrSchema + + + class ruleItems( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenGrayReleaseRuleItemDTO']: + return OpenGrayReleaseRuleItemDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenGrayReleaseRuleItemDTO'], typing.List['OpenGrayReleaseRuleItemDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'ruleItems': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenGrayReleaseRuleItemDTO': + return super().__getitem__(i) + __annotations__ = { + "dataChangeCreatedBy": dataChangeCreatedBy, + "dataChangeLastModifiedBy": dataChangeLastModifiedBy, + "dataChangeCreatedTime": dataChangeCreatedTime, + "dataChangeLastModifiedTime": dataChangeLastModifiedTime, + "appId": appId, + "clusterName": clusterName, + "namespaceName": namespaceName, + "branchName": branchName, + "ruleItems": ruleItems, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> MetaOapg.properties.dataChangeCreatedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> MetaOapg.properties.dataChangeCreatedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> MetaOapg.properties.dataChangeLastModifiedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["clusterName"]) -> MetaOapg.properties.clusterName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["namespaceName"]) -> MetaOapg.properties.namespaceName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["branchName"]) -> MetaOapg.properties.branchName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["ruleItems"]) -> MetaOapg.properties.ruleItems: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "appId", "clusterName", "namespaceName", "branchName", "ruleItems", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["appId"]) -> typing.Union[MetaOapg.properties.appId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["clusterName"]) -> typing.Union[MetaOapg.properties.clusterName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["namespaceName"]) -> typing.Union[MetaOapg.properties.namespaceName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["branchName"]) -> typing.Union[MetaOapg.properties.branchName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["ruleItems"]) -> typing.Union[MetaOapg.properties.ruleItems, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "appId", "clusterName", "namespaceName", "branchName", "ruleItems", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + dataChangeCreatedBy: typing.Union[MetaOapg.properties.dataChangeCreatedBy, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, str, schemas.Unset] = schemas.unset, + dataChangeCreatedTime: typing.Union[MetaOapg.properties.dataChangeCreatedTime, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedTime: typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, str, schemas.Unset] = schemas.unset, + appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset, + clusterName: typing.Union[MetaOapg.properties.clusterName, str, schemas.Unset] = schemas.unset, + namespaceName: typing.Union[MetaOapg.properties.namespaceName, str, schemas.Unset] = schemas.unset, + branchName: typing.Union[MetaOapg.properties.branchName, str, schemas.Unset] = schemas.unset, + ruleItems: typing.Union[MetaOapg.properties.ruleItems, 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], + ) -> 'OpenGrayReleaseRuleDTO': + return super().__new__( + cls, + *_args, + dataChangeCreatedBy=dataChangeCreatedBy, + dataChangeLastModifiedBy=dataChangeLastModifiedBy, + dataChangeCreatedTime=dataChangeCreatedTime, + dataChangeLastModifiedTime=dataChangeLastModifiedTime, + appId=appId, + clusterName=clusterName, + namespaceName=namespaceName, + branchName=branchName, + ruleItems=ruleItems, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.open_gray_release_rule_item_dto import OpenGrayReleaseRuleItemDTO diff --git a/python/apollo_openapi/model/open_gray_release_rule_dto.pyi b/python/apollo_openapi/model/open_gray_release_rule_dto.pyi new file mode 100644 index 00000000..3ebb6ec2 --- /dev/null +++ b/python/apollo_openapi/model/open_gray_release_rule_dto.pyi @@ -0,0 +1,187 @@ +# 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 OpenGrayReleaseRuleDTO( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 + """ + + + class MetaOapg: + + class properties: + dataChangeCreatedBy = schemas.StrSchema + dataChangeLastModifiedBy = schemas.StrSchema + dataChangeCreatedTime = schemas.StrSchema + dataChangeLastModifiedTime = schemas.StrSchema + appId = schemas.StrSchema + clusterName = schemas.StrSchema + namespaceName = schemas.StrSchema + branchName = schemas.StrSchema + + + class ruleItems( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenGrayReleaseRuleItemDTO']: + return OpenGrayReleaseRuleItemDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenGrayReleaseRuleItemDTO'], typing.List['OpenGrayReleaseRuleItemDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'ruleItems': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenGrayReleaseRuleItemDTO': + return super().__getitem__(i) + __annotations__ = { + "dataChangeCreatedBy": dataChangeCreatedBy, + "dataChangeLastModifiedBy": dataChangeLastModifiedBy, + "dataChangeCreatedTime": dataChangeCreatedTime, + "dataChangeLastModifiedTime": dataChangeLastModifiedTime, + "appId": appId, + "clusterName": clusterName, + "namespaceName": namespaceName, + "branchName": branchName, + "ruleItems": ruleItems, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> MetaOapg.properties.dataChangeCreatedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> MetaOapg.properties.dataChangeCreatedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> MetaOapg.properties.dataChangeLastModifiedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["clusterName"]) -> MetaOapg.properties.clusterName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["namespaceName"]) -> MetaOapg.properties.namespaceName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["branchName"]) -> MetaOapg.properties.branchName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["ruleItems"]) -> MetaOapg.properties.ruleItems: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "appId", "clusterName", "namespaceName", "branchName", "ruleItems", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["appId"]) -> typing.Union[MetaOapg.properties.appId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["clusterName"]) -> typing.Union[MetaOapg.properties.clusterName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["namespaceName"]) -> typing.Union[MetaOapg.properties.namespaceName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["branchName"]) -> typing.Union[MetaOapg.properties.branchName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["ruleItems"]) -> typing.Union[MetaOapg.properties.ruleItems, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "appId", "clusterName", "namespaceName", "branchName", "ruleItems", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + dataChangeCreatedBy: typing.Union[MetaOapg.properties.dataChangeCreatedBy, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, str, schemas.Unset] = schemas.unset, + dataChangeCreatedTime: typing.Union[MetaOapg.properties.dataChangeCreatedTime, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedTime: typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, str, schemas.Unset] = schemas.unset, + appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset, + clusterName: typing.Union[MetaOapg.properties.clusterName, str, schemas.Unset] = schemas.unset, + namespaceName: typing.Union[MetaOapg.properties.namespaceName, str, schemas.Unset] = schemas.unset, + branchName: typing.Union[MetaOapg.properties.branchName, str, schemas.Unset] = schemas.unset, + ruleItems: typing.Union[MetaOapg.properties.ruleItems, 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], + ) -> 'OpenGrayReleaseRuleDTO': + return super().__new__( + cls, + *_args, + dataChangeCreatedBy=dataChangeCreatedBy, + dataChangeLastModifiedBy=dataChangeLastModifiedBy, + dataChangeCreatedTime=dataChangeCreatedTime, + dataChangeLastModifiedTime=dataChangeLastModifiedTime, + appId=appId, + clusterName=clusterName, + namespaceName=namespaceName, + branchName=branchName, + ruleItems=ruleItems, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.open_gray_release_rule_item_dto import OpenGrayReleaseRuleItemDTO diff --git a/python/apollo_openapi/model/open_gray_release_rule_item_dto.py b/python/apollo_openapi/model/open_gray_release_rule_item_dto.py new file mode 100644 index 00000000..b3c93ea5 --- /dev/null +++ b/python/apollo_openapi/model/open_gray_release_rule_item_dto.py @@ -0,0 +1,144 @@ +# 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 OpenGrayReleaseRuleItemDTO( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 + """ + + + class MetaOapg: + + class properties: + clientAppId = schemas.StrSchema + + + class clientIpList( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'clientIpList': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + + class clientLabelList( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'clientLabelList': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + __annotations__ = { + "clientAppId": clientAppId, + "clientIpList": clientIpList, + "clientLabelList": clientLabelList, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["clientAppId"]) -> MetaOapg.properties.clientAppId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["clientIpList"]) -> MetaOapg.properties.clientIpList: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["clientLabelList"]) -> MetaOapg.properties.clientLabelList: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["clientAppId", "clientIpList", "clientLabelList", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["clientAppId"]) -> typing.Union[MetaOapg.properties.clientAppId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["clientIpList"]) -> typing.Union[MetaOapg.properties.clientIpList, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["clientLabelList"]) -> typing.Union[MetaOapg.properties.clientLabelList, 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["clientAppId", "clientIpList", "clientLabelList", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + clientAppId: typing.Union[MetaOapg.properties.clientAppId, str, schemas.Unset] = schemas.unset, + clientIpList: typing.Union[MetaOapg.properties.clientIpList, list, tuple, schemas.Unset] = schemas.unset, + clientLabelList: typing.Union[MetaOapg.properties.clientLabelList, 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], + ) -> 'OpenGrayReleaseRuleItemDTO': + return super().__new__( + cls, + *_args, + clientAppId=clientAppId, + clientIpList=clientIpList, + clientLabelList=clientLabelList, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/open_gray_release_rule_item_dto.pyi b/python/apollo_openapi/model/open_gray_release_rule_item_dto.pyi new file mode 100644 index 00000000..b3c93ea5 --- /dev/null +++ b/python/apollo_openapi/model/open_gray_release_rule_item_dto.pyi @@ -0,0 +1,144 @@ +# 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 OpenGrayReleaseRuleItemDTO( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 + """ + + + class MetaOapg: + + class properties: + clientAppId = schemas.StrSchema + + + class clientIpList( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'clientIpList': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + + class clientLabelList( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'clientLabelList': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + __annotations__ = { + "clientAppId": clientAppId, + "clientIpList": clientIpList, + "clientLabelList": clientLabelList, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["clientAppId"]) -> MetaOapg.properties.clientAppId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["clientIpList"]) -> MetaOapg.properties.clientIpList: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["clientLabelList"]) -> MetaOapg.properties.clientLabelList: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["clientAppId", "clientIpList", "clientLabelList", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["clientAppId"]) -> typing.Union[MetaOapg.properties.clientAppId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["clientIpList"]) -> typing.Union[MetaOapg.properties.clientIpList, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["clientLabelList"]) -> typing.Union[MetaOapg.properties.clientLabelList, 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["clientAppId", "clientIpList", "clientLabelList", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + clientAppId: typing.Union[MetaOapg.properties.clientAppId, str, schemas.Unset] = schemas.unset, + clientIpList: typing.Union[MetaOapg.properties.clientIpList, list, tuple, schemas.Unset] = schemas.unset, + clientLabelList: typing.Union[MetaOapg.properties.clientLabelList, 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], + ) -> 'OpenGrayReleaseRuleItemDTO': + return super().__new__( + cls, + *_args, + clientAppId=clientAppId, + clientIpList=clientIpList, + clientLabelList=clientLabelList, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/open_instance_config_dto.py b/python/apollo_openapi/model/open_instance_config_dto.py new file mode 100644 index 00000000..a8e0f3d5 --- /dev/null +++ b/python/apollo_openapi/model/open_instance_config_dto.py @@ -0,0 +1,103 @@ +# 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 OpenInstanceConfigDTO( + 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: + + @staticmethod + def release() -> typing.Type['OpenReleaseDTO']: + return OpenReleaseDTO + releaseDeliveryTime = schemas.StrSchema + dataChangeLastModifiedTime = schemas.StrSchema + __annotations__ = { + "release": release, + "releaseDeliveryTime": releaseDeliveryTime, + "dataChangeLastModifiedTime": dataChangeLastModifiedTime, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["release"]) -> 'OpenReleaseDTO': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["releaseDeliveryTime"]) -> MetaOapg.properties.releaseDeliveryTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> MetaOapg.properties.dataChangeLastModifiedTime: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["release", "releaseDeliveryTime", "dataChangeLastModifiedTime", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["release"]) -> typing.Union['OpenReleaseDTO', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["releaseDeliveryTime"]) -> typing.Union[MetaOapg.properties.releaseDeliveryTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["release", "releaseDeliveryTime", "dataChangeLastModifiedTime", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + release: typing.Union['OpenReleaseDTO', schemas.Unset] = schemas.unset, + releaseDeliveryTime: typing.Union[MetaOapg.properties.releaseDeliveryTime, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedTime: typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, 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], + ) -> 'OpenInstanceConfigDTO': + return super().__new__( + cls, + *_args, + release=release, + releaseDeliveryTime=releaseDeliveryTime, + dataChangeLastModifiedTime=dataChangeLastModifiedTime, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.open_release_dto import OpenReleaseDTO diff --git a/python/apollo_openapi/model/open_instance_config_dto.pyi b/python/apollo_openapi/model/open_instance_config_dto.pyi new file mode 100644 index 00000000..a8e0f3d5 --- /dev/null +++ b/python/apollo_openapi/model/open_instance_config_dto.pyi @@ -0,0 +1,103 @@ +# 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 OpenInstanceConfigDTO( + 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: + + @staticmethod + def release() -> typing.Type['OpenReleaseDTO']: + return OpenReleaseDTO + releaseDeliveryTime = schemas.StrSchema + dataChangeLastModifiedTime = schemas.StrSchema + __annotations__ = { + "release": release, + "releaseDeliveryTime": releaseDeliveryTime, + "dataChangeLastModifiedTime": dataChangeLastModifiedTime, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["release"]) -> 'OpenReleaseDTO': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["releaseDeliveryTime"]) -> MetaOapg.properties.releaseDeliveryTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> MetaOapg.properties.dataChangeLastModifiedTime: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["release", "releaseDeliveryTime", "dataChangeLastModifiedTime", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["release"]) -> typing.Union['OpenReleaseDTO', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["releaseDeliveryTime"]) -> typing.Union[MetaOapg.properties.releaseDeliveryTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["release", "releaseDeliveryTime", "dataChangeLastModifiedTime", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + release: typing.Union['OpenReleaseDTO', schemas.Unset] = schemas.unset, + releaseDeliveryTime: typing.Union[MetaOapg.properties.releaseDeliveryTime, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedTime: typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, 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], + ) -> 'OpenInstanceConfigDTO': + return super().__new__( + cls, + *_args, + release=release, + releaseDeliveryTime=releaseDeliveryTime, + dataChangeLastModifiedTime=dataChangeLastModifiedTime, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.open_release_dto import OpenReleaseDTO diff --git a/python/apollo_openapi/model/open_instance_dto.py b/python/apollo_openapi/model/open_instance_dto.py new file mode 100644 index 00000000..30dc65b7 --- /dev/null +++ b/python/apollo_openapi/model/open_instance_dto.py @@ -0,0 +1,165 @@ +# 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 OpenInstanceDTO( + 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: + id = schemas.Int64Schema + appId = schemas.StrSchema + clusterName = schemas.StrSchema + dataCenter = schemas.StrSchema + ip = schemas.StrSchema + + + class configs( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenInstanceConfigDTO']: + return OpenInstanceConfigDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenInstanceConfigDTO'], typing.List['OpenInstanceConfigDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'configs': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenInstanceConfigDTO': + return super().__getitem__(i) + dataChangeCreatedTime = schemas.StrSchema + __annotations__ = { + "id": id, + "appId": appId, + "clusterName": clusterName, + "dataCenter": dataCenter, + "ip": ip, + "configs": configs, + "dataChangeCreatedTime": dataChangeCreatedTime, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["clusterName"]) -> MetaOapg.properties.clusterName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataCenter"]) -> MetaOapg.properties.dataCenter: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["ip"]) -> MetaOapg.properties.ip: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["configs"]) -> MetaOapg.properties.configs: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> MetaOapg.properties.dataChangeCreatedTime: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "appId", "clusterName", "dataCenter", "ip", "configs", "dataChangeCreatedTime", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["appId"]) -> typing.Union[MetaOapg.properties.appId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["clusterName"]) -> typing.Union[MetaOapg.properties.clusterName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataCenter"]) -> typing.Union[MetaOapg.properties.dataCenter, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["ip"]) -> typing.Union[MetaOapg.properties.ip, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["configs"]) -> typing.Union[MetaOapg.properties.configs, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "appId", "clusterName", "dataCenter", "ip", "configs", "dataChangeCreatedTime", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, + appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset, + clusterName: typing.Union[MetaOapg.properties.clusterName, str, schemas.Unset] = schemas.unset, + dataCenter: typing.Union[MetaOapg.properties.dataCenter, str, schemas.Unset] = schemas.unset, + ip: typing.Union[MetaOapg.properties.ip, str, schemas.Unset] = schemas.unset, + configs: typing.Union[MetaOapg.properties.configs, list, tuple, schemas.Unset] = schemas.unset, + dataChangeCreatedTime: typing.Union[MetaOapg.properties.dataChangeCreatedTime, 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], + ) -> 'OpenInstanceDTO': + return super().__new__( + cls, + *_args, + id=id, + appId=appId, + clusterName=clusterName, + dataCenter=dataCenter, + ip=ip, + configs=configs, + dataChangeCreatedTime=dataChangeCreatedTime, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.open_instance_config_dto import OpenInstanceConfigDTO diff --git a/python/apollo_openapi/model/open_instance_dto.pyi b/python/apollo_openapi/model/open_instance_dto.pyi new file mode 100644 index 00000000..30dc65b7 --- /dev/null +++ b/python/apollo_openapi/model/open_instance_dto.pyi @@ -0,0 +1,165 @@ +# 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 OpenInstanceDTO( + 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: + id = schemas.Int64Schema + appId = schemas.StrSchema + clusterName = schemas.StrSchema + dataCenter = schemas.StrSchema + ip = schemas.StrSchema + + + class configs( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenInstanceConfigDTO']: + return OpenInstanceConfigDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenInstanceConfigDTO'], typing.List['OpenInstanceConfigDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'configs': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenInstanceConfigDTO': + return super().__getitem__(i) + dataChangeCreatedTime = schemas.StrSchema + __annotations__ = { + "id": id, + "appId": appId, + "clusterName": clusterName, + "dataCenter": dataCenter, + "ip": ip, + "configs": configs, + "dataChangeCreatedTime": dataChangeCreatedTime, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["clusterName"]) -> MetaOapg.properties.clusterName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataCenter"]) -> MetaOapg.properties.dataCenter: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["ip"]) -> MetaOapg.properties.ip: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["configs"]) -> MetaOapg.properties.configs: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> MetaOapg.properties.dataChangeCreatedTime: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "appId", "clusterName", "dataCenter", "ip", "configs", "dataChangeCreatedTime", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["appId"]) -> typing.Union[MetaOapg.properties.appId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["clusterName"]) -> typing.Union[MetaOapg.properties.clusterName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataCenter"]) -> typing.Union[MetaOapg.properties.dataCenter, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["ip"]) -> typing.Union[MetaOapg.properties.ip, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["configs"]) -> typing.Union[MetaOapg.properties.configs, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "appId", "clusterName", "dataCenter", "ip", "configs", "dataChangeCreatedTime", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, + appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset, + clusterName: typing.Union[MetaOapg.properties.clusterName, str, schemas.Unset] = schemas.unset, + dataCenter: typing.Union[MetaOapg.properties.dataCenter, str, schemas.Unset] = schemas.unset, + ip: typing.Union[MetaOapg.properties.ip, str, schemas.Unset] = schemas.unset, + configs: typing.Union[MetaOapg.properties.configs, list, tuple, schemas.Unset] = schemas.unset, + dataChangeCreatedTime: typing.Union[MetaOapg.properties.dataChangeCreatedTime, 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], + ) -> 'OpenInstanceDTO': + return super().__new__( + cls, + *_args, + id=id, + appId=appId, + clusterName=clusterName, + dataCenter=dataCenter, + ip=ip, + configs=configs, + dataChangeCreatedTime=dataChangeCreatedTime, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.open_instance_config_dto import OpenInstanceConfigDTO diff --git a/python/apollo_openapi/model/open_item_change_sets.py b/python/apollo_openapi/model/open_item_change_sets.py new file mode 100644 index 00000000..56d67634 --- /dev/null +++ b/python/apollo_openapi/model/open_item_change_sets.py @@ -0,0 +1,235 @@ +# 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 OpenItemChangeSets( + 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: + dataChangeCreatedBy = schemas.StrSchema + dataChangeLastModifiedBy = schemas.StrSchema + dataChangeCreatedByDisplayName = schemas.StrSchema + dataChangeLastModifiedByDisplayName = schemas.StrSchema + dataChangeCreatedTime = schemas.StrSchema + dataChangeLastModifiedTime = schemas.StrSchema + + + class createItems( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenItemDTO']: + return OpenItemDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenItemDTO'], typing.List['OpenItemDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'createItems': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenItemDTO': + return super().__getitem__(i) + + + class updateItems( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenItemDTO']: + return OpenItemDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenItemDTO'], typing.List['OpenItemDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'updateItems': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenItemDTO': + return super().__getitem__(i) + + + class deleteItems( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenItemDTO']: + return OpenItemDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenItemDTO'], typing.List['OpenItemDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'deleteItems': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenItemDTO': + return super().__getitem__(i) + __annotations__ = { + "dataChangeCreatedBy": dataChangeCreatedBy, + "dataChangeLastModifiedBy": dataChangeLastModifiedBy, + "dataChangeCreatedByDisplayName": dataChangeCreatedByDisplayName, + "dataChangeLastModifiedByDisplayName": dataChangeLastModifiedByDisplayName, + "dataChangeCreatedTime": dataChangeCreatedTime, + "dataChangeLastModifiedTime": dataChangeLastModifiedTime, + "createItems": createItems, + "updateItems": updateItems, + "deleteItems": deleteItems, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> MetaOapg.properties.dataChangeCreatedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedByDisplayName"]) -> MetaOapg.properties.dataChangeCreatedByDisplayName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedByDisplayName"]) -> MetaOapg.properties.dataChangeLastModifiedByDisplayName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> MetaOapg.properties.dataChangeCreatedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> MetaOapg.properties.dataChangeLastModifiedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["createItems"]) -> MetaOapg.properties.createItems: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["updateItems"]) -> MetaOapg.properties.updateItems: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["deleteItems"]) -> MetaOapg.properties.deleteItems: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "createItems", "updateItems", "deleteItems", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedByDisplayName"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedByDisplayName"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedByDisplayName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["createItems"]) -> typing.Union[MetaOapg.properties.createItems, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["updateItems"]) -> typing.Union[MetaOapg.properties.updateItems, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["deleteItems"]) -> typing.Union[MetaOapg.properties.deleteItems, 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", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "createItems", "updateItems", "deleteItems", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + dataChangeCreatedBy: typing.Union[MetaOapg.properties.dataChangeCreatedBy, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, str, schemas.Unset] = schemas.unset, + dataChangeCreatedByDisplayName: typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedByDisplayName: typing.Union[MetaOapg.properties.dataChangeLastModifiedByDisplayName, str, schemas.Unset] = schemas.unset, + dataChangeCreatedTime: typing.Union[MetaOapg.properties.dataChangeCreatedTime, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedTime: typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, str, schemas.Unset] = schemas.unset, + createItems: typing.Union[MetaOapg.properties.createItems, list, tuple, schemas.Unset] = schemas.unset, + updateItems: typing.Union[MetaOapg.properties.updateItems, list, tuple, schemas.Unset] = schemas.unset, + deleteItems: typing.Union[MetaOapg.properties.deleteItems, 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], + ) -> 'OpenItemChangeSets': + return super().__new__( + cls, + *_args, + dataChangeCreatedBy=dataChangeCreatedBy, + dataChangeLastModifiedBy=dataChangeLastModifiedBy, + dataChangeCreatedByDisplayName=dataChangeCreatedByDisplayName, + dataChangeLastModifiedByDisplayName=dataChangeLastModifiedByDisplayName, + dataChangeCreatedTime=dataChangeCreatedTime, + dataChangeLastModifiedTime=dataChangeLastModifiedTime, + createItems=createItems, + updateItems=updateItems, + deleteItems=deleteItems, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.open_item_dto import OpenItemDTO diff --git a/python/apollo_openapi/model/open_item_change_sets.pyi b/python/apollo_openapi/model/open_item_change_sets.pyi new file mode 100644 index 00000000..56d67634 --- /dev/null +++ b/python/apollo_openapi/model/open_item_change_sets.pyi @@ -0,0 +1,235 @@ +# 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 OpenItemChangeSets( + 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: + dataChangeCreatedBy = schemas.StrSchema + dataChangeLastModifiedBy = schemas.StrSchema + dataChangeCreatedByDisplayName = schemas.StrSchema + dataChangeLastModifiedByDisplayName = schemas.StrSchema + dataChangeCreatedTime = schemas.StrSchema + dataChangeLastModifiedTime = schemas.StrSchema + + + class createItems( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenItemDTO']: + return OpenItemDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenItemDTO'], typing.List['OpenItemDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'createItems': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenItemDTO': + return super().__getitem__(i) + + + class updateItems( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenItemDTO']: + return OpenItemDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenItemDTO'], typing.List['OpenItemDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'updateItems': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenItemDTO': + return super().__getitem__(i) + + + class deleteItems( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenItemDTO']: + return OpenItemDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenItemDTO'], typing.List['OpenItemDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'deleteItems': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenItemDTO': + return super().__getitem__(i) + __annotations__ = { + "dataChangeCreatedBy": dataChangeCreatedBy, + "dataChangeLastModifiedBy": dataChangeLastModifiedBy, + "dataChangeCreatedByDisplayName": dataChangeCreatedByDisplayName, + "dataChangeLastModifiedByDisplayName": dataChangeLastModifiedByDisplayName, + "dataChangeCreatedTime": dataChangeCreatedTime, + "dataChangeLastModifiedTime": dataChangeLastModifiedTime, + "createItems": createItems, + "updateItems": updateItems, + "deleteItems": deleteItems, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> MetaOapg.properties.dataChangeCreatedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedByDisplayName"]) -> MetaOapg.properties.dataChangeCreatedByDisplayName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedByDisplayName"]) -> MetaOapg.properties.dataChangeLastModifiedByDisplayName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> MetaOapg.properties.dataChangeCreatedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> MetaOapg.properties.dataChangeLastModifiedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["createItems"]) -> MetaOapg.properties.createItems: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["updateItems"]) -> MetaOapg.properties.updateItems: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["deleteItems"]) -> MetaOapg.properties.deleteItems: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "createItems", "updateItems", "deleteItems", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedByDisplayName"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedByDisplayName"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedByDisplayName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["createItems"]) -> typing.Union[MetaOapg.properties.createItems, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["updateItems"]) -> typing.Union[MetaOapg.properties.updateItems, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["deleteItems"]) -> typing.Union[MetaOapg.properties.deleteItems, 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", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "createItems", "updateItems", "deleteItems", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + dataChangeCreatedBy: typing.Union[MetaOapg.properties.dataChangeCreatedBy, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, str, schemas.Unset] = schemas.unset, + dataChangeCreatedByDisplayName: typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedByDisplayName: typing.Union[MetaOapg.properties.dataChangeLastModifiedByDisplayName, str, schemas.Unset] = schemas.unset, + dataChangeCreatedTime: typing.Union[MetaOapg.properties.dataChangeCreatedTime, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedTime: typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, str, schemas.Unset] = schemas.unset, + createItems: typing.Union[MetaOapg.properties.createItems, list, tuple, schemas.Unset] = schemas.unset, + updateItems: typing.Union[MetaOapg.properties.updateItems, list, tuple, schemas.Unset] = schemas.unset, + deleteItems: typing.Union[MetaOapg.properties.deleteItems, 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], + ) -> 'OpenItemChangeSets': + return super().__new__( + cls, + *_args, + dataChangeCreatedBy=dataChangeCreatedBy, + dataChangeLastModifiedBy=dataChangeLastModifiedBy, + dataChangeCreatedByDisplayName=dataChangeCreatedByDisplayName, + dataChangeLastModifiedByDisplayName=dataChangeLastModifiedByDisplayName, + dataChangeCreatedTime=dataChangeCreatedTime, + dataChangeLastModifiedTime=dataChangeLastModifiedTime, + createItems=createItems, + updateItems=updateItems, + deleteItems=deleteItems, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.open_item_dto import OpenItemDTO diff --git a/python/apollo_openapi/model/open_item_diffs.py b/python/apollo_openapi/model/open_item_diffs.py new file mode 100644 index 00000000..ecdc6243 --- /dev/null +++ b/python/apollo_openapi/model/open_item_diffs.py @@ -0,0 +1,107 @@ +# 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 OpenItemDiffs( + 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: + + @staticmethod + def namespace() -> typing.Type['OpenNamespaceIdentifier']: + return OpenNamespaceIdentifier + + @staticmethod + def diffs() -> typing.Type['OpenItemChangeSets']: + return OpenItemChangeSets + extInfo = schemas.StrSchema + __annotations__ = { + "namespace": namespace, + "diffs": diffs, + "extInfo": extInfo, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["namespace"]) -> 'OpenNamespaceIdentifier': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["diffs"]) -> 'OpenItemChangeSets': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["extInfo"]) -> MetaOapg.properties.extInfo: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["namespace", "diffs", "extInfo", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["namespace"]) -> typing.Union['OpenNamespaceIdentifier', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["diffs"]) -> typing.Union['OpenItemChangeSets', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["extInfo"]) -> typing.Union[MetaOapg.properties.extInfo, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["namespace", "diffs", "extInfo", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + namespace: typing.Union['OpenNamespaceIdentifier', schemas.Unset] = schemas.unset, + diffs: typing.Union['OpenItemChangeSets', schemas.Unset] = schemas.unset, + extInfo: typing.Union[MetaOapg.properties.extInfo, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OpenItemDiffs': + return super().__new__( + cls, + *_args, + namespace=namespace, + diffs=diffs, + extInfo=extInfo, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.open_item_change_sets import OpenItemChangeSets +from apollo_openapi.model.open_namespace_identifier import OpenNamespaceIdentifier diff --git a/python/apollo_openapi/model/open_item_diffs.pyi b/python/apollo_openapi/model/open_item_diffs.pyi new file mode 100644 index 00000000..ecdc6243 --- /dev/null +++ b/python/apollo_openapi/model/open_item_diffs.pyi @@ -0,0 +1,107 @@ +# 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 OpenItemDiffs( + 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: + + @staticmethod + def namespace() -> typing.Type['OpenNamespaceIdentifier']: + return OpenNamespaceIdentifier + + @staticmethod + def diffs() -> typing.Type['OpenItemChangeSets']: + return OpenItemChangeSets + extInfo = schemas.StrSchema + __annotations__ = { + "namespace": namespace, + "diffs": diffs, + "extInfo": extInfo, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["namespace"]) -> 'OpenNamespaceIdentifier': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["diffs"]) -> 'OpenItemChangeSets': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["extInfo"]) -> MetaOapg.properties.extInfo: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["namespace", "diffs", "extInfo", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["namespace"]) -> typing.Union['OpenNamespaceIdentifier', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["diffs"]) -> typing.Union['OpenItemChangeSets', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["extInfo"]) -> typing.Union[MetaOapg.properties.extInfo, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["namespace", "diffs", "extInfo", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + namespace: typing.Union['OpenNamespaceIdentifier', schemas.Unset] = schemas.unset, + diffs: typing.Union['OpenItemChangeSets', schemas.Unset] = schemas.unset, + extInfo: typing.Union[MetaOapg.properties.extInfo, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OpenItemDiffs': + return super().__new__( + cls, + *_args, + namespace=namespace, + diffs=diffs, + extInfo=extInfo, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.open_item_change_sets import OpenItemChangeSets +from apollo_openapi.model.open_namespace_identifier import OpenNamespaceIdentifier diff --git a/python/apollo_openapi/model/open_item_dto.py b/python/apollo_openapi/model/open_item_dto.py new file mode 100644 index 00000000..4375c0bf --- /dev/null +++ b/python/apollo_openapi/model/open_item_dto.py @@ -0,0 +1,150 @@ +# 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 OpenItemDTO( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 + """ + + + class MetaOapg: + + class properties: + dataChangeCreatedBy = schemas.StrSchema + dataChangeLastModifiedBy = schemas.StrSchema + dataChangeCreatedTime = schemas.StrSchema + dataChangeLastModifiedTime = schemas.StrSchema + key = schemas.StrSchema + type = schemas.IntSchema + value = schemas.StrSchema + comment = schemas.StrSchema + __annotations__ = { + "dataChangeCreatedBy": dataChangeCreatedBy, + "dataChangeLastModifiedBy": dataChangeLastModifiedBy, + "dataChangeCreatedTime": dataChangeCreatedTime, + "dataChangeLastModifiedTime": dataChangeLastModifiedTime, + "key": key, + "type": type, + "value": value, + "comment": comment, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> MetaOapg.properties.dataChangeCreatedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> MetaOapg.properties.dataChangeCreatedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> MetaOapg.properties.dataChangeLastModifiedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["key"]) -> MetaOapg.properties.key: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["value"]) -> MetaOapg.properties.value: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "key", "type", "value", "comment", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["key"]) -> typing.Union[MetaOapg.properties.key, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["value"]) -> typing.Union[MetaOapg.properties.value, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "key", "type", "value", "comment", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + dataChangeCreatedBy: typing.Union[MetaOapg.properties.dataChangeCreatedBy, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, str, schemas.Unset] = schemas.unset, + dataChangeCreatedTime: typing.Union[MetaOapg.properties.dataChangeCreatedTime, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedTime: typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, str, schemas.Unset] = schemas.unset, + key: typing.Union[MetaOapg.properties.key, str, schemas.Unset] = schemas.unset, + type: typing.Union[MetaOapg.properties.type, decimal.Decimal, int, schemas.Unset] = schemas.unset, + value: typing.Union[MetaOapg.properties.value, str, schemas.Unset] = schemas.unset, + comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OpenItemDTO': + return super().__new__( + cls, + *_args, + dataChangeCreatedBy=dataChangeCreatedBy, + dataChangeLastModifiedBy=dataChangeLastModifiedBy, + dataChangeCreatedTime=dataChangeCreatedTime, + dataChangeLastModifiedTime=dataChangeLastModifiedTime, + key=key, + type=type, + value=value, + comment=comment, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/open_item_dto.pyi b/python/apollo_openapi/model/open_item_dto.pyi new file mode 100644 index 00000000..4375c0bf --- /dev/null +++ b/python/apollo_openapi/model/open_item_dto.pyi @@ -0,0 +1,150 @@ +# 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 OpenItemDTO( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 + """ + + + class MetaOapg: + + class properties: + dataChangeCreatedBy = schemas.StrSchema + dataChangeLastModifiedBy = schemas.StrSchema + dataChangeCreatedTime = schemas.StrSchema + dataChangeLastModifiedTime = schemas.StrSchema + key = schemas.StrSchema + type = schemas.IntSchema + value = schemas.StrSchema + comment = schemas.StrSchema + __annotations__ = { + "dataChangeCreatedBy": dataChangeCreatedBy, + "dataChangeLastModifiedBy": dataChangeLastModifiedBy, + "dataChangeCreatedTime": dataChangeCreatedTime, + "dataChangeLastModifiedTime": dataChangeLastModifiedTime, + "key": key, + "type": type, + "value": value, + "comment": comment, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> MetaOapg.properties.dataChangeCreatedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> MetaOapg.properties.dataChangeCreatedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> MetaOapg.properties.dataChangeLastModifiedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["key"]) -> MetaOapg.properties.key: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["value"]) -> MetaOapg.properties.value: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "key", "type", "value", "comment", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["key"]) -> typing.Union[MetaOapg.properties.key, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["value"]) -> typing.Union[MetaOapg.properties.value, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "key", "type", "value", "comment", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + dataChangeCreatedBy: typing.Union[MetaOapg.properties.dataChangeCreatedBy, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, str, schemas.Unset] = schemas.unset, + dataChangeCreatedTime: typing.Union[MetaOapg.properties.dataChangeCreatedTime, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedTime: typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, str, schemas.Unset] = schemas.unset, + key: typing.Union[MetaOapg.properties.key, str, schemas.Unset] = schemas.unset, + type: typing.Union[MetaOapg.properties.type, decimal.Decimal, int, schemas.Unset] = schemas.unset, + value: typing.Union[MetaOapg.properties.value, str, schemas.Unset] = schemas.unset, + comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OpenItemDTO': + return super().__new__( + cls, + *_args, + dataChangeCreatedBy=dataChangeCreatedBy, + dataChangeLastModifiedBy=dataChangeLastModifiedBy, + dataChangeCreatedTime=dataChangeCreatedTime, + dataChangeLastModifiedTime=dataChangeLastModifiedTime, + key=key, + type=type, + value=value, + comment=comment, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/open_namespace_dto.py b/python/apollo_openapi/model/open_namespace_dto.py new file mode 100644 index 00000000..ffa927fa --- /dev/null +++ b/python/apollo_openapi/model/open_namespace_dto.py @@ -0,0 +1,207 @@ +# 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 OpenNamespaceDTO( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 + """ + + + class MetaOapg: + + class properties: + dataChangeCreatedBy = schemas.StrSchema + dataChangeLastModifiedBy = schemas.StrSchema + dataChangeCreatedTime = schemas.StrSchema + dataChangeLastModifiedTime = schemas.StrSchema + appId = schemas.StrSchema + clusterName = schemas.StrSchema + namespaceName = schemas.StrSchema + comment = schemas.StrSchema + format = schemas.StrSchema + isPublic = schemas.BoolSchema + + + class items( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenItemDTO']: + return OpenItemDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenItemDTO'], typing.List['OpenItemDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'items': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenItemDTO': + return super().__getitem__(i) + __annotations__ = { + "dataChangeCreatedBy": dataChangeCreatedBy, + "dataChangeLastModifiedBy": dataChangeLastModifiedBy, + "dataChangeCreatedTime": dataChangeCreatedTime, + "dataChangeLastModifiedTime": dataChangeLastModifiedTime, + "appId": appId, + "clusterName": clusterName, + "namespaceName": namespaceName, + "comment": comment, + "format": format, + "isPublic": isPublic, + "items": items, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> MetaOapg.properties.dataChangeCreatedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> MetaOapg.properties.dataChangeCreatedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> MetaOapg.properties.dataChangeLastModifiedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["clusterName"]) -> MetaOapg.properties.clusterName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["namespaceName"]) -> MetaOapg.properties.namespaceName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["format"]) -> MetaOapg.properties.format: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["isPublic"]) -> MetaOapg.properties.isPublic: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["items"]) -> MetaOapg.properties.items: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "appId", "clusterName", "namespaceName", "comment", "format", "isPublic", "items", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["appId"]) -> typing.Union[MetaOapg.properties.appId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["clusterName"]) -> typing.Union[MetaOapg.properties.clusterName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["namespaceName"]) -> typing.Union[MetaOapg.properties.namespaceName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["format"]) -> typing.Union[MetaOapg.properties.format, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["isPublic"]) -> typing.Union[MetaOapg.properties.isPublic, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["items"]) -> typing.Union[MetaOapg.properties.items, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "appId", "clusterName", "namespaceName", "comment", "format", "isPublic", "items", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + dataChangeCreatedBy: typing.Union[MetaOapg.properties.dataChangeCreatedBy, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, str, schemas.Unset] = schemas.unset, + dataChangeCreatedTime: typing.Union[MetaOapg.properties.dataChangeCreatedTime, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedTime: typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, str, schemas.Unset] = schemas.unset, + appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset, + clusterName: typing.Union[MetaOapg.properties.clusterName, str, schemas.Unset] = schemas.unset, + namespaceName: typing.Union[MetaOapg.properties.namespaceName, str, schemas.Unset] = schemas.unset, + comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, + format: typing.Union[MetaOapg.properties.format, str, schemas.Unset] = schemas.unset, + isPublic: typing.Union[MetaOapg.properties.isPublic, bool, schemas.Unset] = schemas.unset, + items: typing.Union[MetaOapg.properties.items, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OpenNamespaceDTO': + return super().__new__( + cls, + *_args, + dataChangeCreatedBy=dataChangeCreatedBy, + dataChangeLastModifiedBy=dataChangeLastModifiedBy, + dataChangeCreatedTime=dataChangeCreatedTime, + dataChangeLastModifiedTime=dataChangeLastModifiedTime, + appId=appId, + clusterName=clusterName, + namespaceName=namespaceName, + comment=comment, + format=format, + isPublic=isPublic, + items=items, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.open_item_dto import OpenItemDTO diff --git a/python/apollo_openapi/model/open_namespace_dto.pyi b/python/apollo_openapi/model/open_namespace_dto.pyi new file mode 100644 index 00000000..ffa927fa --- /dev/null +++ b/python/apollo_openapi/model/open_namespace_dto.pyi @@ -0,0 +1,207 @@ +# 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 OpenNamespaceDTO( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 + """ + + + class MetaOapg: + + class properties: + dataChangeCreatedBy = schemas.StrSchema + dataChangeLastModifiedBy = schemas.StrSchema + dataChangeCreatedTime = schemas.StrSchema + dataChangeLastModifiedTime = schemas.StrSchema + appId = schemas.StrSchema + clusterName = schemas.StrSchema + namespaceName = schemas.StrSchema + comment = schemas.StrSchema + format = schemas.StrSchema + isPublic = schemas.BoolSchema + + + class items( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenItemDTO']: + return OpenItemDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenItemDTO'], typing.List['OpenItemDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'items': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenItemDTO': + return super().__getitem__(i) + __annotations__ = { + "dataChangeCreatedBy": dataChangeCreatedBy, + "dataChangeLastModifiedBy": dataChangeLastModifiedBy, + "dataChangeCreatedTime": dataChangeCreatedTime, + "dataChangeLastModifiedTime": dataChangeLastModifiedTime, + "appId": appId, + "clusterName": clusterName, + "namespaceName": namespaceName, + "comment": comment, + "format": format, + "isPublic": isPublic, + "items": items, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> MetaOapg.properties.dataChangeCreatedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> MetaOapg.properties.dataChangeCreatedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> MetaOapg.properties.dataChangeLastModifiedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["clusterName"]) -> MetaOapg.properties.clusterName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["namespaceName"]) -> MetaOapg.properties.namespaceName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["format"]) -> MetaOapg.properties.format: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["isPublic"]) -> MetaOapg.properties.isPublic: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["items"]) -> MetaOapg.properties.items: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "appId", "clusterName", "namespaceName", "comment", "format", "isPublic", "items", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["appId"]) -> typing.Union[MetaOapg.properties.appId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["clusterName"]) -> typing.Union[MetaOapg.properties.clusterName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["namespaceName"]) -> typing.Union[MetaOapg.properties.namespaceName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["format"]) -> typing.Union[MetaOapg.properties.format, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["isPublic"]) -> typing.Union[MetaOapg.properties.isPublic, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["items"]) -> typing.Union[MetaOapg.properties.items, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "appId", "clusterName", "namespaceName", "comment", "format", "isPublic", "items", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + dataChangeCreatedBy: typing.Union[MetaOapg.properties.dataChangeCreatedBy, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, str, schemas.Unset] = schemas.unset, + dataChangeCreatedTime: typing.Union[MetaOapg.properties.dataChangeCreatedTime, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedTime: typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, str, schemas.Unset] = schemas.unset, + appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset, + clusterName: typing.Union[MetaOapg.properties.clusterName, str, schemas.Unset] = schemas.unset, + namespaceName: typing.Union[MetaOapg.properties.namespaceName, str, schemas.Unset] = schemas.unset, + comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, + format: typing.Union[MetaOapg.properties.format, str, schemas.Unset] = schemas.unset, + isPublic: typing.Union[MetaOapg.properties.isPublic, bool, schemas.Unset] = schemas.unset, + items: typing.Union[MetaOapg.properties.items, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OpenNamespaceDTO': + return super().__new__( + cls, + *_args, + dataChangeCreatedBy=dataChangeCreatedBy, + dataChangeLastModifiedBy=dataChangeLastModifiedBy, + dataChangeCreatedTime=dataChangeCreatedTime, + dataChangeLastModifiedTime=dataChangeLastModifiedTime, + appId=appId, + clusterName=clusterName, + namespaceName=namespaceName, + comment=comment, + format=format, + isPublic=isPublic, + items=items, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.open_item_dto import OpenItemDTO diff --git a/python/apollo_openapi/model/open_namespace_identifier.py b/python/apollo_openapi/model/open_namespace_identifier.py new file mode 100644 index 00000000..8e11a7ce --- /dev/null +++ b/python/apollo_openapi/model/open_namespace_identifier.py @@ -0,0 +1,108 @@ +# 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 OpenNamespaceIdentifier( + 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: + appId = schemas.StrSchema + env = schemas.StrSchema + clusterName = schemas.StrSchema + namespaceName = schemas.StrSchema + __annotations__ = { + "appId": appId, + "env": env, + "clusterName": clusterName, + "namespaceName": namespaceName, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["env"]) -> MetaOapg.properties.env: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["clusterName"]) -> MetaOapg.properties.clusterName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["namespaceName"]) -> MetaOapg.properties.namespaceName: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["appId", "env", "clusterName", "namespaceName", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["appId"]) -> typing.Union[MetaOapg.properties.appId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["env"]) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["clusterName"]) -> typing.Union[MetaOapg.properties.clusterName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["namespaceName"]) -> typing.Union[MetaOapg.properties.namespaceName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["appId", "env", "clusterName", "namespaceName", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset, + env: typing.Union[MetaOapg.properties.env, str, schemas.Unset] = schemas.unset, + clusterName: typing.Union[MetaOapg.properties.clusterName, str, schemas.Unset] = schemas.unset, + namespaceName: typing.Union[MetaOapg.properties.namespaceName, 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], + ) -> 'OpenNamespaceIdentifier': + return super().__new__( + cls, + *_args, + appId=appId, + env=env, + clusterName=clusterName, + namespaceName=namespaceName, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/open_namespace_identifier.pyi b/python/apollo_openapi/model/open_namespace_identifier.pyi new file mode 100644 index 00000000..8e11a7ce --- /dev/null +++ b/python/apollo_openapi/model/open_namespace_identifier.pyi @@ -0,0 +1,108 @@ +# 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 OpenNamespaceIdentifier( + 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: + appId = schemas.StrSchema + env = schemas.StrSchema + clusterName = schemas.StrSchema + namespaceName = schemas.StrSchema + __annotations__ = { + "appId": appId, + "env": env, + "clusterName": clusterName, + "namespaceName": namespaceName, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["env"]) -> MetaOapg.properties.env: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["clusterName"]) -> MetaOapg.properties.clusterName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["namespaceName"]) -> MetaOapg.properties.namespaceName: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["appId", "env", "clusterName", "namespaceName", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["appId"]) -> typing.Union[MetaOapg.properties.appId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["env"]) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["clusterName"]) -> typing.Union[MetaOapg.properties.clusterName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["namespaceName"]) -> typing.Union[MetaOapg.properties.namespaceName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["appId", "env", "clusterName", "namespaceName", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset, + env: typing.Union[MetaOapg.properties.env, str, schemas.Unset] = schemas.unset, + clusterName: typing.Union[MetaOapg.properties.clusterName, str, schemas.Unset] = schemas.unset, + namespaceName: typing.Union[MetaOapg.properties.namespaceName, 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], + ) -> 'OpenNamespaceIdentifier': + return super().__new__( + cls, + *_args, + appId=appId, + env=env, + clusterName=clusterName, + namespaceName=namespaceName, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/open_namespace_lock_dto.py b/python/apollo_openapi/model/open_namespace_lock_dto.py new file mode 100644 index 00000000..a44ca7ba --- /dev/null +++ b/python/apollo_openapi/model/open_namespace_lock_dto.py @@ -0,0 +1,100 @@ +# 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 OpenNamespaceLockDTO( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Apollo命名空间锁状态数据传输对象 + """ + + + class MetaOapg: + + class properties: + namespaceName = schemas.StrSchema + isLocked = schemas.BoolSchema + lockedBy = schemas.StrSchema + __annotations__ = { + "namespaceName": namespaceName, + "isLocked": isLocked, + "lockedBy": lockedBy, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["namespaceName"]) -> MetaOapg.properties.namespaceName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["isLocked"]) -> MetaOapg.properties.isLocked: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lockedBy"]) -> MetaOapg.properties.lockedBy: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["namespaceName", "isLocked", "lockedBy", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["namespaceName"]) -> typing.Union[MetaOapg.properties.namespaceName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["isLocked"]) -> typing.Union[MetaOapg.properties.isLocked, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lockedBy"]) -> typing.Union[MetaOapg.properties.lockedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["namespaceName", "isLocked", "lockedBy", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + namespaceName: typing.Union[MetaOapg.properties.namespaceName, str, schemas.Unset] = schemas.unset, + isLocked: typing.Union[MetaOapg.properties.isLocked, bool, schemas.Unset] = schemas.unset, + lockedBy: typing.Union[MetaOapg.properties.lockedBy, 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], + ) -> 'OpenNamespaceLockDTO': + return super().__new__( + cls, + *_args, + namespaceName=namespaceName, + isLocked=isLocked, + lockedBy=lockedBy, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/open_namespace_lock_dto.pyi b/python/apollo_openapi/model/open_namespace_lock_dto.pyi new file mode 100644 index 00000000..a44ca7ba --- /dev/null +++ b/python/apollo_openapi/model/open_namespace_lock_dto.pyi @@ -0,0 +1,100 @@ +# 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 OpenNamespaceLockDTO( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Apollo命名空间锁状态数据传输对象 + """ + + + class MetaOapg: + + class properties: + namespaceName = schemas.StrSchema + isLocked = schemas.BoolSchema + lockedBy = schemas.StrSchema + __annotations__ = { + "namespaceName": namespaceName, + "isLocked": isLocked, + "lockedBy": lockedBy, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["namespaceName"]) -> MetaOapg.properties.namespaceName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["isLocked"]) -> MetaOapg.properties.isLocked: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["lockedBy"]) -> MetaOapg.properties.lockedBy: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["namespaceName", "isLocked", "lockedBy", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["namespaceName"]) -> typing.Union[MetaOapg.properties.namespaceName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["isLocked"]) -> typing.Union[MetaOapg.properties.isLocked, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["lockedBy"]) -> typing.Union[MetaOapg.properties.lockedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["namespaceName", "isLocked", "lockedBy", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + namespaceName: typing.Union[MetaOapg.properties.namespaceName, str, schemas.Unset] = schemas.unset, + isLocked: typing.Union[MetaOapg.properties.isLocked, bool, schemas.Unset] = schemas.unset, + lockedBy: typing.Union[MetaOapg.properties.lockedBy, 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], + ) -> 'OpenNamespaceLockDTO': + return super().__new__( + cls, + *_args, + namespaceName=namespaceName, + isLocked=isLocked, + lockedBy=lockedBy, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/open_namespace_sync_model.py b/python/apollo_openapi/model/open_namespace_sync_model.py new file mode 100644 index 00000000..f089a040 --- /dev/null +++ b/python/apollo_openapi/model/open_namespace_sync_model.py @@ -0,0 +1,141 @@ +# 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 OpenNamespaceSyncModel( + 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: + + + class syncToNamespaces( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenNamespaceIdentifier']: + return OpenNamespaceIdentifier + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenNamespaceIdentifier'], typing.List['OpenNamespaceIdentifier']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'syncToNamespaces': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenNamespaceIdentifier': + return super().__getitem__(i) + + + class syncItems( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenItemDTO']: + return OpenItemDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenItemDTO'], typing.List['OpenItemDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'syncItems': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenItemDTO': + return super().__getitem__(i) + __annotations__ = { + "syncToNamespaces": syncToNamespaces, + "syncItems": syncItems, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["syncToNamespaces"]) -> MetaOapg.properties.syncToNamespaces: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["syncItems"]) -> MetaOapg.properties.syncItems: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["syncToNamespaces", "syncItems", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["syncToNamespaces"]) -> typing.Union[MetaOapg.properties.syncToNamespaces, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["syncItems"]) -> typing.Union[MetaOapg.properties.syncItems, 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["syncToNamespaces", "syncItems", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + syncToNamespaces: typing.Union[MetaOapg.properties.syncToNamespaces, list, tuple, schemas.Unset] = schemas.unset, + syncItems: typing.Union[MetaOapg.properties.syncItems, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OpenNamespaceSyncModel': + return super().__new__( + cls, + *_args, + syncToNamespaces=syncToNamespaces, + syncItems=syncItems, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.open_item_dto import OpenItemDTO +from apollo_openapi.model.open_namespace_identifier import OpenNamespaceIdentifier diff --git a/python/apollo_openapi/model/open_namespace_sync_model.pyi b/python/apollo_openapi/model/open_namespace_sync_model.pyi new file mode 100644 index 00000000..f089a040 --- /dev/null +++ b/python/apollo_openapi/model/open_namespace_sync_model.pyi @@ -0,0 +1,141 @@ +# 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 OpenNamespaceSyncModel( + 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: + + + class syncToNamespaces( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenNamespaceIdentifier']: + return OpenNamespaceIdentifier + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenNamespaceIdentifier'], typing.List['OpenNamespaceIdentifier']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'syncToNamespaces': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenNamespaceIdentifier': + return super().__getitem__(i) + + + class syncItems( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenItemDTO']: + return OpenItemDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenItemDTO'], typing.List['OpenItemDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'syncItems': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenItemDTO': + return super().__getitem__(i) + __annotations__ = { + "syncToNamespaces": syncToNamespaces, + "syncItems": syncItems, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["syncToNamespaces"]) -> MetaOapg.properties.syncToNamespaces: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["syncItems"]) -> MetaOapg.properties.syncItems: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["syncToNamespaces", "syncItems", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["syncToNamespaces"]) -> typing.Union[MetaOapg.properties.syncToNamespaces, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["syncItems"]) -> typing.Union[MetaOapg.properties.syncItems, 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["syncToNamespaces", "syncItems", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + syncToNamespaces: typing.Union[MetaOapg.properties.syncToNamespaces, list, tuple, schemas.Unset] = schemas.unset, + syncItems: typing.Union[MetaOapg.properties.syncItems, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OpenNamespaceSyncModel': + return super().__new__( + cls, + *_args, + syncToNamespaces=syncToNamespaces, + syncItems=syncItems, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.open_item_dto import OpenItemDTO +from apollo_openapi.model.open_namespace_identifier import OpenNamespaceIdentifier diff --git a/python/apollo_openapi/model/open_namespace_text_model.py b/python/apollo_openapi/model/open_namespace_text_model.py new file mode 100644 index 00000000..cc77d6d9 --- /dev/null +++ b/python/apollo_openapi/model/open_namespace_text_model.py @@ -0,0 +1,148 @@ +# 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 OpenNamespaceTextModel( + 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: + appId = schemas.StrSchema + env = schemas.StrSchema + clusterName = schemas.StrSchema + namespaceName = schemas.StrSchema + namespaceId = schemas.Int64Schema + format = schemas.StrSchema + configText = schemas.StrSchema + operator = schemas.StrSchema + __annotations__ = { + "appId": appId, + "env": env, + "clusterName": clusterName, + "namespaceName": namespaceName, + "namespaceId": namespaceId, + "format": format, + "configText": configText, + "operator": operator, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["env"]) -> MetaOapg.properties.env: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["clusterName"]) -> MetaOapg.properties.clusterName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["namespaceName"]) -> MetaOapg.properties.namespaceName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["namespaceId"]) -> MetaOapg.properties.namespaceId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["format"]) -> MetaOapg.properties.format: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["configText"]) -> MetaOapg.properties.configText: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["operator"]) -> MetaOapg.properties.operator: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["appId", "env", "clusterName", "namespaceName", "namespaceId", "format", "configText", "operator", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["appId"]) -> typing.Union[MetaOapg.properties.appId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["env"]) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["clusterName"]) -> typing.Union[MetaOapg.properties.clusterName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["namespaceName"]) -> typing.Union[MetaOapg.properties.namespaceName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["namespaceId"]) -> typing.Union[MetaOapg.properties.namespaceId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["format"]) -> typing.Union[MetaOapg.properties.format, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["configText"]) -> typing.Union[MetaOapg.properties.configText, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["operator"]) -> typing.Union[MetaOapg.properties.operator, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["appId", "env", "clusterName", "namespaceName", "namespaceId", "format", "configText", "operator", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset, + env: typing.Union[MetaOapg.properties.env, str, schemas.Unset] = schemas.unset, + clusterName: typing.Union[MetaOapg.properties.clusterName, str, schemas.Unset] = schemas.unset, + namespaceName: typing.Union[MetaOapg.properties.namespaceName, str, schemas.Unset] = schemas.unset, + namespaceId: typing.Union[MetaOapg.properties.namespaceId, decimal.Decimal, int, schemas.Unset] = schemas.unset, + format: typing.Union[MetaOapg.properties.format, str, schemas.Unset] = schemas.unset, + configText: typing.Union[MetaOapg.properties.configText, str, schemas.Unset] = schemas.unset, + operator: typing.Union[MetaOapg.properties.operator, 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], + ) -> 'OpenNamespaceTextModel': + return super().__new__( + cls, + *_args, + appId=appId, + env=env, + clusterName=clusterName, + namespaceName=namespaceName, + namespaceId=namespaceId, + format=format, + configText=configText, + operator=operator, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/open_namespace_text_model.pyi b/python/apollo_openapi/model/open_namespace_text_model.pyi new file mode 100644 index 00000000..cc77d6d9 --- /dev/null +++ b/python/apollo_openapi/model/open_namespace_text_model.pyi @@ -0,0 +1,148 @@ +# 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 OpenNamespaceTextModel( + 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: + appId = schemas.StrSchema + env = schemas.StrSchema + clusterName = schemas.StrSchema + namespaceName = schemas.StrSchema + namespaceId = schemas.Int64Schema + format = schemas.StrSchema + configText = schemas.StrSchema + operator = schemas.StrSchema + __annotations__ = { + "appId": appId, + "env": env, + "clusterName": clusterName, + "namespaceName": namespaceName, + "namespaceId": namespaceId, + "format": format, + "configText": configText, + "operator": operator, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["env"]) -> MetaOapg.properties.env: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["clusterName"]) -> MetaOapg.properties.clusterName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["namespaceName"]) -> MetaOapg.properties.namespaceName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["namespaceId"]) -> MetaOapg.properties.namespaceId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["format"]) -> MetaOapg.properties.format: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["configText"]) -> MetaOapg.properties.configText: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["operator"]) -> MetaOapg.properties.operator: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["appId", "env", "clusterName", "namespaceName", "namespaceId", "format", "configText", "operator", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["appId"]) -> typing.Union[MetaOapg.properties.appId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["env"]) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["clusterName"]) -> typing.Union[MetaOapg.properties.clusterName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["namespaceName"]) -> typing.Union[MetaOapg.properties.namespaceName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["namespaceId"]) -> typing.Union[MetaOapg.properties.namespaceId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["format"]) -> typing.Union[MetaOapg.properties.format, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["configText"]) -> typing.Union[MetaOapg.properties.configText, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["operator"]) -> typing.Union[MetaOapg.properties.operator, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["appId", "env", "clusterName", "namespaceName", "namespaceId", "format", "configText", "operator", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset, + env: typing.Union[MetaOapg.properties.env, str, schemas.Unset] = schemas.unset, + clusterName: typing.Union[MetaOapg.properties.clusterName, str, schemas.Unset] = schemas.unset, + namespaceName: typing.Union[MetaOapg.properties.namespaceName, str, schemas.Unset] = schemas.unset, + namespaceId: typing.Union[MetaOapg.properties.namespaceId, decimal.Decimal, int, schemas.Unset] = schemas.unset, + format: typing.Union[MetaOapg.properties.format, str, schemas.Unset] = schemas.unset, + configText: typing.Union[MetaOapg.properties.configText, str, schemas.Unset] = schemas.unset, + operator: typing.Union[MetaOapg.properties.operator, 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], + ) -> 'OpenNamespaceTextModel': + return super().__new__( + cls, + *_args, + appId=appId, + env=env, + clusterName=clusterName, + namespaceName=namespaceName, + namespaceId=namespaceId, + format=format, + configText=configText, + operator=operator, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/open_organization_dto.py b/python/apollo_openapi/model/open_organization_dto.py new file mode 100644 index 00000000..74009a92 --- /dev/null +++ b/python/apollo_openapi/model/open_organization_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 OpenOrganizationDto( + 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: + orgId = schemas.StrSchema + orgName = schemas.StrSchema + __annotations__ = { + "orgId": orgId, + "orgName": orgName, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["orgId"]) -> MetaOapg.properties.orgId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["orgName"]) -> MetaOapg.properties.orgName: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["orgId", "orgName", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["orgId"]) -> typing.Union[MetaOapg.properties.orgId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["orgName"]) -> typing.Union[MetaOapg.properties.orgName, 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["orgId", "orgName", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + orgId: typing.Union[MetaOapg.properties.orgId, str, schemas.Unset] = schemas.unset, + orgName: typing.Union[MetaOapg.properties.orgName, 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], + ) -> 'OpenOrganizationDto': + return super().__new__( + cls, + *_args, + orgId=orgId, + orgName=orgName, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/open_organization_dto.pyi b/python/apollo_openapi/model/open_organization_dto.pyi new file mode 100644 index 00000000..74009a92 --- /dev/null +++ b/python/apollo_openapi/model/open_organization_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 OpenOrganizationDto( + 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: + orgId = schemas.StrSchema + orgName = schemas.StrSchema + __annotations__ = { + "orgId": orgId, + "orgName": orgName, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["orgId"]) -> MetaOapg.properties.orgId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["orgName"]) -> MetaOapg.properties.orgName: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["orgId", "orgName", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["orgId"]) -> typing.Union[MetaOapg.properties.orgId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["orgName"]) -> typing.Union[MetaOapg.properties.orgName, 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["orgId", "orgName", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + orgId: typing.Union[MetaOapg.properties.orgId, str, schemas.Unset] = schemas.unset, + orgName: typing.Union[MetaOapg.properties.orgName, 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], + ) -> 'OpenOrganizationDto': + return super().__new__( + cls, + *_args, + orgId=orgId, + orgName=orgName, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/open_page_dto_open_instance_dto.py b/python/apollo_openapi/model/open_page_dto_open_instance_dto.py new file mode 100644 index 00000000..b2850094 --- /dev/null +++ b/python/apollo_openapi/model/open_page_dto_open_instance_dto.py @@ -0,0 +1,137 @@ +# 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 OpenPageDTOOpenInstanceDTO( + 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: + page = schemas.IntSchema + size = schemas.IntSchema + total = schemas.Int64Schema + + + class content( + 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, + ) -> 'content': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenInstanceDTO': + return super().__getitem__(i) + __annotations__ = { + "page": page, + "size": size, + "total": total, + "content": content, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["page"]) -> MetaOapg.properties.page: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["size"]) -> MetaOapg.properties.size: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["content"]) -> MetaOapg.properties.content: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["page", "size", "total", "content", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["page"]) -> typing.Union[MetaOapg.properties.page, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["size"]) -> typing.Union[MetaOapg.properties.size, schemas.Unset]: ... + + @typing.overload + 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]: ... + + @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]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + 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, + _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': + return super().__new__( + cls, + *_args, + page=page, + size=size, + total=total, + content=content, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.open_instance_dto import OpenInstanceDTO diff --git a/python/apollo_openapi/model/open_page_dto_open_instance_dto.pyi b/python/apollo_openapi/model/open_page_dto_open_instance_dto.pyi new file mode 100644 index 00000000..b2850094 --- /dev/null +++ b/python/apollo_openapi/model/open_page_dto_open_instance_dto.pyi @@ -0,0 +1,137 @@ +# 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 OpenPageDTOOpenInstanceDTO( + 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: + page = schemas.IntSchema + size = schemas.IntSchema + total = schemas.Int64Schema + + + class content( + 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, + ) -> 'content': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenInstanceDTO': + return super().__getitem__(i) + __annotations__ = { + "page": page, + "size": size, + "total": total, + "content": content, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["page"]) -> MetaOapg.properties.page: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["size"]) -> MetaOapg.properties.size: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["content"]) -> MetaOapg.properties.content: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["page", "size", "total", "content", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["page"]) -> typing.Union[MetaOapg.properties.page, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["size"]) -> typing.Union[MetaOapg.properties.size, schemas.Unset]: ... + + @typing.overload + 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]: ... + + @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]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + 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, + _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': + return super().__new__( + cls, + *_args, + page=page, + size=size, + total=total, + content=content, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.open_instance_dto import OpenInstanceDTO diff --git a/python/apollo_openapi/model/open_page_dto_open_item_dto.py b/python/apollo_openapi/model/open_page_dto_open_item_dto.py new file mode 100644 index 00000000..0c133187 --- /dev/null +++ b/python/apollo_openapi/model/open_page_dto_open_item_dto.py @@ -0,0 +1,137 @@ +# 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 OpenPageDTOOpenItemDTO( + 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: + page = schemas.IntSchema + size = schemas.IntSchema + total = schemas.Int64Schema + + + class content( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenItemDTO']: + return OpenItemDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenItemDTO'], typing.List['OpenItemDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'content': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenItemDTO': + return super().__getitem__(i) + __annotations__ = { + "page": page, + "size": size, + "total": total, + "content": content, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["page"]) -> MetaOapg.properties.page: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["size"]) -> MetaOapg.properties.size: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["content"]) -> MetaOapg.properties.content: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["page", "size", "total", "content", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["page"]) -> typing.Union[MetaOapg.properties.page, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["size"]) -> typing.Union[MetaOapg.properties.size, schemas.Unset]: ... + + @typing.overload + 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]: ... + + @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]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + 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, + _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': + return super().__new__( + cls, + *_args, + page=page, + size=size, + total=total, + content=content, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.open_item_dto import OpenItemDTO diff --git a/python/apollo_openapi/model/open_page_dto_open_item_dto.pyi b/python/apollo_openapi/model/open_page_dto_open_item_dto.pyi new file mode 100644 index 00000000..0c133187 --- /dev/null +++ b/python/apollo_openapi/model/open_page_dto_open_item_dto.pyi @@ -0,0 +1,137 @@ +# 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 OpenPageDTOOpenItemDTO( + 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: + page = schemas.IntSchema + size = schemas.IntSchema + total = schemas.Int64Schema + + + class content( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenItemDTO']: + return OpenItemDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenItemDTO'], typing.List['OpenItemDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'content': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenItemDTO': + return super().__getitem__(i) + __annotations__ = { + "page": page, + "size": size, + "total": total, + "content": content, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["page"]) -> MetaOapg.properties.page: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["size"]) -> MetaOapg.properties.size: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["content"]) -> MetaOapg.properties.content: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["page", "size", "total", "content", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["page"]) -> typing.Union[MetaOapg.properties.page, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["size"]) -> typing.Union[MetaOapg.properties.size, schemas.Unset]: ... + + @typing.overload + 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]: ... + + @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]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + 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, + _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': + return super().__new__( + cls, + *_args, + page=page, + size=size, + total=total, + content=content, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.open_item_dto import OpenItemDTO diff --git a/python/apollo_openapi/model/open_release_bo.py b/python/apollo_openapi/model/open_release_bo.py new file mode 100644 index 00000000..061c2147 --- /dev/null +++ b/python/apollo_openapi/model/open_release_bo.py @@ -0,0 +1,119 @@ +# 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 OpenReleaseBO( + 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: + + @staticmethod + def baseInfo() -> typing.Type['OpenReleaseDTO']: + return OpenReleaseDTO + + + class items( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['KVEntity']: + return KVEntity + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['KVEntity'], typing.List['KVEntity']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'items': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'KVEntity': + return super().__getitem__(i) + __annotations__ = { + "baseInfo": baseInfo, + "items": items, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["baseInfo"]) -> 'OpenReleaseDTO': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["items"]) -> MetaOapg.properties.items: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["baseInfo", "items", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["baseInfo"]) -> typing.Union['OpenReleaseDTO', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["items"]) -> typing.Union[MetaOapg.properties.items, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["baseInfo", "items", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + baseInfo: typing.Union['OpenReleaseDTO', schemas.Unset] = schemas.unset, + items: typing.Union[MetaOapg.properties.items, 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], + ) -> 'OpenReleaseBO': + return super().__new__( + cls, + *_args, + baseInfo=baseInfo, + items=items, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.kv_entity import KVEntity +from apollo_openapi.model.open_release_dto import OpenReleaseDTO diff --git a/python/apollo_openapi/model/open_release_bo.pyi b/python/apollo_openapi/model/open_release_bo.pyi new file mode 100644 index 00000000..061c2147 --- /dev/null +++ b/python/apollo_openapi/model/open_release_bo.pyi @@ -0,0 +1,119 @@ +# 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 OpenReleaseBO( + 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: + + @staticmethod + def baseInfo() -> typing.Type['OpenReleaseDTO']: + return OpenReleaseDTO + + + class items( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['KVEntity']: + return KVEntity + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['KVEntity'], typing.List['KVEntity']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'items': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'KVEntity': + return super().__getitem__(i) + __annotations__ = { + "baseInfo": baseInfo, + "items": items, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["baseInfo"]) -> 'OpenReleaseDTO': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["items"]) -> MetaOapg.properties.items: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["baseInfo", "items", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["baseInfo"]) -> typing.Union['OpenReleaseDTO', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["items"]) -> typing.Union[MetaOapg.properties.items, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["baseInfo", "items", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + baseInfo: typing.Union['OpenReleaseDTO', schemas.Unset] = schemas.unset, + items: typing.Union[MetaOapg.properties.items, 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], + ) -> 'OpenReleaseBO': + return super().__new__( + cls, + *_args, + baseInfo=baseInfo, + items=items, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.kv_entity import KVEntity +from apollo_openapi.model.open_release_dto import OpenReleaseDTO diff --git a/python/apollo_openapi/model/open_release_dto.py b/python/apollo_openapi/model/open_release_dto.py new file mode 100644 index 00000000..d09b1fb6 --- /dev/null +++ b/python/apollo_openapi/model/open_release_dto.py @@ -0,0 +1,185 @@ +# 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 OpenReleaseDTO( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Apollo发布信息数据传输对象,表示一次配置发布的完整信息 + """ + + + class MetaOapg: + + class properties: + dataChangeCreatedBy = schemas.StrSchema + dataChangeLastModifiedBy = schemas.StrSchema + dataChangeCreatedTime = schemas.StrSchema + dataChangeLastModifiedTime = schemas.StrSchema + id = schemas.Int64Schema + appId = schemas.StrSchema + clusterName = schemas.StrSchema + namespaceName = schemas.StrSchema + name = schemas.StrSchema + + @staticmethod + def configurations() -> typing.Type['MapString']: + return MapString + comment = schemas.StrSchema + __annotations__ = { + "dataChangeCreatedBy": dataChangeCreatedBy, + "dataChangeLastModifiedBy": dataChangeLastModifiedBy, + "dataChangeCreatedTime": dataChangeCreatedTime, + "dataChangeLastModifiedTime": dataChangeLastModifiedTime, + "id": id, + "appId": appId, + "clusterName": clusterName, + "namespaceName": namespaceName, + "name": name, + "configurations": configurations, + "comment": comment, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> MetaOapg.properties.dataChangeCreatedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> MetaOapg.properties.dataChangeCreatedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> MetaOapg.properties.dataChangeLastModifiedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["clusterName"]) -> MetaOapg.properties.clusterName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["namespaceName"]) -> MetaOapg.properties.namespaceName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["configurations"]) -> 'MapString': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "id", "appId", "clusterName", "namespaceName", "name", "configurations", "comment", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["appId"]) -> typing.Union[MetaOapg.properties.appId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["clusterName"]) -> typing.Union[MetaOapg.properties.clusterName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["namespaceName"]) -> typing.Union[MetaOapg.properties.namespaceName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["configurations"]) -> typing.Union['MapString', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "id", "appId", "clusterName", "namespaceName", "name", "configurations", "comment", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + dataChangeCreatedBy: typing.Union[MetaOapg.properties.dataChangeCreatedBy, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, str, schemas.Unset] = schemas.unset, + dataChangeCreatedTime: typing.Union[MetaOapg.properties.dataChangeCreatedTime, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedTime: typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, str, schemas.Unset] = schemas.unset, + id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, + appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset, + clusterName: typing.Union[MetaOapg.properties.clusterName, str, schemas.Unset] = schemas.unset, + namespaceName: typing.Union[MetaOapg.properties.namespaceName, str, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + configurations: typing.Union['MapString', schemas.Unset] = schemas.unset, + comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OpenReleaseDTO': + return super().__new__( + cls, + *_args, + dataChangeCreatedBy=dataChangeCreatedBy, + dataChangeLastModifiedBy=dataChangeLastModifiedBy, + dataChangeCreatedTime=dataChangeCreatedTime, + dataChangeLastModifiedTime=dataChangeLastModifiedTime, + id=id, + appId=appId, + clusterName=clusterName, + namespaceName=namespaceName, + name=name, + configurations=configurations, + comment=comment, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.map_string import MapString diff --git a/python/apollo_openapi/model/open_release_dto.pyi b/python/apollo_openapi/model/open_release_dto.pyi new file mode 100644 index 00000000..d09b1fb6 --- /dev/null +++ b/python/apollo_openapi/model/open_release_dto.pyi @@ -0,0 +1,185 @@ +# 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 OpenReleaseDTO( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Apollo发布信息数据传输对象,表示一次配置发布的完整信息 + """ + + + class MetaOapg: + + class properties: + dataChangeCreatedBy = schemas.StrSchema + dataChangeLastModifiedBy = schemas.StrSchema + dataChangeCreatedTime = schemas.StrSchema + dataChangeLastModifiedTime = schemas.StrSchema + id = schemas.Int64Schema + appId = schemas.StrSchema + clusterName = schemas.StrSchema + namespaceName = schemas.StrSchema + name = schemas.StrSchema + + @staticmethod + def configurations() -> typing.Type['MapString']: + return MapString + comment = schemas.StrSchema + __annotations__ = { + "dataChangeCreatedBy": dataChangeCreatedBy, + "dataChangeLastModifiedBy": dataChangeLastModifiedBy, + "dataChangeCreatedTime": dataChangeCreatedTime, + "dataChangeLastModifiedTime": dataChangeLastModifiedTime, + "id": id, + "appId": appId, + "clusterName": clusterName, + "namespaceName": namespaceName, + "name": name, + "configurations": configurations, + "comment": comment, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> MetaOapg.properties.dataChangeCreatedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> MetaOapg.properties.dataChangeCreatedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> MetaOapg.properties.dataChangeLastModifiedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["clusterName"]) -> MetaOapg.properties.clusterName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["namespaceName"]) -> MetaOapg.properties.namespaceName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["configurations"]) -> 'MapString': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "id", "appId", "clusterName", "namespaceName", "name", "configurations", "comment", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["appId"]) -> typing.Union[MetaOapg.properties.appId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["clusterName"]) -> typing.Union[MetaOapg.properties.clusterName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["namespaceName"]) -> typing.Union[MetaOapg.properties.namespaceName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["configurations"]) -> typing.Union['MapString', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "id", "appId", "clusterName", "namespaceName", "name", "configurations", "comment", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + dataChangeCreatedBy: typing.Union[MetaOapg.properties.dataChangeCreatedBy, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, str, schemas.Unset] = schemas.unset, + dataChangeCreatedTime: typing.Union[MetaOapg.properties.dataChangeCreatedTime, str, schemas.Unset] = schemas.unset, + dataChangeLastModifiedTime: typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, str, schemas.Unset] = schemas.unset, + id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, + appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset, + clusterName: typing.Union[MetaOapg.properties.clusterName, str, schemas.Unset] = schemas.unset, + namespaceName: typing.Union[MetaOapg.properties.namespaceName, str, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + configurations: typing.Union['MapString', schemas.Unset] = schemas.unset, + comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OpenReleaseDTO': + return super().__new__( + cls, + *_args, + dataChangeCreatedBy=dataChangeCreatedBy, + dataChangeLastModifiedBy=dataChangeLastModifiedBy, + dataChangeCreatedTime=dataChangeCreatedTime, + dataChangeLastModifiedTime=dataChangeLastModifiedTime, + id=id, + appId=appId, + clusterName=clusterName, + namespaceName=namespaceName, + name=name, + configurations=configurations, + comment=comment, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.map_string import MapString diff --git a/python/apollo_openapi/model/rich_response_entity.py b/python/apollo_openapi/model/rich_response_entity.py new file mode 100644 index 00000000..e2b7b8f9 --- /dev/null +++ b/python/apollo_openapi/model/rich_response_entity.py @@ -0,0 +1,107 @@ +# 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 RichResponseEntity( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A wrapper for a single response entity with code, message, and body + """ + + + class MetaOapg: + required = { + "code", + "message", + } + + class properties: + code = schemas.IntSchema + message = schemas.DictSchema + body = schemas.DictSchema + __annotations__ = { + "code": code, + "message": message, + "body": body, + } + + code: MetaOapg.properties.code + message: MetaOapg.properties.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: typing_extensions.Literal["body"]) -> MetaOapg.properties.body: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", "body", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["body"]) -> typing.Union[MetaOapg.properties.body, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", "body", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + code: typing.Union[MetaOapg.properties.code, decimal.Decimal, int, ], + message: typing.Union[MetaOapg.properties.message, dict, frozendict.frozendict, ], + body: typing.Union[MetaOapg.properties.body, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'RichResponseEntity': + return super().__new__( + cls, + *_args, + code=code, + message=message, + body=body, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/rich_response_entity.pyi b/python/apollo_openapi/model/rich_response_entity.pyi new file mode 100644 index 00000000..e2b7b8f9 --- /dev/null +++ b/python/apollo_openapi/model/rich_response_entity.pyi @@ -0,0 +1,107 @@ +# 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 RichResponseEntity( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + A wrapper for a single response entity with code, message, and body + """ + + + class MetaOapg: + required = { + "code", + "message", + } + + class properties: + code = schemas.IntSchema + message = schemas.DictSchema + body = schemas.DictSchema + __annotations__ = { + "code": code, + "message": message, + "body": body, + } + + code: MetaOapg.properties.code + message: MetaOapg.properties.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: typing_extensions.Literal["body"]) -> MetaOapg.properties.body: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", "body", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["body"]) -> typing.Union[MetaOapg.properties.body, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", "body", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + code: typing.Union[MetaOapg.properties.code, decimal.Decimal, int, ], + message: typing.Union[MetaOapg.properties.message, dict, frozendict.frozendict, ], + body: typing.Union[MetaOapg.properties.body, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'RichResponseEntity': + return super().__new__( + cls, + *_args, + code=code, + message=message, + body=body, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/string_to_string_bool_map.py b/python/apollo_openapi/model/string_to_string_bool_map.py new file mode 100644 index 00000000..fdbda722 --- /dev/null +++ b/python/apollo_openapi/model/string_to_string_bool_map.py @@ -0,0 +1,85 @@ +# 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 StringToStringBoolMap( + 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 additional_properties( + schemas.DictSchema + ): + + + class MetaOapg: + additional_properties = schemas.BoolSchema + + def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + # dict_instance[name] accessor + return super().__getitem__(name) + + def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + return super().get_item_oapg(name) + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[MetaOapg.additional_properties, bool, ], + ) -> 'additional_properties': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + **kwargs, + ) + + def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + # dict_instance[name] accessor + return super().__getitem__(name) + + def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + return super().get_item_oapg(name) + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, ], + ) -> 'StringToStringBoolMap': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/string_to_string_bool_map.pyi b/python/apollo_openapi/model/string_to_string_bool_map.pyi new file mode 100644 index 00000000..fdbda722 --- /dev/null +++ b/python/apollo_openapi/model/string_to_string_bool_map.pyi @@ -0,0 +1,85 @@ +# 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 StringToStringBoolMap( + 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 additional_properties( + schemas.DictSchema + ): + + + class MetaOapg: + additional_properties = schemas.BoolSchema + + def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + # dict_instance[name] accessor + return super().__getitem__(name) + + def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + return super().get_item_oapg(name) + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[MetaOapg.additional_properties, bool, ], + ) -> 'additional_properties': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + **kwargs, + ) + + def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + # dict_instance[name] accessor + return super().__getitem__(name) + + def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + return super().get_item_oapg(name) + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, ], + ) -> 'StringToStringBoolMap': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/models/__init__.py b/python/apollo_openapi/models/__init__.py index f5326caa..8a64d451 100644 --- a/python/apollo_openapi/models/__init__.py +++ b/python/apollo_openapi/models/__init__.py @@ -1,107 +1,44 @@ # coding: utf-8 # flake8: noqa -""" - Apollo OpenAPI - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -if __import__("typing").TYPE_CHECKING: - # import models into model package - from apollo_openapi.models.change import Change - from apollo_openapi.models.cluster_dto import ClusterDTO - from apollo_openapi.models.entity_pair_kv_entity import EntityPairKVEntity - from apollo_openapi.models.env_cluster_info import EnvClusterInfo - from apollo_openapi.models.item_change_sets import ItemChangeSets - from apollo_openapi.models.item_dto import ItemDTO - from apollo_openapi.models.kv_entity import KVEntity - from apollo_openapi.models.list_item_diffs import ListItemDiffs - from apollo_openapi.models.list_release_bo import ListReleaseBO - from apollo_openapi.models.map_string import MapString - from apollo_openapi.models.namespace_gray_del_release_dto import NamespaceGrayDelReleaseDTO - from apollo_openapi.models.namespace_identifier import NamespaceIdentifier - from apollo_openapi.models.namespace_release_dto import NamespaceReleaseDTO - from apollo_openapi.models.namespace_sync_model import NamespaceSyncModel - from apollo_openapi.models.namespace_text_model import NamespaceTextModel - from apollo_openapi.models.open_app_dto import OpenAppDTO - from apollo_openapi.models.open_app_namespace_dto import OpenAppNamespaceDTO - from apollo_openapi.models.open_cluster_dto import OpenClusterDTO - from apollo_openapi.models.open_create_app_dto import OpenCreateAppDTO - from apollo_openapi.models.open_env_cluster_dto import OpenEnvClusterDTO - from apollo_openapi.models.open_gray_release_rule_dto import OpenGrayReleaseRuleDTO - from apollo_openapi.models.open_gray_release_rule_item_dto import OpenGrayReleaseRuleItemDTO - from apollo_openapi.models.open_instance_config_dto import OpenInstanceConfigDTO - from apollo_openapi.models.open_instance_dto import OpenInstanceDTO - from apollo_openapi.models.open_item_dto import OpenItemDTO - from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO - from apollo_openapi.models.open_namespace_lock_dto import OpenNamespaceLockDTO - from apollo_openapi.models.open_organization_dto import OpenOrganizationDto - from apollo_openapi.models.open_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO - from apollo_openapi.models.open_page_dto_open_item_dto import OpenPageDTOOpenItemDTO - from apollo_openapi.models.open_release_dto import OpenReleaseDTO - from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response - from apollo_openapi.models.openapi_v1_apps_post400_response import OpenapiV1AppsPost400Response - from apollo_openapi.models.openapi_v1_apps_post_request import OpenapiV1AppsPostRequest - from apollo_openapi.models.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - from apollo_openapi.models.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - from apollo_openapi.models.openapi_v1_envs_env_releases_compare_get200_response import OpenapiV1EnvsEnvReleasesCompareGet200Response - from apollo_openapi.models.release_dto import ReleaseDTO - -else: - from lazy_imports import LazyModule, as_package, load - - load( - LazyModule( - *as_package(__file__), - """# import models into model package -from apollo_openapi.models.change import Change -from apollo_openapi.models.cluster_dto import ClusterDTO -from apollo_openapi.models.entity_pair_kv_entity import EntityPairKVEntity -from apollo_openapi.models.env_cluster_info import EnvClusterInfo -from apollo_openapi.models.item_change_sets import ItemChangeSets -from apollo_openapi.models.item_dto import ItemDTO -from apollo_openapi.models.kv_entity import KVEntity -from apollo_openapi.models.list_item_diffs import ListItemDiffs -from apollo_openapi.models.list_release_bo import ListReleaseBO -from apollo_openapi.models.map_string import MapString -from apollo_openapi.models.namespace_gray_del_release_dto import NamespaceGrayDelReleaseDTO -from apollo_openapi.models.namespace_identifier import NamespaceIdentifier -from apollo_openapi.models.namespace_release_dto import NamespaceReleaseDTO -from apollo_openapi.models.namespace_sync_model import NamespaceSyncModel -from apollo_openapi.models.namespace_text_model import NamespaceTextModel -from apollo_openapi.models.open_app_dto import OpenAppDTO -from apollo_openapi.models.open_app_namespace_dto import OpenAppNamespaceDTO -from apollo_openapi.models.open_cluster_dto import OpenClusterDTO -from apollo_openapi.models.open_create_app_dto import OpenCreateAppDTO -from apollo_openapi.models.open_env_cluster_dto import OpenEnvClusterDTO -from apollo_openapi.models.open_gray_release_rule_dto import OpenGrayReleaseRuleDTO -from apollo_openapi.models.open_gray_release_rule_item_dto import OpenGrayReleaseRuleItemDTO -from apollo_openapi.models.open_instance_config_dto import OpenInstanceConfigDTO -from apollo_openapi.models.open_instance_dto import OpenInstanceDTO -from apollo_openapi.models.open_item_dto import OpenItemDTO -from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO -from apollo_openapi.models.open_namespace_lock_dto import OpenNamespaceLockDTO -from apollo_openapi.models.open_organization_dto import OpenOrganizationDto -from apollo_openapi.models.open_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO -from apollo_openapi.models.open_page_dto_open_item_dto import OpenPageDTOOpenItemDTO -from apollo_openapi.models.open_release_dto import OpenReleaseDTO -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response -from apollo_openapi.models.openapi_v1_apps_post400_response import OpenapiV1AppsPost400Response -from apollo_openapi.models.openapi_v1_apps_post_request import OpenapiV1AppsPostRequest -from apollo_openapi.models.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response -from apollo_openapi.models.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response -from apollo_openapi.models.openapi_v1_envs_env_releases_compare_get200_response import OpenapiV1EnvsEnvReleasesCompareGet200Response -from apollo_openapi.models.release_dto import ReleaseDTO - -""", - name=__name__, - doc=__doc__, - ) - ) +# import all models into this package +# if you have many models here with many references from one model to another this may +# raise a RecursionError +# to avoid this, import only the models that you directly need like: +# from apollo_openapi.model.pet import Pet +# or import this package, but before doing it, use: +# import sys +# sys.setrecursionlimit(n) + +from apollo_openapi.model.exception_response import ExceptionResponse +from apollo_openapi.model.kv_entity import KVEntity +from apollo_openapi.model.map_string import MapString +from apollo_openapi.model.multi_response_entity import MultiResponseEntity +from apollo_openapi.model.namespace_gray_del_release_dto import NamespaceGrayDelReleaseDTO +from apollo_openapi.model.namespace_release_dto import NamespaceReleaseDTO +from apollo_openapi.model.open_app_dto import OpenAppDTO +from apollo_openapi.model.open_app_namespace_dto import OpenAppNamespaceDTO +from apollo_openapi.model.open_cluster_dto import OpenClusterDTO +from apollo_openapi.model.open_create_app_dto import OpenCreateAppDTO +from apollo_openapi.model.open_env_cluster_dto import OpenEnvClusterDTO +from apollo_openapi.model.open_env_cluster_info import OpenEnvClusterInfo +from apollo_openapi.model.open_gray_release_rule_dto import OpenGrayReleaseRuleDTO +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_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_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 +from apollo_openapi.model.string_to_string_bool_map import StringToStringBoolMap diff --git a/python/apollo_openapi/models/change.py b/python/apollo_openapi/models/change.py deleted file mode 100644 index b98ec000..00000000 --- a/python/apollo_openapi/models/change.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.entity_pair_kv_entity import EntityPairKVEntity -from typing import Optional, Set -from typing_extensions import Self - -class Change(BaseModel): - """ - Change - """ # noqa: E501 - type: Optional[StrictStr] = None - entity: Optional[EntityPairKVEntity] = None - __properties: ClassVar[List[str]] = ["type", "entity"] - - @field_validator('type') - def type_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['ADDED', 'MODIFIED', 'DELETED']): - raise ValueError("must be one of enum values ('ADDED', 'MODIFIED', 'DELETED')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Change from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of entity - if self.entity: - _dict['entity'] = self.entity.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Change from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "type": obj.get("type"), - "entity": EntityPairKVEntity.from_dict(obj["entity"]) if obj.get("entity") is not None else None - }) - return _obj - - diff --git a/python/apollo_openapi/models/cluster_dto.py b/python/apollo_openapi/models/cluster_dto.py deleted file mode 100644 index b364202d..00000000 --- a/python/apollo_openapi/models/cluster_dto.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -class ClusterDTO(BaseModel): - """ - ClusterDTO - """ # noqa: E501 - data_change_created_by: Optional[StrictStr] = Field(default=None, alias="dataChangeCreatedBy") - data_change_last_modified_by: Optional[StrictStr] = Field(default=None, alias="dataChangeLastModifiedBy") - data_change_created_by_display_name: Optional[StrictStr] = Field(default=None, alias="dataChangeCreatedByDisplayName") - data_change_last_modified_by_display_name: Optional[StrictStr] = Field(default=None, alias="dataChangeLastModifiedByDisplayName") - data_change_created_time: Optional[StrictStr] = Field(default=None, alias="dataChangeCreatedTime") - data_change_last_modified_time: Optional[StrictStr] = Field(default=None, alias="dataChangeLastModifiedTime") - id: Optional[StrictInt] = None - name: Annotated[str, Field(strict=True)] - app_id: StrictStr = Field(alias="appId") - parent_cluster_id: Optional[StrictInt] = Field(default=None, alias="parentClusterId") - comment: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "id", "name", "appId", "parentClusterId", "comment"] - - @field_validator('name') - def name_validate_regular_expression(cls, value): - """Validates the regular expression""" - if not re.match(r"[0-9a-zA-Z_-]+[0-9a-zA-Z_.-]*", value): - raise ValueError(r"must validate the regular expression /[0-9a-zA-Z_-]+[0-9a-zA-Z_.-]*/") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ClusterDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ClusterDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dataChangeCreatedBy": obj.get("dataChangeCreatedBy"), - "dataChangeLastModifiedBy": obj.get("dataChangeLastModifiedBy"), - "dataChangeCreatedByDisplayName": obj.get("dataChangeCreatedByDisplayName"), - "dataChangeLastModifiedByDisplayName": obj.get("dataChangeLastModifiedByDisplayName"), - "dataChangeCreatedTime": obj.get("dataChangeCreatedTime"), - "dataChangeLastModifiedTime": obj.get("dataChangeLastModifiedTime"), - "id": obj.get("id"), - "name": obj.get("name"), - "appId": obj.get("appId"), - "parentClusterId": obj.get("parentClusterId"), - "comment": obj.get("comment") - }) - return _obj - - diff --git a/python/apollo_openapi/models/entity_pair_kv_entity.py b/python/apollo_openapi/models/entity_pair_kv_entity.py deleted file mode 100644 index 307b4b44..00000000 --- a/python/apollo_openapi/models/entity_pair_kv_entity.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.kv_entity import KVEntity -from typing import Optional, Set -from typing_extensions import Self - -class EntityPairKVEntity(BaseModel): - """ - EntityPairKVEntity - """ # noqa: E501 - first_entity: Optional[KVEntity] = Field(default=None, alias="firstEntity") - second_entity: Optional[KVEntity] = Field(default=None, alias="secondEntity") - __properties: ClassVar[List[str]] = ["firstEntity", "secondEntity"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of EntityPairKVEntity from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of first_entity - if self.first_entity: - _dict['firstEntity'] = self.first_entity.to_dict() - # override the default output from pydantic by calling `to_dict()` of second_entity - if self.second_entity: - _dict['secondEntity'] = self.second_entity.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of EntityPairKVEntity from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "firstEntity": KVEntity.from_dict(obj["firstEntity"]) if obj.get("firstEntity") is not None else None, - "secondEntity": KVEntity.from_dict(obj["secondEntity"]) if obj.get("secondEntity") is not None else None - }) - return _obj - - diff --git a/python/apollo_openapi/models/env_cluster_info.py b/python/apollo_openapi/models/env_cluster_info.py deleted file mode 100644 index e130b2b3..00000000 --- a/python/apollo_openapi/models/env_cluster_info.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.cluster_dto import ClusterDTO -from typing import Optional, Set -from typing_extensions import Self - -class EnvClusterInfo(BaseModel): - """ - EnvClusterInfo - """ # noqa: E501 - env: Optional[StrictStr] = None - clusters: Optional[List[ClusterDTO]] = None - __properties: ClassVar[List[str]] = ["env", "clusters"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of EnvClusterInfo from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in clusters (list) - _items = [] - if self.clusters: - for _item_clusters in self.clusters: - if _item_clusters: - _items.append(_item_clusters.to_dict()) - _dict['clusters'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of EnvClusterInfo from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "env": obj.get("env"), - "clusters": [ClusterDTO.from_dict(_item) for _item in obj["clusters"]] if obj.get("clusters") is not None else None - }) - return _obj - - diff --git a/python/apollo_openapi/models/item_change_sets.py b/python/apollo_openapi/models/item_change_sets.py deleted file mode 100644 index 7ad2fd6c..00000000 --- a/python/apollo_openapi/models/item_change_sets.py +++ /dev/null @@ -1,125 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.item_dto import ItemDTO -from typing import Optional, Set -from typing_extensions import Self - -class ItemChangeSets(BaseModel): - """ - ItemChangeSets - """ # noqa: E501 - data_change_created_by: Optional[StrictStr] = Field(default=None, alias="dataChangeCreatedBy") - data_change_last_modified_by: Optional[StrictStr] = Field(default=None, alias="dataChangeLastModifiedBy") - data_change_created_by_display_name: Optional[StrictStr] = Field(default=None, alias="dataChangeCreatedByDisplayName") - data_change_last_modified_by_display_name: Optional[StrictStr] = Field(default=None, alias="dataChangeLastModifiedByDisplayName") - data_change_created_time: Optional[StrictStr] = Field(default=None, alias="dataChangeCreatedTime") - data_change_last_modified_time: Optional[StrictStr] = Field(default=None, alias="dataChangeLastModifiedTime") - create_items: Optional[List[ItemDTO]] = Field(default=None, alias="createItems") - update_items: Optional[List[ItemDTO]] = Field(default=None, alias="updateItems") - delete_items: Optional[List[ItemDTO]] = Field(default=None, alias="deleteItems") - __properties: ClassVar[List[str]] = ["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "createItems", "updateItems", "deleteItems"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ItemChangeSets from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in create_items (list) - _items = [] - if self.create_items: - for _item_create_items in self.create_items: - if _item_create_items: - _items.append(_item_create_items.to_dict()) - _dict['createItems'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in update_items (list) - _items = [] - if self.update_items: - for _item_update_items in self.update_items: - if _item_update_items: - _items.append(_item_update_items.to_dict()) - _dict['updateItems'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in delete_items (list) - _items = [] - if self.delete_items: - for _item_delete_items in self.delete_items: - if _item_delete_items: - _items.append(_item_delete_items.to_dict()) - _dict['deleteItems'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ItemChangeSets from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dataChangeCreatedBy": obj.get("dataChangeCreatedBy"), - "dataChangeLastModifiedBy": obj.get("dataChangeLastModifiedBy"), - "dataChangeCreatedByDisplayName": obj.get("dataChangeCreatedByDisplayName"), - "dataChangeLastModifiedByDisplayName": obj.get("dataChangeLastModifiedByDisplayName"), - "dataChangeCreatedTime": obj.get("dataChangeCreatedTime"), - "dataChangeLastModifiedTime": obj.get("dataChangeLastModifiedTime"), - "createItems": [ItemDTO.from_dict(_item) for _item in obj["createItems"]] if obj.get("createItems") is not None else None, - "updateItems": [ItemDTO.from_dict(_item) for _item in obj["updateItems"]] if obj.get("updateItems") is not None else None, - "deleteItems": [ItemDTO.from_dict(_item) for _item in obj["deleteItems"]] if obj.get("deleteItems") is not None else None - }) - return _obj - - diff --git a/python/apollo_openapi/models/item_dto.py b/python/apollo_openapi/models/item_dto.py deleted file mode 100644 index befb8a5e..00000000 --- a/python/apollo_openapi/models/item_dto.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ItemDTO(BaseModel): - """ - ItemDTO - """ # noqa: E501 - data_change_created_by: Optional[StrictStr] = Field(default=None, alias="dataChangeCreatedBy") - data_change_last_modified_by: Optional[StrictStr] = Field(default=None, alias="dataChangeLastModifiedBy") - data_change_created_by_display_name: Optional[StrictStr] = Field(default=None, alias="dataChangeCreatedByDisplayName") - data_change_last_modified_by_display_name: Optional[StrictStr] = Field(default=None, alias="dataChangeLastModifiedByDisplayName") - data_change_created_time: Optional[StrictStr] = Field(default=None, alias="dataChangeCreatedTime") - data_change_last_modified_time: Optional[StrictStr] = Field(default=None, alias="dataChangeLastModifiedTime") - id: Optional[StrictInt] = None - namespace_id: Optional[StrictInt] = Field(default=None, alias="namespaceId") - key: Optional[StrictStr] = None - type: Optional[StrictInt] = None - value: Optional[StrictStr] = None - comment: Optional[StrictStr] = None - line_num: Optional[StrictInt] = Field(default=None, alias="lineNum") - __properties: ClassVar[List[str]] = ["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "id", "namespaceId", "key", "type", "value", "comment", "lineNum"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ItemDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ItemDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dataChangeCreatedBy": obj.get("dataChangeCreatedBy"), - "dataChangeLastModifiedBy": obj.get("dataChangeLastModifiedBy"), - "dataChangeCreatedByDisplayName": obj.get("dataChangeCreatedByDisplayName"), - "dataChangeLastModifiedByDisplayName": obj.get("dataChangeLastModifiedByDisplayName"), - "dataChangeCreatedTime": obj.get("dataChangeCreatedTime"), - "dataChangeLastModifiedTime": obj.get("dataChangeLastModifiedTime"), - "id": obj.get("id"), - "namespaceId": obj.get("namespaceId"), - "key": obj.get("key"), - "type": obj.get("type"), - "value": obj.get("value"), - "comment": obj.get("comment"), - "lineNum": obj.get("lineNum") - }) - return _obj - - diff --git a/python/apollo_openapi/models/kv_entity.py b/python/apollo_openapi/models/kv_entity.py deleted file mode 100644 index 572ebb72..00000000 --- a/python/apollo_openapi/models/kv_entity.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class KVEntity(BaseModel): - """ - KVEntity - """ # noqa: E501 - key: Optional[StrictStr] = None - value: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["key", "value"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of KVEntity from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of KVEntity from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "key": obj.get("key"), - "value": obj.get("value") - }) - return _obj - - diff --git a/python/apollo_openapi/models/list_item_diffs.py b/python/apollo_openapi/models/list_item_diffs.py deleted file mode 100644 index da76df7b..00000000 --- a/python/apollo_openapi/models/list_item_diffs.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.item_change_sets import ItemChangeSets -from apollo_openapi.models.namespace_identifier import NamespaceIdentifier -from typing import Optional, Set -from typing_extensions import Self - -class ListItemDiffs(BaseModel): - """ - ListItemDiffs - """ # noqa: E501 - namespace: Optional[NamespaceIdentifier] = None - diffs: Optional[ItemChangeSets] = None - ext_info: Optional[StrictStr] = Field(default=None, alias="extInfo") - __properties: ClassVar[List[str]] = ["namespace", "diffs", "extInfo"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ListItemDiffs from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of namespace - if self.namespace: - _dict['namespace'] = self.namespace.to_dict() - # override the default output from pydantic by calling `to_dict()` of diffs - if self.diffs: - _dict['diffs'] = self.diffs.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ListItemDiffs from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "namespace": NamespaceIdentifier.from_dict(obj["namespace"]) if obj.get("namespace") is not None else None, - "diffs": ItemChangeSets.from_dict(obj["diffs"]) if obj.get("diffs") is not None else None, - "extInfo": obj.get("extInfo") - }) - return _obj - - diff --git a/python/apollo_openapi/models/list_release_bo.py b/python/apollo_openapi/models/list_release_bo.py deleted file mode 100644 index f2f91024..00000000 --- a/python/apollo_openapi/models/list_release_bo.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.kv_entity import KVEntity -from apollo_openapi.models.release_dto import ReleaseDTO -from typing import Optional, Set -from typing_extensions import Self - -class ListReleaseBO(BaseModel): - """ - ListReleaseBO - """ # noqa: E501 - base_info: Optional[ReleaseDTO] = Field(default=None, alias="baseInfo") - items: Optional[List[KVEntity]] = None - __properties: ClassVar[List[str]] = ["baseInfo", "items"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ListReleaseBO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of base_info - if self.base_info: - _dict['baseInfo'] = self.base_info.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in items (list) - _items = [] - if self.items: - for _item_items in self.items: - if _item_items: - _items.append(_item_items.to_dict()) - _dict['items'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ListReleaseBO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "baseInfo": ReleaseDTO.from_dict(obj["baseInfo"]) if obj.get("baseInfo") is not None else None, - "items": [KVEntity.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None - }) - return _obj - - diff --git a/python/apollo_openapi/models/map_string.py b/python/apollo_openapi/models/map_string.py deleted file mode 100644 index 759d3d4b..00000000 --- a/python/apollo_openapi/models/map_string.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class MapString(BaseModel): - """ - 字符串映射对象,用于表示键值对的配置数据结构 - """ # noqa: E501 - key: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["key"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of MapString from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of MapString from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "key": obj.get("key") - }) - return _obj - - diff --git a/python/apollo_openapi/models/namespace_gray_del_release_dto.py b/python/apollo_openapi/models/namespace_gray_del_release_dto.py deleted file mode 100644 index 7f50df52..00000000 --- a/python/apollo_openapi/models/namespace_gray_del_release_dto.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class NamespaceGrayDelReleaseDTO(BaseModel): - """ - 命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布 - """ # noqa: E501 - release_title: Optional[StrictStr] = Field(default=None, description="发布标题,用于标识这次灰度删除发布的名称或版本号", alias="releaseTitle") - release_comment: Optional[StrictStr] = Field(default=None, description="发布备注,详细描述本次灰度删除发布的目的和删除的配置项", alias="releaseComment") - released_by: Optional[StrictStr] = Field(default=None, description="发布操作者用户名,记录是谁执行了这次灰度删除发布操作", alias="releasedBy") - is_emergency_publish: Optional[StrictBool] = Field(default=None, description="是否为紧急发布,紧急发布可能会跳过某些审核流程", alias="isEmergencyPublish") - gray_del_keys: Optional[List[StrictStr]] = Field(default=None, description="需要在灰度发布中删除的配置项键名列表", alias="grayDelKeys") - __properties: ClassVar[List[str]] = ["releaseTitle", "releaseComment", "releasedBy", "isEmergencyPublish", "grayDelKeys"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of NamespaceGrayDelReleaseDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of NamespaceGrayDelReleaseDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "releaseTitle": obj.get("releaseTitle"), - "releaseComment": obj.get("releaseComment"), - "releasedBy": obj.get("releasedBy"), - "isEmergencyPublish": obj.get("isEmergencyPublish"), - "grayDelKeys": obj.get("grayDelKeys") - }) - return _obj - - diff --git a/python/apollo_openapi/models/namespace_identifier.py b/python/apollo_openapi/models/namespace_identifier.py deleted file mode 100644 index f490f7f4..00000000 --- a/python/apollo_openapi/models/namespace_identifier.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class NamespaceIdentifier(BaseModel): - """ - NamespaceIdentifier - """ # noqa: E501 - app_id: Optional[StrictStr] = Field(default=None, alias="appId") - env: Optional[StrictStr] = None - cluster_name: Optional[StrictStr] = Field(default=None, alias="clusterName") - namespace_name: Optional[StrictStr] = Field(default=None, alias="namespaceName") - __properties: ClassVar[List[str]] = ["appId", "env", "clusterName", "namespaceName"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of NamespaceIdentifier from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of NamespaceIdentifier from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "appId": obj.get("appId"), - "env": obj.get("env"), - "clusterName": obj.get("clusterName"), - "namespaceName": obj.get("namespaceName") - }) - return _obj - - diff --git a/python/apollo_openapi/models/namespace_release_dto.py b/python/apollo_openapi/models/namespace_release_dto.py deleted file mode 100644 index b69486af..00000000 --- a/python/apollo_openapi/models/namespace_release_dto.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class NamespaceReleaseDTO(BaseModel): - """ - 命名空间发布请求数据传输对象,用于创建新的配置发布 - """ # noqa: E501 - release_title: Optional[StrictStr] = Field(default=None, description="发布标题,用于标识这次发布的名称或版本号", alias="releaseTitle") - release_comment: Optional[StrictStr] = Field(default=None, description="发布备注,详细描述本次发布的变更内容和目的", alias="releaseComment") - released_by: Optional[StrictStr] = Field(default=None, description="发布操作者用户名,记录是谁执行了这次发布操作", alias="releasedBy") - is_emergency_publish: Optional[StrictBool] = Field(default=None, description="是否为紧急发布,紧急发布可能会跳过某些审核流程", alias="isEmergencyPublish") - __properties: ClassVar[List[str]] = ["releaseTitle", "releaseComment", "releasedBy", "isEmergencyPublish"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of NamespaceReleaseDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of NamespaceReleaseDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "releaseTitle": obj.get("releaseTitle"), - "releaseComment": obj.get("releaseComment"), - "releasedBy": obj.get("releasedBy"), - "isEmergencyPublish": obj.get("isEmergencyPublish") - }) - return _obj - - diff --git a/python/apollo_openapi/models/namespace_sync_model.py b/python/apollo_openapi/models/namespace_sync_model.py deleted file mode 100644 index 6d822c9b..00000000 --- a/python/apollo_openapi/models/namespace_sync_model.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.item_dto import ItemDTO -from apollo_openapi.models.namespace_identifier import NamespaceIdentifier -from typing import Optional, Set -from typing_extensions import Self - -class NamespaceSyncModel(BaseModel): - """ - NamespaceSyncModel - """ # noqa: E501 - sync_to_namespaces: Optional[List[NamespaceIdentifier]] = Field(default=None, alias="syncToNamespaces") - sync_items: Optional[List[ItemDTO]] = Field(default=None, alias="syncItems") - __properties: ClassVar[List[str]] = ["syncToNamespaces", "syncItems"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of NamespaceSyncModel from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in sync_to_namespaces (list) - _items = [] - if self.sync_to_namespaces: - for _item_sync_to_namespaces in self.sync_to_namespaces: - if _item_sync_to_namespaces: - _items.append(_item_sync_to_namespaces.to_dict()) - _dict['syncToNamespaces'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in sync_items (list) - _items = [] - if self.sync_items: - for _item_sync_items in self.sync_items: - if _item_sync_items: - _items.append(_item_sync_items.to_dict()) - _dict['syncItems'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of NamespaceSyncModel from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "syncToNamespaces": [NamespaceIdentifier.from_dict(_item) for _item in obj["syncToNamespaces"]] if obj.get("syncToNamespaces") is not None else None, - "syncItems": [ItemDTO.from_dict(_item) for _item in obj["syncItems"]] if obj.get("syncItems") is not None else None - }) - return _obj - - diff --git a/python/apollo_openapi/models/namespace_text_model.py b/python/apollo_openapi/models/namespace_text_model.py deleted file mode 100644 index 29264e4c..00000000 --- a/python/apollo_openapi/models/namespace_text_model.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class NamespaceTextModel(BaseModel): - """ - NamespaceTextModel - """ # noqa: E501 - app_id: Optional[StrictStr] = Field(default=None, alias="appId") - env: Optional[StrictStr] = None - cluster_name: Optional[StrictStr] = Field(default=None, alias="clusterName") - namespace_name: Optional[StrictStr] = Field(default=None, alias="namespaceName") - namespace_id: Optional[StrictInt] = Field(default=None, alias="namespaceId") - format: Optional[StrictStr] = None - config_text: Optional[StrictStr] = Field(default=None, alias="configText") - operator: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["appId", "env", "clusterName", "namespaceName", "namespaceId", "format", "configText", "operator"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of NamespaceTextModel from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of NamespaceTextModel from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "appId": obj.get("appId"), - "env": obj.get("env"), - "clusterName": obj.get("clusterName"), - "namespaceName": obj.get("namespaceName"), - "namespaceId": obj.get("namespaceId"), - "format": obj.get("format"), - "configText": obj.get("configText"), - "operator": obj.get("operator") - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_app_dto.py b/python/apollo_openapi/models/open_app_dto.py deleted file mode 100644 index 6b3c0c5b..00000000 --- a/python/apollo_openapi/models/open_app_dto.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class OpenAppDTO(BaseModel): - """ - Apollo应用信息数据传输对象,包含应用的基本信息和元数据 - """ # noqa: E501 - data_change_created_by: Optional[StrictStr] = Field(default=None, description="数据创建者用户名,记录是谁创建了这个应用", alias="dataChangeCreatedBy") - data_change_last_modified_by: Optional[StrictStr] = Field(default=None, description="数据最后修改者用户名,记录最后一次修改应用信息的用户", alias="dataChangeLastModifiedBy") - data_change_created_time: Optional[StrictStr] = Field(default=None, description="数据创建时间,ISO 8601格式的时间戳", alias="dataChangeCreatedTime") - data_change_last_modified_time: Optional[StrictStr] = Field(default=None, description="数据最后修改时间,ISO 8601格式的时间戳", alias="dataChangeLastModifiedTime") - name: Optional[StrictStr] = Field(default=None, description="应用名称,用于显示的友好名称") - app_id: Optional[StrictStr] = Field(default=None, description="应用唯一标识符,全局唯一的应用ID", alias="appId") - org_id: Optional[StrictStr] = Field(default=None, description="组织ID,应用所属组织的唯一标识", alias="orgId") - org_name: Optional[StrictStr] = Field(default=None, description="组织名称,应用所属组织的显示名称", alias="orgName") - owner_name: Optional[StrictStr] = Field(default=None, description="应用负责人姓名,应用的主要负责人", alias="ownerName") - owner_email: Optional[StrictStr] = Field(default=None, description="应用负责人邮箱地址,用于接收应用相关通知", alias="ownerEmail") - __properties: ClassVar[List[str]] = ["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "orgId", "orgName", "ownerName", "ownerEmail"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenAppDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenAppDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dataChangeCreatedBy": obj.get("dataChangeCreatedBy"), - "dataChangeLastModifiedBy": obj.get("dataChangeLastModifiedBy"), - "dataChangeCreatedTime": obj.get("dataChangeCreatedTime"), - "dataChangeLastModifiedTime": obj.get("dataChangeLastModifiedTime"), - "name": obj.get("name"), - "appId": obj.get("appId"), - "orgId": obj.get("orgId"), - "orgName": obj.get("orgName"), - "ownerName": obj.get("ownerName"), - "ownerEmail": obj.get("ownerEmail") - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_app_namespace_dto.py b/python/apollo_openapi/models/open_app_namespace_dto.py deleted file mode 100644 index 2170a57e..00000000 --- a/python/apollo_openapi/models/open_app_namespace_dto.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class OpenAppNamespaceDTO(BaseModel): - """ - Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 - """ # noqa: E501 - data_change_created_by: Optional[StrictStr] = Field(default=None, description="命名空间创建者用户名,记录是谁创建了这个应用命名空间", alias="dataChangeCreatedBy") - data_change_last_modified_by: Optional[StrictStr] = Field(default=None, description="命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户", alias="dataChangeLastModifiedBy") - data_change_created_time: Optional[StrictStr] = Field(default=None, description="命名空间创建时间,ISO 8601格式的时间戳", alias="dataChangeCreatedTime") - data_change_last_modified_time: Optional[StrictStr] = Field(default=None, description="命名空间最后修改时间,ISO 8601格式的时间戳", alias="dataChangeLastModifiedTime") - name: Optional[StrictStr] = Field(default=None, description="命名空间名称,在同一应用内唯一标识一个命名空间") - app_id: Optional[StrictStr] = Field(default=None, description="所属应用的唯一标识符", alias="appId") - format: Optional[StrictStr] = Field(default=None, description="命名空间格式类型,如properties、xml、json、yml等") - is_public: Optional[StrictBool] = Field(default=None, description="是否为公共命名空间,公共命名空间可以被其他应用关联使用", alias="isPublic") - append_namespace_prefix: Optional[StrictBool] = Field(default=True, description="对于公共命名空间,是否在命名空间名称前添加前缀", alias="appendNamespacePrefix") - comment: Optional[StrictStr] = Field(default=None, description="命名空间备注说明,描述命名空间的用途和包含的配置类型") - __properties: ClassVar[List[str]] = ["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "format", "isPublic", "appendNamespacePrefix", "comment"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenAppNamespaceDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenAppNamespaceDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dataChangeCreatedBy": obj.get("dataChangeCreatedBy"), - "dataChangeLastModifiedBy": obj.get("dataChangeLastModifiedBy"), - "dataChangeCreatedTime": obj.get("dataChangeCreatedTime"), - "dataChangeLastModifiedTime": obj.get("dataChangeLastModifiedTime"), - "name": obj.get("name"), - "appId": obj.get("appId"), - "format": obj.get("format"), - "isPublic": obj.get("isPublic"), - "appendNamespacePrefix": obj.get("appendNamespacePrefix") if obj.get("appendNamespacePrefix") is not None else True, - "comment": obj.get("comment") - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_cluster_dto.py b/python/apollo_openapi/models/open_cluster_dto.py deleted file mode 100644 index 1869e0a3..00000000 --- a/python/apollo_openapi/models/open_cluster_dto.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class OpenClusterDTO(BaseModel): - """ - Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 - """ # noqa: E501 - data_change_created_by: Optional[StrictStr] = Field(default=None, description="集群创建者用户名,记录是谁创建了这个集群", alias="dataChangeCreatedBy") - data_change_last_modified_by: Optional[StrictStr] = Field(default=None, description="集群最后修改者用户名,记录最后一次修改集群信息的用户", alias="dataChangeLastModifiedBy") - data_change_created_time: Optional[StrictStr] = Field(default=None, description="集群创建时间,ISO 8601格式的时间戳", alias="dataChangeCreatedTime") - data_change_last_modified_time: Optional[StrictStr] = Field(default=None, description="集群最后修改时间,ISO 8601格式的时间戳", alias="dataChangeLastModifiedTime") - name: Optional[StrictStr] = Field(default=None, description="集群名称,在同一应用和环境下唯一标识一个集群") - app_id: Optional[StrictStr] = Field(default=None, description="所属应用的唯一标识符", alias="appId") - __properties: ClassVar[List[str]] = ["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenClusterDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenClusterDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dataChangeCreatedBy": obj.get("dataChangeCreatedBy"), - "dataChangeLastModifiedBy": obj.get("dataChangeLastModifiedBy"), - "dataChangeCreatedTime": obj.get("dataChangeCreatedTime"), - "dataChangeLastModifiedTime": obj.get("dataChangeLastModifiedTime"), - "name": obj.get("name"), - "appId": obj.get("appId") - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_create_app_dto.py b/python/apollo_openapi/models/open_create_app_dto.py deleted file mode 100644 index 79bb8bd6..00000000 --- a/python/apollo_openapi/models/open_create_app_dto.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.open_app_dto import OpenAppDTO -from typing import Optional, Set -from typing_extensions import Self - -class OpenCreateAppDTO(BaseModel): - """ - 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 - """ # noqa: E501 - assign_app_role_to_self: Optional[StrictBool] = Field(default=None, description="是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限", alias="assignAppRoleToSelf") - admins: Optional[List[StrictStr]] = Field(default=None, description="应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限") - app: Optional[OpenAppDTO] = None - __properties: ClassVar[List[str]] = ["assignAppRoleToSelf", "admins", "app"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenCreateAppDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of app - if self.app: - _dict['app'] = self.app.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenCreateAppDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "assignAppRoleToSelf": obj.get("assignAppRoleToSelf"), - "admins": obj.get("admins"), - "app": OpenAppDTO.from_dict(obj["app"]) if obj.get("app") is not None else None - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_env_cluster_dto.py b/python/apollo_openapi/models/open_env_cluster_dto.py deleted file mode 100644 index ea767b96..00000000 --- a/python/apollo_openapi/models/open_env_cluster_dto.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class OpenEnvClusterDTO(BaseModel): - """ - OpenEnvClusterDTO - """ # noqa: E501 - env: Optional[StrictStr] = None - clusters: Optional[List[StrictStr]] = None - __properties: ClassVar[List[str]] = ["env", "clusters"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenEnvClusterDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenEnvClusterDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "env": obj.get("env"), - "clusters": obj.get("clusters") - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_gray_release_rule_dto.py b/python/apollo_openapi/models/open_gray_release_rule_dto.py deleted file mode 100644 index 92b292b3..00000000 --- a/python/apollo_openapi/models/open_gray_release_rule_dto.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.open_gray_release_rule_item_dto import OpenGrayReleaseRuleItemDTO -from typing import Optional, Set -from typing_extensions import Self - -class OpenGrayReleaseRuleDTO(BaseModel): - """ - Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 - """ # noqa: E501 - data_change_created_by: Optional[StrictStr] = Field(default=None, description="灰度规则创建者用户名,记录是谁创建了这个灰度发布规则", alias="dataChangeCreatedBy") - data_change_last_modified_by: Optional[StrictStr] = Field(default=None, description="灰度规则最后修改者用户名,记录最后一次修改规则的用户", alias="dataChangeLastModifiedBy") - data_change_created_time: Optional[StrictStr] = Field(default=None, description="灰度规则创建时间,ISO 8601格式的时间戳", alias="dataChangeCreatedTime") - data_change_last_modified_time: Optional[StrictStr] = Field(default=None, description="灰度规则最后修改时间,ISO 8601格式的时间戳", alias="dataChangeLastModifiedTime") - app_id: Optional[StrictStr] = Field(default=None, description="所属应用的唯一标识符", alias="appId") - cluster_name: Optional[StrictStr] = Field(default=None, description="所属集群的名称", alias="clusterName") - namespace_name: Optional[StrictStr] = Field(default=None, description="所属命名空间的名称", alias="namespaceName") - branch_name: Optional[StrictStr] = Field(default=None, description="灰度分支名称,标识灰度发布的分支", alias="branchName") - rule_items: Optional[List[OpenGrayReleaseRuleItemDTO]] = Field(default=None, description="灰度发布规则项列表,包含具体的灰度规则条件", alias="ruleItems") - __properties: ClassVar[List[str]] = ["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "appId", "clusterName", "namespaceName", "branchName", "ruleItems"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenGrayReleaseRuleDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in rule_items (list) - _items = [] - if self.rule_items: - for _item_rule_items in self.rule_items: - if _item_rule_items: - _items.append(_item_rule_items.to_dict()) - _dict['ruleItems'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenGrayReleaseRuleDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dataChangeCreatedBy": obj.get("dataChangeCreatedBy"), - "dataChangeLastModifiedBy": obj.get("dataChangeLastModifiedBy"), - "dataChangeCreatedTime": obj.get("dataChangeCreatedTime"), - "dataChangeLastModifiedTime": obj.get("dataChangeLastModifiedTime"), - "appId": obj.get("appId"), - "clusterName": obj.get("clusterName"), - "namespaceName": obj.get("namespaceName"), - "branchName": obj.get("branchName"), - "ruleItems": [OpenGrayReleaseRuleItemDTO.from_dict(_item) for _item in obj["ruleItems"]] if obj.get("ruleItems") is not None else None - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_gray_release_rule_item_dto.py b/python/apollo_openapi/models/open_gray_release_rule_item_dto.py deleted file mode 100644 index a8657a57..00000000 --- a/python/apollo_openapi/models/open_gray_release_rule_item_dto.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class OpenGrayReleaseRuleItemDTO(BaseModel): - """ - Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 - """ # noqa: E501 - client_app_id: Optional[StrictStr] = Field(default=None, description="客户端应用ID,指定哪个应用可以获取灰度配置", alias="clientAppId") - client_ip_list: Optional[List[StrictStr]] = Field(default=None, description="客户端IP地址列表,指定哪些IP地址可以获取灰度配置", alias="clientIpList") - client_label_list: Optional[List[StrictStr]] = Field(default=None, description="客户端标签列表,通过标签来识别可以获取灰度配置的客户端", alias="clientLabelList") - __properties: ClassVar[List[str]] = ["clientAppId", "clientIpList", "clientLabelList"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenGrayReleaseRuleItemDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenGrayReleaseRuleItemDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "clientAppId": obj.get("clientAppId"), - "clientIpList": obj.get("clientIpList"), - "clientLabelList": obj.get("clientLabelList") - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_instance_config_dto.py b/python/apollo_openapi/models/open_instance_config_dto.py deleted file mode 100644 index 46d9c6b5..00000000 --- a/python/apollo_openapi/models/open_instance_config_dto.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.open_release_dto import OpenReleaseDTO -from typing import Optional, Set -from typing_extensions import Self - -class OpenInstanceConfigDTO(BaseModel): - """ - OpenInstanceConfigDTO - """ # noqa: E501 - release: Optional[OpenReleaseDTO] = None - release_delivery_time: Optional[StrictStr] = Field(default=None, alias="releaseDeliveryTime") - data_change_last_modified_time: Optional[StrictStr] = Field(default=None, alias="dataChangeLastModifiedTime") - __properties: ClassVar[List[str]] = ["release", "releaseDeliveryTime", "dataChangeLastModifiedTime"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenInstanceConfigDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of release - if self.release: - _dict['release'] = self.release.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenInstanceConfigDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "release": OpenReleaseDTO.from_dict(obj["release"]) if obj.get("release") is not None else None, - "releaseDeliveryTime": obj.get("releaseDeliveryTime"), - "dataChangeLastModifiedTime": obj.get("dataChangeLastModifiedTime") - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_instance_dto.py b/python/apollo_openapi/models/open_instance_dto.py deleted file mode 100644 index 1e2899a2..00000000 --- a/python/apollo_openapi/models/open_instance_dto.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.open_instance_config_dto import OpenInstanceConfigDTO -from typing import Optional, Set -from typing_extensions import Self - -class OpenInstanceDTO(BaseModel): - """ - OpenInstanceDTO - """ # noqa: E501 - id: Optional[StrictInt] = None - app_id: Optional[StrictStr] = Field(default=None, alias="appId") - cluster_name: Optional[StrictStr] = Field(default=None, alias="clusterName") - data_center: Optional[StrictStr] = Field(default=None, alias="dataCenter") - ip: Optional[StrictStr] = None - configs: Optional[List[OpenInstanceConfigDTO]] = None - data_change_created_time: Optional[StrictStr] = Field(default=None, alias="dataChangeCreatedTime") - __properties: ClassVar[List[str]] = ["id", "appId", "clusterName", "dataCenter", "ip", "configs", "dataChangeCreatedTime"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenInstanceDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in configs (list) - _items = [] - if self.configs: - for _item_configs in self.configs: - if _item_configs: - _items.append(_item_configs.to_dict()) - _dict['configs'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenInstanceDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "appId": obj.get("appId"), - "clusterName": obj.get("clusterName"), - "dataCenter": obj.get("dataCenter"), - "ip": obj.get("ip"), - "configs": [OpenInstanceConfigDTO.from_dict(_item) for _item in obj["configs"]] if obj.get("configs") is not None else None, - "dataChangeCreatedTime": obj.get("dataChangeCreatedTime") - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_item_dto.py b/python/apollo_openapi/models/open_item_dto.py deleted file mode 100644 index b2c5ff59..00000000 --- a/python/apollo_openapi/models/open_item_dto.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class OpenItemDTO(BaseModel): - """ - Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 - """ # noqa: E501 - data_change_created_by: Optional[StrictStr] = Field(default=None, description="配置项创建者用户名,记录是谁创建了这个配置项", alias="dataChangeCreatedBy") - data_change_last_modified_by: Optional[StrictStr] = Field(default=None, description="配置项最后修改者用户名,记录最后一次修改配置的用户", alias="dataChangeLastModifiedBy") - data_change_created_time: Optional[StrictStr] = Field(default=None, description="配置项创建时间,ISO 8601格式的时间戳", alias="dataChangeCreatedTime") - data_change_last_modified_time: Optional[StrictStr] = Field(default=None, description="配置项最后修改时间,ISO 8601格式的时间戳", alias="dataChangeLastModifiedTime") - key: Optional[StrictStr] = Field(default=None, description="配置项的键名,在同一命名空间内唯一标识一个配置项") - type: Optional[StrictInt] = Field(default=None, description="配置项类型,0表示普通配置项,1表示文件类型配置项") - value: Optional[StrictStr] = Field(default=None, description="配置项的值,可以是字符串、数字、JSON等格式") - comment: Optional[StrictStr] = Field(default=None, description="配置项的注释说明,用于描述配置项的用途和含义") - __properties: ClassVar[List[str]] = ["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "key", "type", "value", "comment"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenItemDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenItemDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dataChangeCreatedBy": obj.get("dataChangeCreatedBy"), - "dataChangeLastModifiedBy": obj.get("dataChangeLastModifiedBy"), - "dataChangeCreatedTime": obj.get("dataChangeCreatedTime"), - "dataChangeLastModifiedTime": obj.get("dataChangeLastModifiedTime"), - "key": obj.get("key"), - "type": obj.get("type"), - "value": obj.get("value"), - "comment": obj.get("comment") - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_namespace_dto.py b/python/apollo_openapi/models/open_namespace_dto.py deleted file mode 100644 index e5d8815e..00000000 --- a/python/apollo_openapi/models/open_namespace_dto.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.open_item_dto import OpenItemDTO -from typing import Optional, Set -from typing_extensions import Self - -class OpenNamespaceDTO(BaseModel): - """ - Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 - """ # noqa: E501 - data_change_created_by: Optional[StrictStr] = Field(default=None, description="命名空间创建者用户名,记录是谁创建了这个命名空间", alias="dataChangeCreatedBy") - data_change_last_modified_by: Optional[StrictStr] = Field(default=None, description="命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户", alias="dataChangeLastModifiedBy") - data_change_created_time: Optional[StrictStr] = Field(default=None, description="命名空间创建时间,ISO 8601格式的时间戳", alias="dataChangeCreatedTime") - data_change_last_modified_time: Optional[StrictStr] = Field(default=None, description="命名空间最后修改时间,ISO 8601格式的时间戳", alias="dataChangeLastModifiedTime") - app_id: Optional[StrictStr] = Field(default=None, description="所属应用的唯一标识符", alias="appId") - cluster_name: Optional[StrictStr] = Field(default=None, description="所属集群的名称", alias="clusterName") - namespace_name: Optional[StrictStr] = Field(default=None, description="命名空间名称,在同一应用和集群下唯一标识一个命名空间", alias="namespaceName") - comment: Optional[StrictStr] = Field(default=None, description="命名空间备注说明,描述命名空间的用途") - format: Optional[StrictStr] = Field(default=None, description="命名空间格式类型,如properties、xml、json、yml等") - is_public: Optional[StrictBool] = Field(default=None, description="是否为公共命名空间,公共命名空间可以被其他应用关联使用", alias="isPublic") - items: Optional[List[OpenItemDTO]] = Field(default=None, description="命名空间包含的配置项列表") - __properties: ClassVar[List[str]] = ["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "appId", "clusterName", "namespaceName", "comment", "format", "isPublic", "items"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenNamespaceDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in items (list) - _items = [] - if self.items: - for _item_items in self.items: - if _item_items: - _items.append(_item_items.to_dict()) - _dict['items'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenNamespaceDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dataChangeCreatedBy": obj.get("dataChangeCreatedBy"), - "dataChangeLastModifiedBy": obj.get("dataChangeLastModifiedBy"), - "dataChangeCreatedTime": obj.get("dataChangeCreatedTime"), - "dataChangeLastModifiedTime": obj.get("dataChangeLastModifiedTime"), - "appId": obj.get("appId"), - "clusterName": obj.get("clusterName"), - "namespaceName": obj.get("namespaceName"), - "comment": obj.get("comment"), - "format": obj.get("format"), - "isPublic": obj.get("isPublic"), - "items": [OpenItemDTO.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_namespace_lock_dto.py b/python/apollo_openapi/models/open_namespace_lock_dto.py deleted file mode 100644 index e9fc8c7e..00000000 --- a/python/apollo_openapi/models/open_namespace_lock_dto.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class OpenNamespaceLockDTO(BaseModel): - """ - Apollo命名空间锁状态数据传输对象 - """ # noqa: E501 - namespace_name: Optional[StrictStr] = Field(default=None, description="命名空间名称", alias="namespaceName") - is_locked: Optional[StrictBool] = Field(default=None, description="是否被锁定", alias="isLocked") - locked_by: Optional[StrictStr] = Field(default=None, description="锁定者用户名", alias="lockedBy") - __properties: ClassVar[List[str]] = ["namespaceName", "isLocked", "lockedBy"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenNamespaceLockDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenNamespaceLockDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "namespaceName": obj.get("namespaceName"), - "isLocked": obj.get("isLocked"), - "lockedBy": obj.get("lockedBy") - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_organization_dto.py b/python/apollo_openapi/models/open_organization_dto.py deleted file mode 100644 index 6b6caf44..00000000 --- a/python/apollo_openapi/models/open_organization_dto.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class OpenOrganizationDto(BaseModel): - """ - OpenOrganizationDto - """ # noqa: E501 - org_id: Optional[StrictStr] = Field(default=None, alias="orgId") - org_name: Optional[StrictStr] = Field(default=None, alias="orgName") - __properties: ClassVar[List[str]] = ["orgId", "orgName"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenOrganizationDto from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenOrganizationDto from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "orgId": obj.get("orgId"), - "orgName": obj.get("orgName") - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_page_dto_open_instance_dto.py b/python/apollo_openapi/models/open_page_dto_open_instance_dto.py deleted file mode 100644 index db43b749..00000000 --- a/python/apollo_openapi/models/open_page_dto_open_instance_dto.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.open_instance_dto import OpenInstanceDTO -from typing import Optional, Set -from typing_extensions import Self - -class OpenPageDTOOpenInstanceDTO(BaseModel): - """ - 分页实例数据传输对象,用于返回分页查询的实例列表结果 - """ # noqa: E501 - page: Optional[StrictInt] = Field(default=None, description="当前页码,从0开始计数") - size: Optional[StrictInt] = Field(default=None, description="每页显示的记录数量") - total: Optional[StrictInt] = Field(default=None, description="总记录数,符合查询条件的实例总数量") - content: Optional[List[OpenInstanceDTO]] = Field(default=None, description="当前页的实例列表,包含具体的实例数据") - __properties: ClassVar[List[str]] = ["page", "size", "total", "content"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenPageDTOOpenInstanceDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in content (list) - _items = [] - if self.content: - for _item_content in self.content: - if _item_content: - _items.append(_item_content.to_dict()) - _dict['content'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenPageDTOOpenInstanceDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "page": obj.get("page"), - "size": obj.get("size"), - "total": obj.get("total"), - "content": [OpenInstanceDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_page_dto_open_item_dto.py b/python/apollo_openapi/models/open_page_dto_open_item_dto.py deleted file mode 100644 index de70d3fd..00000000 --- a/python/apollo_openapi/models/open_page_dto_open_item_dto.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.open_item_dto import OpenItemDTO -from typing import Optional, Set -from typing_extensions import Self - -class OpenPageDTOOpenItemDTO(BaseModel): - """ - 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 - """ # noqa: E501 - page: Optional[StrictInt] = Field(default=None, description="当前页码,从0开始计数") - size: Optional[StrictInt] = Field(default=None, description="每页显示的记录数量") - total: Optional[StrictInt] = Field(default=None, description="总记录数,符合查询条件的配置项总数量") - content: Optional[List[OpenItemDTO]] = Field(default=None, description="当前页的配置项列表,包含具体的配置项数据") - __properties: ClassVar[List[str]] = ["page", "size", "total", "content"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenPageDTOOpenItemDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in content (list) - _items = [] - if self.content: - for _item_content in self.content: - if _item_content: - _items.append(_item_content.to_dict()) - _dict['content'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenPageDTOOpenItemDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "page": obj.get("page"), - "size": obj.get("size"), - "total": obj.get("total"), - "content": [OpenItemDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_release_dto.py b/python/apollo_openapi/models/open_release_dto.py deleted file mode 100644 index f4184972..00000000 --- a/python/apollo_openapi/models/open_release_dto.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.map_string import MapString -from typing import Optional, Set -from typing_extensions import Self - -class OpenReleaseDTO(BaseModel): - """ - Apollo发布信息数据传输对象,表示一次配置发布的完整信息 - """ # noqa: E501 - data_change_created_by: Optional[StrictStr] = Field(default=None, description="发布创建者用户名,记录是谁创建了这次发布", alias="dataChangeCreatedBy") - data_change_last_modified_by: Optional[StrictStr] = Field(default=None, description="发布最后修改者用户名,记录最后一次修改发布信息的用户", alias="dataChangeLastModifiedBy") - data_change_created_time: Optional[StrictStr] = Field(default=None, description="发布创建时间,ISO 8601格式的时间戳", alias="dataChangeCreatedTime") - data_change_last_modified_time: Optional[StrictStr] = Field(default=None, description="发布最后修改时间,ISO 8601格式的时间戳", alias="dataChangeLastModifiedTime") - id: Optional[StrictInt] = Field(default=None, description="发布记录的唯一标识符,系统自动生成") - app_id: Optional[StrictStr] = Field(default=None, description="所属应用的唯一标识符", alias="appId") - cluster_name: Optional[StrictStr] = Field(default=None, description="所属集群的名称", alias="clusterName") - namespace_name: Optional[StrictStr] = Field(default=None, description="所属命名空间的名称", alias="namespaceName") - name: Optional[StrictStr] = Field(default=None, description="发布名称,用于标识这次发布的版本或描述") - configurations: Optional[MapString] = None - comment: Optional[StrictStr] = Field(default=None, description="发布备注,描述本次发布的变更内容和目的") - __properties: ClassVar[List[str]] = ["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "id", "appId", "clusterName", "namespaceName", "name", "configurations", "comment"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenReleaseDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of configurations - if self.configurations: - _dict['configurations'] = self.configurations.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenReleaseDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dataChangeCreatedBy": obj.get("dataChangeCreatedBy"), - "dataChangeLastModifiedBy": obj.get("dataChangeLastModifiedBy"), - "dataChangeCreatedTime": obj.get("dataChangeCreatedTime"), - "dataChangeLastModifiedTime": obj.get("dataChangeLastModifiedTime"), - "id": obj.get("id"), - "appId": obj.get("appId"), - "clusterName": obj.get("clusterName"), - "namespaceName": obj.get("namespaceName"), - "name": obj.get("name"), - "configurations": MapString.from_dict(obj["configurations"]) if obj.get("configurations") is not None else None, - "comment": obj.get("comment") - }) - return _obj - - diff --git a/python/apollo_openapi/models/openapi_v1_apps_get401_response.py b/python/apollo_openapi/models/openapi_v1_apps_get401_response.py deleted file mode 100644 index da62fc91..00000000 --- a/python/apollo_openapi/models/openapi_v1_apps_get401_response.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class OpenapiV1AppsGet401Response(BaseModel): - """ - OpenapiV1AppsGet401Response - """ # noqa: E501 - message: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["message"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenapiV1AppsGet401Response from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenapiV1AppsGet401Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "message": obj.get("message") - }) - return _obj - - diff --git a/python/apollo_openapi/models/openapi_v1_apps_post400_response.py b/python/apollo_openapi/models/openapi_v1_apps_post400_response.py deleted file mode 100644 index 34142276..00000000 --- a/python/apollo_openapi/models/openapi_v1_apps_post400_response.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class OpenapiV1AppsPost400Response(BaseModel): - """ - OpenapiV1AppsPost400Response - """ # noqa: E501 - message: Optional[StrictStr] = None - exception: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["message", "exception"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenapiV1AppsPost400Response from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenapiV1AppsPost400Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "message": obj.get("message"), - "exception": obj.get("exception") - }) - return _obj - - diff --git a/python/apollo_openapi/models/openapi_v1_apps_post_request.py b/python/apollo_openapi/models/openapi_v1_apps_post_request.py deleted file mode 100644 index 54b50b4f..00000000 --- a/python/apollo_openapi/models/openapi_v1_apps_post_request.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List -from apollo_openapi.models.open_app_dto import OpenAppDTO -from typing import Optional, Set -from typing_extensions import Self - -class OpenapiV1AppsPostRequest(BaseModel): - """ - - """ # noqa: E501 - app: OpenAppDTO - assign_app_role_to_self: StrictBool = Field(description="是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限", alias="assignAppRoleToSelf") - admins: List[StrictStr] = Field(description="应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限") - __properties: ClassVar[List[str]] = ["assignAppRoleToSelf", "admins", "app"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenapiV1AppsPostRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of app - if self.app: - _dict['app'] = self.app.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenapiV1AppsPostRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "assignAppRoleToSelf": obj.get("assignAppRoleToSelf"), - "admins": obj.get("admins"), - "app": OpenAppDTO.from_dict(obj["app"]) if obj.get("app") is not None else None - }) - return _obj - - diff --git a/python/apollo_openapi/models/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response.py b/python/apollo_openapi/models/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response.py deleted file mode 100644 index 44898fd5..00000000 --- a/python/apollo_openapi/models/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response(BaseModel): - """ - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - """ # noqa: E501 - valid: Optional[StrictBool] = None - message: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["valid", "message"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "valid": obj.get("valid"), - "message": obj.get("message") - }) - return _obj - - diff --git a/python/apollo_openapi/models/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response.py b/python/apollo_openapi/models/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response.py deleted file mode 100644 index d7c0b8cd..00000000 --- a/python/apollo_openapi/models/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response(BaseModel): - """ - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - """ # noqa: E501 - valid: Optional[StrictBool] = None - message: Optional[StrictStr] = None - errors: Optional[List[StrictStr]] = None - __properties: ClassVar[List[str]] = ["valid", "message", "errors"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "valid": obj.get("valid"), - "message": obj.get("message"), - "errors": obj.get("errors") - }) - return _obj - - diff --git a/python/apollo_openapi/models/openapi_v1_envs_env_releases_compare_get200_response.py b/python/apollo_openapi/models/openapi_v1_envs_env_releases_compare_get200_response.py deleted file mode 100644 index bb4936f3..00000000 --- a/python/apollo_openapi/models/openapi_v1_envs_env_releases_compare_get200_response.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.change import Change -from typing import Optional, Set -from typing_extensions import Self - -class OpenapiV1EnvsEnvReleasesCompareGet200Response(BaseModel): - """ - OpenapiV1EnvsEnvReleasesCompareGet200Response - """ # noqa: E501 - changes: Optional[List[Change]] = None - __properties: ClassVar[List[str]] = ["changes"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenapiV1EnvsEnvReleasesCompareGet200Response from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in changes (list) - _items = [] - if self.changes: - for _item_changes in self.changes: - if _item_changes: - _items.append(_item_changes.to_dict()) - _dict['changes'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenapiV1EnvsEnvReleasesCompareGet200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "changes": [Change.from_dict(_item) for _item in obj["changes"]] if obj.get("changes") is not None else None - }) - return _obj - - diff --git a/python/apollo_openapi/models/release_dto.py b/python/apollo_openapi/models/release_dto.py deleted file mode 100644 index 1987e751..00000000 --- a/python/apollo_openapi/models/release_dto.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ReleaseDTO(BaseModel): - """ - ReleaseDTO - """ # noqa: E501 - data_change_created_by: Optional[StrictStr] = Field(default=None, alias="dataChangeCreatedBy") - data_change_last_modified_by: Optional[StrictStr] = Field(default=None, alias="dataChangeLastModifiedBy") - data_change_created_by_display_name: Optional[StrictStr] = Field(default=None, alias="dataChangeCreatedByDisplayName") - data_change_last_modified_by_display_name: Optional[StrictStr] = Field(default=None, alias="dataChangeLastModifiedByDisplayName") - data_change_created_time: Optional[StrictStr] = Field(default=None, alias="dataChangeCreatedTime") - data_change_last_modified_time: Optional[StrictStr] = Field(default=None, alias="dataChangeLastModifiedTime") - id: Optional[StrictInt] = None - release_key: Optional[StrictStr] = Field(default=None, alias="releaseKey") - name: Optional[StrictStr] = None - app_id: Optional[StrictStr] = Field(default=None, alias="appId") - cluster_name: Optional[StrictStr] = Field(default=None, alias="clusterName") - namespace_name: Optional[StrictStr] = Field(default=None, alias="namespaceName") - configurations: Optional[StrictStr] = None - comment: Optional[StrictStr] = None - is_abandoned: Optional[StrictBool] = Field(default=None, alias="isAbandoned") - __properties: ClassVar[List[str]] = ["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "id", "releaseKey", "name", "appId", "clusterName", "namespaceName", "configurations", "comment", "isAbandoned"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ReleaseDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ReleaseDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dataChangeCreatedBy": obj.get("dataChangeCreatedBy"), - "dataChangeLastModifiedBy": obj.get("dataChangeLastModifiedBy"), - "dataChangeCreatedByDisplayName": obj.get("dataChangeCreatedByDisplayName"), - "dataChangeLastModifiedByDisplayName": obj.get("dataChangeLastModifiedByDisplayName"), - "dataChangeCreatedTime": obj.get("dataChangeCreatedTime"), - "dataChangeLastModifiedTime": obj.get("dataChangeLastModifiedTime"), - "id": obj.get("id"), - "releaseKey": obj.get("releaseKey"), - "name": obj.get("name"), - "appId": obj.get("appId"), - "clusterName": obj.get("clusterName"), - "namespaceName": obj.get("namespaceName"), - "configurations": obj.get("configurations"), - "comment": obj.get("comment"), - "isAbandoned": obj.get("isAbandoned") - }) - return _obj - - diff --git a/python/apollo_openapi/paths/__init__.py b/python/apollo_openapi/paths/__init__.py new file mode 100644 index 00000000..57366bec --- /dev/null +++ b/python/apollo_openapi/paths/__init__.py @@ -0,0 +1,54 @@ +# 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.apis.path_to_api import path_to_api + +import enum + + +class PathValues(str, enum.Enum): + OPENAPI_V1_APPS = "/openapi/v1/apps" + OPENAPI_V1_APPS_AUTHORIZED = "/openapi/v1/apps/authorized" + 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_ENVS_ENV = "/openapi/v1/apps/envs/{env}" + OPENAPI_V1_APPS_APP_ID_MISS_ENVS = "/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}" + OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_BATCH_UPDATE = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate" + OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_ITEMS = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items" + OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_COMPARE = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare" + OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_SYNC = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync" + OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_VALIDATE = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate" + OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_REVERT = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert" + OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}" + OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS = "/openapi/v1/envs/{env}/apps/{appId}/clusters" + OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases" + OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_LATEST = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest" + OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_MERGE = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge" + OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_RELEASES = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases" + OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_GRAYDELRELEASES = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases" + OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID_ROLLBACK = "/openapi/v1/envs/{env}/releases/{releaseId}/rollback" + OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID = "/openapi/v1/envs/{env}/releases/{releaseId}" + 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_INT = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int" + OPENAPI_V1_APPS_APP_ID_APPNAMESPACES = "/openapi/v1/apps/{appId}/appnamespaces" + OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces" + OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}" + OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_LOCK = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock" + OPENAPI_V1_APPNAMESPACES = "/openapi/v1/appnamespaces" + OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_NAMESPACE_NAME = "/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}" + OPENAPI_V1_APPS_APP_ID_NAMESPACES_RELEASES_STATUS = "/openapi/v1/apps/{appId}/namespaces/releases/status" + OPENAPI_V1_ENVS_ENV_APPNAMESPACES_PUBLIC_NAMESPACE_NAME_INSTANCES = "/openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances" + OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_PUBLICASSOCIATION = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association" + OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_INTEGRITYCHECK = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check" + OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_LINKS = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links" + OPENAPI_V1_ORGANIZATIONS = "/openapi/v1/organizations" + OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches" + OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}" + OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_RULES = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules" diff --git a/python/apollo_openapi/paths/openapi_v1_appnamespaces/__init__.py b/python/apollo_openapi/paths/openapi_v1_appnamespaces/__init__.py new file mode 100644 index 00000000..decbb340 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_appnamespaces/__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_appnamespaces import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_APPNAMESPACES diff --git a/python/apollo_openapi/paths/openapi_v1_appnamespaces/get.py b/python/apollo_openapi/paths/openapi_v1_appnamespaces/get.py new file mode 100644 index 00000000..dcd2a9c1 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_appnamespaces/get.py @@ -0,0 +1,321 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_app_namespace_dto import OpenAppNamespaceDTO + +from . import path + +# Query params +PublicOnlySchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'publicOnly': typing.Union[PublicOnlySchema, bool, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_public_only = api_client.QueryParameter( + name="publicOnly", + style=api_client.ParameterStyle.FORM, + schema=PublicOnlySchema, + required=True, + explode=True, +) +_auth = [ + 'ApiKeyAuth', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenAppNamespaceDTO']: + return OpenAppNamespaceDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenAppNamespaceDTO'], typing.List['OpenAppNamespaceDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenAppNamespaceDTO': + 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_app_namespaces_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_app_namespaces_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_app_namespaces_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_app_namespaces_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取所有公共AppNamespace (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in ( + request_query_public_only, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + 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 GetAppNamespaces(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_app_namespaces( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_app_namespaces( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_app_namespaces( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_app_namespaces( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_app_namespaces_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + 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(), + 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(), + 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(), + 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(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_app_namespaces_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_appnamespaces/get.pyi b/python/apollo_openapi/paths/openapi_v1_appnamespaces/get.pyi new file mode 100644 index 00000000..c06b1af3 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_appnamespaces/get.pyi @@ -0,0 +1,313 @@ +# 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_app_namespace_dto import OpenAppNamespaceDTO + +# Query params +PublicOnlySchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'publicOnly': typing.Union[PublicOnlySchema, bool, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_public_only = api_client.QueryParameter( + name="publicOnly", + style=api_client.ParameterStyle.FORM, + schema=PublicOnlySchema, + required=True, + explode=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenAppNamespaceDTO']: + return OpenAppNamespaceDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenAppNamespaceDTO'], typing.List['OpenAppNamespaceDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenAppNamespaceDTO': + 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_app_namespaces_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_app_namespaces_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_app_namespaces_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_app_namespaces_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取所有公共AppNamespace (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in ( + request_query_public_only, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + 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 GetAppNamespaces(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_app_namespaces( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_app_namespaces( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_app_namespaces( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_app_namespaces( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_app_namespaces_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + 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(), + 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(), + 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(), + 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(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_app_namespaces_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps/__init__.py new file mode 100644 index 00000000..42a3c5fd --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from apollo_openapi.paths.openapi_v1_apps import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_APPS diff --git a/python/apollo_openapi/paths/openapi_v1_apps/get.py b/python/apollo_openapi/paths/openapi_v1_apps/get.py new file mode 100644 index 00000000..46598c11 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps/get.py @@ -0,0 +1,377 @@ +# 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_app_dto import OpenAppDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +from . import path + +# Query params +AppIdsSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'appIds': typing.Union[AppIdsSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_app_ids = api_client.QueryParameter( + name="appIds", + style=api_client.ParameterStyle.FORM, + schema=AppIdsSchema, + explode=True, +) +_auth = [ + 'ApiKeyAuth', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenAppDTO']: + return OpenAppDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenAppDTO'], typing.List['OpenAppDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenAppDTO': + 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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor401(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor401ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_401 = api_client.OpenApiResponse( + response_cls=ApiResponseFor401, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor401ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '401': _response_for_401, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _find_apps_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _find_apps_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _find_apps_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _find_apps_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 查找应用 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in ( + request_query_app_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 FindApps(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def find_apps( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def find_apps( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def find_apps( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def find_apps( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_apps_oapg( + query_params=query_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(), + 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(), + 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(), + 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(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_apps_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps/get.pyi new file mode 100644 index 00000000..8d493b7a --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps/get.pyi @@ -0,0 +1,368 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_app_dto import OpenAppDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +# Query params +AppIdsSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'appIds': typing.Union[AppIdsSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_app_ids = api_client.QueryParameter( + name="appIds", + style=api_client.ParameterStyle.FORM, + schema=AppIdsSchema, + explode=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenAppDTO']: + return OpenAppDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenAppDTO'], typing.List['OpenAppDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenAppDTO': + 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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor401(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor401ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_401 = api_client.OpenApiResponse( + response_cls=ApiResponseFor401, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor401ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _find_apps_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _find_apps_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _find_apps_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _find_apps_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 查找应用 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in ( + request_query_app_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 FindApps(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def find_apps( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def find_apps( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def find_apps( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def find_apps( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_apps_oapg( + query_params=query_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(), + 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(), + 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(), + 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(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_apps_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps/post.py b/python/apollo_openapi/paths/openapi_v1_apps/post.py new file mode 100644 index 00000000..546e7f8f --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps/post.py @@ -0,0 +1,448 @@ +# 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.exception_response import ExceptionResponse +from apollo_openapi.model.open_create_app_dto import OpenCreateAppDTO + +from . import path + +# body param +SchemaForRequestBodyApplicationJson = OpenCreateAppDTO + + +request_body_open_create_app_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '400': _response_for_400, + '403': _response_for_403, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_app_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _create_app_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _create_app_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_app_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_app_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + 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, + ): + """ + 创建应用 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path.value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_open_create_app_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateApp(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_app( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def create_app( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def create_app( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_app( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_app( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_app_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_app_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps/post.pyi b/python/apollo_openapi/paths/openapi_v1_apps/post.pyi new file mode 100644 index 00000000..9e46fa33 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps/post.pyi @@ -0,0 +1,438 @@ +# 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.exception_response import ExceptionResponse +from apollo_openapi.model.open_create_app_dto import OpenCreateAppDTO + +# body param +SchemaForRequestBodyApplicationJson = OpenCreateAppDTO + + +request_body_open_create_app_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_app_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _create_app_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _create_app_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_app_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_app_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + 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, + ): + """ + 创建应用 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path.value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_open_create_app_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateApp(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_app( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def create_app( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def create_app( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_app( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_app( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_app_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_app_oapg( + body=body, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id/__init__.py new file mode 100644 index 00000000..d3b3e9fd --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from apollo_openapi.paths.openapi_v1_apps_app_id import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_APPS_APP_ID 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 new file mode 100644 index 00000000..54a5ac3e --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id/delete.py @@ -0,0 +1,499 @@ +# 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.exception_response import ExceptionResponse + +from . import path + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +_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, + ) + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '403': _response_for_403, + '404': _response_for_404, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _delete_app_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 _delete_app_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_app_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 _delete_app_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_app_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.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 DeleteApp(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_app( + 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 delete_app( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_app( + 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 delete_app( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_app_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + 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 delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_app_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id/delete.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id/delete.pyi new file mode 100644 index 00000000..866ae22f --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id/delete.pyi @@ -0,0 +1,489 @@ +# 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.exception_response import ExceptionResponse + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) + + +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, + ) + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _delete_app_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 _delete_app_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_app_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 _delete_app_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_app_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.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 DeleteApp(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_app( + 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 delete_app( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_app( + 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 delete_app( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_app_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + 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 delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_app_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id/get.py new file mode 100644 index 00000000..1dc407f8 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id/get.py @@ -0,0 +1,352 @@ +# 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_app_dto import OpenAppDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +from . import path + +# Path params +AppIdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = OpenAppDTO + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '404': _response_for_404, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_app_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_app_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_app_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_app_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取单个应用信息(new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetApp(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_app( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_app( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_app( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_app( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_app_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_app_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id/get.pyi new file mode 100644 index 00000000..0a12a816 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id/get.pyi @@ -0,0 +1,343 @@ +# 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_app_dto import OpenAppDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +# Path params +AppIdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = OpenAppDTO + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_app_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_app_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_app_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_app_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取单个应用信息(new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetApp(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_app( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_app( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_app( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_app( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_app_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_app_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id/put.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id/put.py new file mode 100644 index 00000000..076e94fb --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id/put.py @@ -0,0 +1,563 @@ +# 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_app_dto import OpenAppDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +from . import path + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = OpenAppDTO + + +request_body_open_app_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = OpenAppDTO + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '400': _response_for_400, + '403': _response_for_403, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _update_app_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _update_app_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _update_app_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_app_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _update_app_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + 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_app_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_open_app_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UpdateApp(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def update_app( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def update_app( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def update_app( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_app( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def update_app( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_app_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_app_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id/put.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id/put.pyi new file mode 100644 index 00000000..27944cb4 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id/put.pyi @@ -0,0 +1,553 @@ +# 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_app_dto import OpenAppDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = OpenAppDTO + + +request_body_open_app_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = OpenAppDTO + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _update_app_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _update_app_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _update_app_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_app_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _update_app_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + 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_app_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_open_app_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UpdateApp(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def update_app( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def update_app( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def update_app( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_app( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def update_app( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_app_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_app_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/__init__.py new file mode 100644 index 00000000..9479764c --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_APPS_APP_ID_APPNAMESPACES diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/get.py new file mode 100644 index 00000000..b375c007 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/get.py @@ -0,0 +1,320 @@ +# 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_app_namespace_dto import OpenAppNamespaceDTO + +from . import path + +# Path params +AppIdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenAppNamespaceDTO']: + return OpenAppNamespaceDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenAppNamespaceDTO'], typing.List['OpenAppNamespaceDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenAppNamespaceDTO': + 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_app_namespaces_by_app_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_app_namespaces_by_app_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_app_namespaces_by_app_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_app_namespaces_by_app_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取指定应用的AppNamespace (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetAppNamespacesByApp(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_app_namespaces_by_app( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_app_namespaces_by_app( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_app_namespaces_by_app( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_app_namespaces_by_app( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_app_namespaces_by_app_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_app_namespaces_by_app_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/get.pyi new file mode 100644 index 00000000..1f53f824 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/get.pyi @@ -0,0 +1,312 @@ +# 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_app_namespace_dto import OpenAppNamespaceDTO + +# Path params +AppIdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenAppNamespaceDTO']: + return OpenAppNamespaceDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenAppNamespaceDTO'], typing.List['OpenAppNamespaceDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenAppNamespaceDTO': + 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_app_namespaces_by_app_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_app_namespaces_by_app_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_app_namespaces_by_app_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_app_namespaces_by_app_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取指定应用的AppNamespace (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetAppNamespacesByApp(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_app_namespaces_by_app( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_app_namespaces_by_app( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_app_namespaces_by_app( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_app_namespaces_by_app( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_app_namespaces_by_app_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_app_namespaces_by_app_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/post.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/post.py new file mode 100644 index 00000000..b13cae7c --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/post.py @@ -0,0 +1,505 @@ +# 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_app_namespace_dto import OpenAppNamespaceDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +from . import path + +# Path params +AppIdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = OpenAppNamespaceDTO + + +request_body_open_app_namespace_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = OpenAppNamespaceDTO + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '400': _response_for_400, + '403': _response_for_403, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_namespace_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _create_namespace_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _create_namespace_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_namespace_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_namespace_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 创建AppNamespace (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_open_app_namespace_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateNamespace(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_namespace( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def create_namespace( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def create_namespace( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_namespace( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_namespace( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_namespace_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_namespace_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/post.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/post.pyi new file mode 100644 index 00000000..de22e8d7 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/post.pyi @@ -0,0 +1,495 @@ +# 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_app_namespace_dto import OpenAppNamespaceDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +# Path params +AppIdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = OpenAppNamespaceDTO + + +request_body_open_app_namespace_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = OpenAppNamespaceDTO + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_namespace_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _create_namespace_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _create_namespace_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_namespace_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_namespace_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 创建AppNamespace (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_open_app_namespace_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateNamespace(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_namespace( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def create_namespace( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def create_namespace( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_namespace( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_namespace( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_namespace_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_namespace_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/__init__.py new file mode 100644 index 00000000..b4324118 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces_namespace_name import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_NAMESPACE_NAME 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 new file mode 100644 index 00000000..fc616c6b --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/delete.py @@ -0,0 +1,394 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from . import path + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.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, + ) + + +@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 _delete_app_namespace_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _delete_app_namespace_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_app_namespace_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _delete_app_namespace_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 删除AppNamespace (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.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 DeleteAppNamespace(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_app_namespace( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def delete_app_namespace( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_app_namespace( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_app_namespace( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_app_namespace_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + 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 delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_app_namespace_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/delete.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/delete.pyi new file mode 100644 index 00000000..e6444f46 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/delete.pyi @@ -0,0 +1,386 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.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, + ) + + +@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 _delete_app_namespace_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _delete_app_namespace_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_app_namespace_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _delete_app_namespace_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 删除AppNamespace (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.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 DeleteAppNamespace(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_app_namespace( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def delete_app_namespace( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_app_namespace( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_app_namespace( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_app_namespace_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + 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 delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_app_namespace_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/get.py new file mode 100644 index 00000000..4ddc16c8 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/get.py @@ -0,0 +1,304 @@ +# 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_app_namespace_dto import OpenAppNamespaceDTO + +from . import path + +# Path params +AppIdSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = OpenAppNamespaceDTO + + +@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_app_namespace_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_app_namespace_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_app_namespace_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_app_namespace_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取指定的AppNamespace (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetAppNamespace(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_app_namespace( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_app_namespace( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_app_namespace( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_app_namespace( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_app_namespace_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_app_namespace_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/get.pyi new file mode 100644 index 00000000..892818fd --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/get.pyi @@ -0,0 +1,296 @@ +# 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_app_namespace_dto import OpenAppNamespaceDTO + +# Path params +AppIdSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = OpenAppNamespaceDTO + + +@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_app_namespace_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_app_namespace_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_app_namespace_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_app_namespace_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取指定的AppNamespace (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetAppNamespace(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_app_namespace( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_app_namespace( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_app_namespace( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_app_namespace( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_app_namespace_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_app_namespace_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envclusters/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envclusters/__init__.py new file mode 100644 index 00000000..b4da727a --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envclusters/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from apollo_openapi.paths.openapi_v1_apps_app_id_envclusters import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVCLUSTERS 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 new file mode 100644 index 00000000..de297975 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envclusters/get.py @@ -0,0 +1,377 @@ +# 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_env_cluster_dto import OpenEnvClusterDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +from . import path + +# Path params +AppIdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenEnvClusterDTO']: + return OpenEnvClusterDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenEnvClusterDTO'], typing.List['OpenEnvClusterDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenEnvClusterDTO': + 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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '404': _response_for_404, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_env_cluster_info_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_env_cluster_info_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_env_cluster_info_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_env_cluster_info_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取应用的环境集群信息 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetEnvClusterInfo(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_env_cluster_info( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_env_cluster_info( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_env_cluster_info( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_env_cluster_info( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_env_cluster_info_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_env_cluster_info_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envclusters/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envclusters/get.pyi new file mode 100644 index 00000000..5feec3b1 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envclusters/get.pyi @@ -0,0 +1,368 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_env_cluster_dto import OpenEnvClusterDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +# Path params +AppIdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenEnvClusterDTO']: + return OpenEnvClusterDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenEnvClusterDTO'], typing.List['OpenEnvClusterDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenEnvClusterDTO': + 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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_env_cluster_info_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_env_cluster_info_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_env_cluster_info_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_env_cluster_info_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取应用的环境集群信息 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetEnvClusterInfo(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_env_cluster_info( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_env_cluster_info( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_env_cluster_info( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_env_cluster_info( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_env_cluster_info_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_env_cluster_info_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/__init__.py new file mode 100644 index 00000000..17947d85 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_INTEGRITYCHECK diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/get.py new file mode 100644 index 00000000..8d9ef81f --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/get.py @@ -0,0 +1,333 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from . import path + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _check_namespace_integrity_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _check_namespace_integrity_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _check_namespace_integrity_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _check_namespace_integrity_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 检查缺失的Namespace (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _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 CheckNamespaceIntegrity(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def check_namespace_integrity( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def check_namespace_integrity( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def check_namespace_integrity( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def check_namespace_integrity( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._check_namespace_integrity_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._check_namespace_integrity_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/get.pyi new file mode 100644 index 00000000..ff69c770 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/get.pyi @@ -0,0 +1,325 @@ +# 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 + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _check_namespace_integrity_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _check_namespace_integrity_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _check_namespace_integrity_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _check_namespace_integrity_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 检查缺失的Namespace (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _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 CheckNamespaceIntegrity(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def check_namespace_integrity( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def check_namespace_integrity( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def check_namespace_integrity( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def check_namespace_integrity( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._check_namespace_integrity_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._check_namespace_integrity_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/__init__.py new file mode 100644 index 00000000..0f923bc5 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_LINKS 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 new file mode 100644 index 00000000..7d3a9277 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/delete.py @@ -0,0 +1,412 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from . import path + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +_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, + ) + + +@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 _delete_namespace_links_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 _delete_namespace_links_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_namespace_links_oapg( + 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 _delete_namespace_links_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 删除关联的Namespace (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.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 DeleteNamespaceLinks(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_namespace_links( + 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 delete_namespace_links( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_namespace_links( + 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 delete_namespace_links( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_namespace_links_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + 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 delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_namespace_links_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/delete.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/delete.pyi new file mode 100644 index 00000000..1039f763 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/delete.pyi @@ -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 + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + 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, + ) + + +@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 _delete_namespace_links_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 _delete_namespace_links_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_namespace_links_oapg( + 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 _delete_namespace_links_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 删除关联的Namespace (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.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 DeleteNamespaceLinks(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_namespace_links( + 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 delete_namespace_links( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_namespace_links( + 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 delete_namespace_links( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_namespace_links_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + 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 delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_namespace_links_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/__init__.py new file mode 100644 index 00000000..dc180fdc --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_PUBLICASSOCIATION diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/get.py new file mode 100644 index 00000000..03dcbe1a --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/get.py @@ -0,0 +1,322 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO + +from . import path + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = OpenNamespaceDTO + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_public_namespace_association_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_public_namespace_association_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_public_namespace_association_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_public_namespace_association_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取关联的公共Namespace (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _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 GetPublicNamespaceAssociation(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_public_namespace_association( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_public_namespace_association( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_public_namespace_association( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_public_namespace_association( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_public_namespace_association_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_public_namespace_association_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/get.pyi new file mode 100644 index 00000000..941fe9a1 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/get.pyi @@ -0,0 +1,314 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = OpenNamespaceDTO + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_public_namespace_association_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_public_namespace_association_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_public_namespace_association_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_public_namespace_association_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取关联的公共Namespace (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _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 GetPublicNamespaceAssociation(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_public_namespace_association( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_public_namespace_association( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_public_namespace_association( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_public_namespace_association( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_public_namespace_association_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_public_namespace_association_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/__init__.py new file mode 100644 index 00000000..d5ab9b7c --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from apollo_openapi.paths.openapi_v1_apps_app_id_miss_envs import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_APPS_APP_ID_MISS_ENVS 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 new file mode 100644 index 00000000..dc875899 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/get.py @@ -0,0 +1,352 @@ +# 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.exception_response import ExceptionResponse +from apollo_openapi.model.multi_response_entity import MultiResponseEntity + +from . import path + +# Path params +AppIdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = MultiResponseEntity + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '404': _response_for_404, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _find_miss_envs_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _find_miss_envs_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _find_miss_envs_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _find_miss_envs_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 查找缺失的环境(new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class FindMissEnvs(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def find_miss_envs( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def find_miss_envs( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def find_miss_envs( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def find_miss_envs( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_miss_envs_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_miss_envs_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/get.pyi new file mode 100644 index 00000000..a31a5b03 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/get.pyi @@ -0,0 +1,343 @@ +# 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.exception_response import ExceptionResponse +from apollo_openapi.model.multi_response_entity import MultiResponseEntity + +# Path params +AppIdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = MultiResponseEntity + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _find_miss_envs_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _find_miss_envs_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _find_miss_envs_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _find_miss_envs_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 查找缺失的环境(new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class FindMissEnvs(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def find_miss_envs( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def find_miss_envs( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def find_miss_envs( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def find_miss_envs( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_miss_envs_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_miss_envs_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_releases_status/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_releases_status/__init__.py new file mode 100644 index 00000000..2b340346 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_releases_status/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from apollo_openapi.paths.openapi_v1_apps_app_id_namespaces_releases_status import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_APPS_APP_ID_NAMESPACES_RELEASES_STATUS diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_releases_status/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_releases_status/get.py new file mode 100644 index 00000000..c3f559a2 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_releases_status/get.py @@ -0,0 +1,295 @@ +# 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.string_to_string_bool_map import StringToStringBoolMap + +from . import path + +# Path params +AppIdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = StringToStringBoolMap + + +@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_namespaces_release_status_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_namespaces_release_status_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_namespaces_release_status_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_namespaces_release_status_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取应用下所有Namespace的发布状态 (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetNamespacesReleaseStatus(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_namespaces_release_status( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_namespaces_release_status( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_namespaces_release_status( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_namespaces_release_status( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_namespaces_release_status_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_namespaces_release_status_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_releases_status/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_releases_status/get.pyi new file mode 100644 index 00000000..ce916f2b --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_releases_status/get.pyi @@ -0,0 +1,287 @@ +# 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.string_to_string_bool_map import StringToStringBoolMap + +# Path params +AppIdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = StringToStringBoolMap + + +@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_namespaces_release_status_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_namespaces_release_status_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_namespaces_release_status_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_namespaces_release_status_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取应用下所有Namespace的发布状态 (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetNamespacesReleaseStatus(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_namespaces_release_status( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_namespaces_release_status( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_namespaces_release_status( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_namespaces_release_status( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_namespaces_release_status_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_namespaces_release_status_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_navtree/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_navtree/__init__.py new file mode 100644 index 00000000..ef8dd9fc --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_navtree/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from apollo_openapi.paths.openapi_v1_apps_app_id_navtree import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_APPS_APP_ID_NAVTREE 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_navtree/get.py new file mode 100644 index 00000000..d3eaef0c --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_navtree/get.py @@ -0,0 +1,295 @@ +# 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.multi_response_entity import MultiResponseEntity + +from . import path + +# Path params +AppIdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = MultiResponseEntity + + +@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_app_nav_tree_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_app_nav_tree_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_app_nav_tree_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_app_nav_tree_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取应用导航树(new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetAppNavTree(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_app_nav_tree( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_app_nav_tree( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_app_nav_tree( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_app_nav_tree( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_app_nav_tree_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_app_nav_tree_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_navtree/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_navtree/get.pyi new file mode 100644 index 00000000..a0cb92c7 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_navtree/get.pyi @@ -0,0 +1,287 @@ +# 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.multi_response_entity import MultiResponseEntity + +# Path params +AppIdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = MultiResponseEntity + + +@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_app_nav_tree_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_app_nav_tree_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_app_nav_tree_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_app_nav_tree_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取应用导航树(new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetAppNavTree(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_app_nav_tree( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_app_nav_tree( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_app_nav_tree( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_app_nav_tree( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_app_nav_tree_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_app_nav_tree_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_authorized/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_authorized/__init__.py new file mode 100644 index 00000000..5dec5044 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_authorized/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from apollo_openapi.paths.openapi_v1_apps_authorized import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_APPS_AUTHORIZED diff --git a/python/apollo_openapi/paths/openapi_v1_apps_authorized/get.py b/python/apollo_openapi/paths/openapi_v1_apps_authorized/get.py new file mode 100644 index 00000000..0268279a --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_authorized/get.py @@ -0,0 +1,323 @@ +# 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_app_dto import OpenAppDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +from . import path + +_auth = [ + 'ApiKeyAuth', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenAppDTO']: + return OpenAppDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenAppDTO'], typing.List['OpenAppDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenAppDTO': + 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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor401(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor401ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_401 = api_client.OpenApiResponse( + response_cls=ApiResponseFor401, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor401ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '401': _response_for_401, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _find_apps_authorized_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _find_apps_authorized_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _find_apps_authorized_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _find_apps_authorized_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取当前Consumer授权的应用列表 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path.value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class FindAppsAuthorized(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def find_apps_authorized( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def find_apps_authorized( + self, + skip_deserialization: typing_extensions.Literal[True], + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def find_apps_authorized( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def find_apps_authorized( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_apps_authorized_oapg( + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_apps_authorized_oapg( + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_authorized/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_authorized/get.pyi new file mode 100644 index 00000000..2e9e9ad2 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_authorized/get.pyi @@ -0,0 +1,314 @@ +# 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_app_dto import OpenAppDTO +from apollo_openapi.model.exception_response import ExceptionResponse + + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenAppDTO']: + return OpenAppDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenAppDTO'], typing.List['OpenAppDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenAppDTO': + 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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor401(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor401ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_401 = api_client.OpenApiResponse( + response_cls=ApiResponseFor401, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor401ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _find_apps_authorized_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _find_apps_authorized_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _find_apps_authorized_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _find_apps_authorized_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取当前Consumer授权的应用列表 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path.value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class FindAppsAuthorized(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def find_apps_authorized( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def find_apps_authorized( + self, + skip_deserialization: typing_extensions.Literal[True], + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def find_apps_authorized( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def find_apps_authorized( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_apps_authorized_oapg( + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_apps_authorized_oapg( + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_by_self/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_by_self/__init__.py new file mode 100644 index 00000000..3f1e90ca --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_by_self/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from apollo_openapi.paths.openapi_v1_apps_by_self import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_APPS_BYSELF 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 new file mode 100644 index 00000000..c9eb89c0 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_by_self/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_app_dto import OpenAppDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +from . import path + +# Query params + + +class PageSchema( + schemas.IntSchema +): + + + class MetaOapg: + inclusive_minimum = 0 + + +class SizeSchema( + schemas.IntSchema +): + + + class MetaOapg: + inclusive_minimum = 0 +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'page': typing.Union[PageSchema, decimal.Decimal, int, ], + 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +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, +) +_auth = [ + 'ApiKeyAuth', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenAppDTO']: + return OpenAppDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenAppDTO'], typing.List['OpenAppDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenAppDTO': + 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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor401(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor401ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_401 = api_client.OpenApiResponse( + response_cls=ApiResponseFor401, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor401ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '401': _response_for_401, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_apps_by_self_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_apps_by_self_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_apps_by_self_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_apps_by_self_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取当前Consumer的应用列表(分页)(new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in ( + request_query_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 GetAppsBySelf(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_apps_by_self( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_apps_by_self( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_apps_by_self( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_apps_by_self( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_apps_by_self_oapg( + query_params=query_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(), + 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(), + 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(), + 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(), + 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_apps_by_self_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_by_self/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_by_self/get.pyi new file mode 100644 index 00000000..845515d7 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_by_self/get.pyi @@ -0,0 +1,389 @@ +# 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_app_dto import OpenAppDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +# Query params + + +class PageSchema( + schemas.IntSchema +): + pass + + +class SizeSchema( + schemas.IntSchema +): + pass +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'page': typing.Union[PageSchema, decimal.Decimal, int, ], + 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +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, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenAppDTO']: + return OpenAppDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenAppDTO'], typing.List['OpenAppDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenAppDTO': + 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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor401(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor401ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_401 = api_client.OpenApiResponse( + response_cls=ApiResponseFor401, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor401ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_apps_by_self_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_apps_by_self_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_apps_by_self_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_apps_by_self_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取当前Consumer的应用列表(分页)(new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in ( + request_query_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 GetAppsBySelf(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_apps_by_self( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_apps_by_self( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_apps_by_self( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_apps_by_self( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_apps_by_self_oapg( + query_params=query_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(), + 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(), + 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(), + 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(), + 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_apps_by_self_oapg( + query_params=query_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_envs_env/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_envs_env/__init__.py new file mode 100644 index 00000000..59a0afa2 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_envs_env/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from apollo_openapi.paths.openapi_v1_apps_envs_env import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_APPS_ENVS_ENV 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 new file mode 100644 index 00000000..68a70e02 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_envs_env/post.py @@ -0,0 +1,600 @@ +# 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_app_dto import OpenAppDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +from . import path + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + 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, +) +# body param +SchemaForRequestBodyApplicationJson = OpenAppDTO + + +request_body_open_app_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_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, + ) + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '400': _response_for_400, + '403': _response_for_403, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_app_in_env_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _create_app_in_env_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _create_app_in_env_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_app_in_env_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_app_in_env_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + 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_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_open_app_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateAppInEnv(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_app_in_env( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def create_app_in_env( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def create_app_in_env( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_app_in_env( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_app_in_env( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_app_in_env_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_app_in_env_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_envs_env/post.pyi b/python/apollo_openapi/paths/openapi_v1_apps_envs_env/post.pyi new file mode 100644 index 00000000..857dfd10 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_envs_env/post.pyi @@ -0,0 +1,590 @@ +# 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_app_dto import OpenAppDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + 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, +) +# body param +SchemaForRequestBodyApplicationJson = OpenAppDTO + + +request_body_open_app_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + 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, + ) + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_app_in_env_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _create_app_in_env_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _create_app_in_env_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_app_in_env_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_app_in_env_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + 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_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_open_app_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateAppInEnv(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_app_in_env( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def create_app_in_env( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def create_app_in_env( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_app_in_env( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_app_in_env( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_app_in_env_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_app_in_env_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/__init__.py new file mode 100644 index 00000000..a550ce3e --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/__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_appnamespaces_public_namespace_name_instances import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_APPNAMESPACES_PUBLIC_NAMESPACE_NAME_INSTANCES diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/get.py new file mode 100644 index 00000000..faeefe4a --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/get.py @@ -0,0 +1,394 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO + +from . import path + +# Query params +PageSchema = schemas.IntSchema +SizeSchema = schemas.IntSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'page': typing.Union[PageSchema, decimal.Decimal, int, ], + 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +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 +PublicNamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'env': typing.Union[EnvSchema, str, ], + 'publicNamespaceName': typing.Union[PublicNamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_public_namespace_name = api_client.PathParameter( + name="publicNamespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=PublicNamespaceNameSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenNamespaceDTO']: + return OpenNamespaceDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenNamespaceDTO'], typing.List['OpenNamespaceDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenNamespaceDTO': + 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_public_app_namespace_instances_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_public_app_namespace_instances_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_public_app_namespace_instances_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_public_app_namespace_instances_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, + ): + """ + 获取公共AppNamespace的所有实例 (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_env, + request_path_public_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_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 GetPublicAppNamespaceInstances(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_public_app_namespace_instances( + 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_public_app_namespace_instances( + 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_public_app_namespace_instances( + 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_public_app_namespace_instances( + 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_public_app_namespace_instances_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_public_app_namespace_instances_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_appnamespaces_public_namespace_name_instances/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/get.pyi new file mode 100644 index 00000000..d61e70f9 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/get.pyi @@ -0,0 +1,386 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO + +# Query params +PageSchema = schemas.IntSchema +SizeSchema = schemas.IntSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'page': typing.Union[PageSchema, decimal.Decimal, int, ], + 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +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 +PublicNamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'env': typing.Union[EnvSchema, str, ], + 'publicNamespaceName': typing.Union[PublicNamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_public_namespace_name = api_client.PathParameter( + name="publicNamespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=PublicNamespaceNameSchema, + required=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenNamespaceDTO']: + return OpenNamespaceDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenNamespaceDTO'], typing.List['OpenNamespaceDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenNamespaceDTO': + 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_public_app_namespace_instances_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_public_app_namespace_instances_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_public_app_namespace_instances_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_public_app_namespace_instances_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, + ): + """ + 获取公共AppNamespace的所有实例 (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_env, + request_path_public_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_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 GetPublicAppNamespaceInstances(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_public_app_namespace_instances( + 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_public_app_namespace_instances( + 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_public_app_namespace_instances( + 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_public_app_namespace_instances( + 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_public_app_namespace_instances_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_public_app_namespace_instances_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters/__init__.py new file mode 100644 index 00000000..228b0f06 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters/__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_apps_app_id_clusters import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS 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 new file mode 100644 index 00000000..67fbe324 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters/post.py @@ -0,0 +1,514 @@ +# 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_cluster_dto import OpenClusterDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +from . import path + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = OpenClusterDTO + + +request_body_open_cluster_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = OpenClusterDTO + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '400': _response_for_400, + '403': _response_for_403, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_cluster_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _create_cluster_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _create_cluster_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_cluster_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_cluster_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = 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, + ): + """ + 创建集群 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_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) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_open_cluster_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateCluster(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_cluster( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def create_cluster( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def create_cluster( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_cluster( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_cluster( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_cluster_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_cluster_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters/post.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters/post.pyi new file mode 100644 index 00000000..8f8661ac --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters/post.pyi @@ -0,0 +1,504 @@ +# 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_cluster_dto import OpenClusterDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = OpenClusterDTO + + +request_body_open_cluster_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = OpenClusterDTO + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_cluster_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _create_cluster_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _create_cluster_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_cluster_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_cluster_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = 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, + ): + """ + 创建集群 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_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) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_open_cluster_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateCluster(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_cluster( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def create_cluster( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def create_cluster( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_cluster( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_cluster( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_cluster_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_cluster_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/__init__.py new file mode 100644 index 00000000..4c2df02f --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/__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_apps_app_id_clusters_cluster_name import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME 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 new file mode 100644 index 00000000..ed36dc43 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/delete.py @@ -0,0 +1,573 @@ +# 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.exception_response import ExceptionResponse + +from . import path + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +EnvSchema = schemas.StrSchema +AppIdSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'env': typing.Union[EnvSchema, str, ], + 'appId': typing.Union[AppIdSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +_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, + ) + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '400': _response_for_400, + '403': _response_for_403, + '404': _response_for_404, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _delete_cluster_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 _delete_cluster_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_cluster_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 _delete_cluster_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 删除集群 (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_env, + request_path_app_id, + request_path_cluster_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.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 DeleteCluster(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_cluster( + 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 delete_cluster( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_cluster( + 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 delete_cluster( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_cluster_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + 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 delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_cluster_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/delete.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/delete.pyi new file mode 100644 index 00000000..3108827b --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/delete.pyi @@ -0,0 +1,562 @@ +# 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.exception_response import ExceptionResponse + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +EnvSchema = schemas.StrSchema +AppIdSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'env': typing.Union[EnvSchema, str, ], + 'appId': typing.Union[AppIdSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) + + +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, + ) + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _delete_cluster_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 _delete_cluster_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_cluster_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 _delete_cluster_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 删除集群 (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_env, + request_path_app_id, + request_path_cluster_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.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 DeleteCluster(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_cluster( + 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 delete_cluster( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_cluster( + 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 delete_cluster( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_cluster_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + 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 delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_cluster_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/get.py new file mode 100644 index 00000000..75ba0b77 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/get.py @@ -0,0 +1,370 @@ +# 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_cluster_dto import OpenClusterDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +from . import path + +# Path params +AppIdSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = OpenClusterDTO + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '404': _response_for_404, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_cluster_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_cluster_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_cluster_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_cluster_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取指定集群信息 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_cluster_name, + 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) + + _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 GetCluster(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_cluster( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_cluster( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_cluster( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_cluster( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_cluster_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_cluster_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_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 new file mode 100644 index 00000000..c95a54d6 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/get.pyi @@ -0,0 +1,361 @@ +# 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_cluster_dto import OpenClusterDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +# Path params +AppIdSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = OpenClusterDTO + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_cluster_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_cluster_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_cluster_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_cluster_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取指定集群信息 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_cluster_name, + 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) + + _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 GetCluster(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_cluster( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_cluster( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_cluster( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_cluster( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_cluster_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_cluster_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/__init__.py new file mode 100644 index 00000000..5267386a --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/get.py new file mode 100644 index 00000000..d602146b --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/get.py @@ -0,0 +1,393 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO + +from . import path + +# Query params +FillItemDetailSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'fillItemDetail': typing.Union[FillItemDetailSchema, bool, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_fill_item_detail = api_client.QueryParameter( + name="fillItemDetail", + style=api_client.ParameterStyle.FORM, + schema=FillItemDetailSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenNamespaceDTO']: + return OpenNamespaceDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenNamespaceDTO'], typing.List['OpenNamespaceDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenNamespaceDTO': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _find_namespaces_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _find_namespaces_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _find_namespaces_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _find_namespaces_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取指定集群下的所有Namespace (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_fill_item_detail, + ): + 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 FindNamespaces(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def find_namespaces( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def find_namespaces( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def find_namespaces( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def find_namespaces( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_namespaces_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_namespaces_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/get.pyi new file mode 100644 index 00000000..9084735e --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/get.pyi @@ -0,0 +1,385 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO + +# Query params +FillItemDetailSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'fillItemDetail': typing.Union[FillItemDetailSchema, bool, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_fill_item_detail = api_client.QueryParameter( + name="fillItemDetail", + style=api_client.ParameterStyle.FORM, + schema=FillItemDetailSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenNamespaceDTO']: + return OpenNamespaceDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenNamespaceDTO'], typing.List['OpenNamespaceDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenNamespaceDTO': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _find_namespaces_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _find_namespaces_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _find_namespaces_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _find_namespaces_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取指定集群下的所有Namespace (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_fill_item_detail, + ): + 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 FindNamespaces(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def find_namespaces( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def find_namespaces( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def find_namespaces( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def find_namespaces( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_namespaces_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_namespaces_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/__init__.py new file mode 100644 index 00000000..facabde4 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/__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_apps_app_id_clusters_cluster_name_namespaces_namespace_name import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/get.py new file mode 100644 index 00000000..68822be1 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/get.py @@ -0,0 +1,377 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO + +from . import path + +# Query params +FillItemDetailSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'fillItemDetail': typing.Union[FillItemDetailSchema, bool, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_fill_item_detail = api_client.QueryParameter( + name="fillItemDetail", + style=api_client.ParameterStyle.FORM, + schema=FillItemDetailSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = OpenNamespaceDTO + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _load_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 _load_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 _load_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 _load_namespace_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取指定的Namespace (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_fill_item_detail, + ): + 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 LoadNamespace(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def load_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 load_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 load_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 load_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._load_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._load_namespace_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/get.pyi new file mode 100644 index 00000000..09bc0b94 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/get.pyi @@ -0,0 +1,369 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO + +# Query params +FillItemDetailSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'fillItemDetail': typing.Union[FillItemDetailSchema, bool, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_fill_item_detail = api_client.QueryParameter( + name="fillItemDetail", + style=api_client.ParameterStyle.FORM, + schema=FillItemDetailSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = OpenNamespaceDTO + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _load_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 _load_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 _load_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 _load_namespace_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取指定的Namespace (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_fill_item_detail, + ): + 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 LoadNamespace(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def load_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 load_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 load_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 load_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._load_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._load_namespace_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/__init__.py new file mode 100644 index 00000000..dca847e6 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/__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_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES 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 new file mode 100644 index 00000000..d9678a73 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/get.py @@ -0,0 +1,379 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +from . import path + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = OpenNamespaceDTO + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '404': _response_for_404, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _find_branch_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _find_branch_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _find_branch_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _find_branch_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取命名空间分支信息 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _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 FindBranch(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def find_branch( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def find_branch( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def find_branch( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def find_branch( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_branch_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_branch_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_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 new file mode 100644 index 00000000..b6c3dc05 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/get.pyi @@ -0,0 +1,370 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = OpenNamespaceDTO + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _find_branch_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _find_branch_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _find_branch_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _find_branch_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取命名空间分支信息 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _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 FindBranch(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def find_branch( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def find_branch( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def find_branch( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def find_branch( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_branch_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_branch_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/post.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/post.py new file mode 100644 index 00000000..3722b973 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/post.py @@ -0,0 +1,377 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO + +from . import path + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = OpenNamespaceDTO + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_branch_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _create_branch_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_branch_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_branch_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 创建命名空间分支 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateBranch(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_branch( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def create_branch( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_branch( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_branch( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_branch_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_branch_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/post.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/post.pyi new file mode 100644 index 00000000..f5579e88 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/post.pyi @@ -0,0 +1,369 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = OpenNamespaceDTO + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_branch_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _create_branch_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_branch_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_branch_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 创建命名空间分支 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateBranch(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_branch( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def create_branch( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_branch( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_branch( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_branch_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_branch_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/__init__.py new file mode 100644 index 00000000..c76ff7bf --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/__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_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME 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 new file mode 100644 index 00000000..914d4aca --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/delete.py @@ -0,0 +1,421 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from . import path + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +EnvSchema = schemas.StrSchema +AppIdSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +BranchNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'env': typing.Union[EnvSchema, str, ], + 'appId': typing.Union[AppIdSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'branchName': typing.Union[BranchNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +request_path_branch_name = api_client.PathParameter( + name="branchName", + style=api_client.ParameterStyle.SIMPLE, + schema=BranchNameSchema, + required=True, +) +_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, + ) + + +@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 _delete_branch_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _delete_branch_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_branch_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _delete_branch_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 删除命名空间分支 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_env, + request_path_app_id, + request_path_cluster_name, + request_path_namespace_name, + request_path_branch_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.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 DeleteBranch(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_branch( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def delete_branch( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_branch( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_branch( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_branch_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + 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 delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_branch_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/delete.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/delete.pyi new file mode 100644 index 00000000..5a99fcdc --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/delete.pyi @@ -0,0 +1,413 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +EnvSchema = schemas.StrSchema +AppIdSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +BranchNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'env': typing.Union[EnvSchema, str, ], + 'appId': typing.Union[AppIdSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'branchName': typing.Union[BranchNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +request_path_branch_name = api_client.PathParameter( + name="branchName", + style=api_client.ParameterStyle.SIMPLE, + 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, + ) + + +@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 _delete_branch_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _delete_branch_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_branch_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _delete_branch_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 删除命名空间分支 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_env, + request_path_app_id, + request_path_cluster_name, + request_path_namespace_name, + request_path_branch_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.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 DeleteBranch(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_branch( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def delete_branch( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_branch( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_branch( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_branch_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + 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 delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_branch_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/patch.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/patch.py new file mode 100644 index 00000000..769d11e8 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/patch.py @@ -0,0 +1,497 @@ +# 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_release_dto import OpenReleaseDTO +from apollo_openapi.model.namespace_release_dto import NamespaceReleaseDTO + +from . import path + +# Query params +DeleteBranchSchema = schemas.BoolSchema +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'deleteBranch': typing.Union[DeleteBranchSchema, bool, ], + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_delete_branch = api_client.QueryParameter( + name="deleteBranch", + style=api_client.ParameterStyle.FORM, + schema=DeleteBranchSchema, + required=True, + explode=True, +) +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +EnvSchema = schemas.StrSchema +AppIdSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +BranchNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'env': typing.Union[EnvSchema, str, ], + 'appId': typing.Union[AppIdSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'branchName': typing.Union[BranchNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +request_path_branch_name = api_client.PathParameter( + name="branchName", + style=api_client.ParameterStyle.SIMPLE, + schema=BranchNameSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = NamespaceReleaseDTO + + +request_body_namespace_release_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = OpenReleaseDTO + + +@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 _merge_branch_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _merge_branch_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _merge_branch_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _merge_branch_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _merge_branch_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 合并分支到主分支 (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_env, + request_path_app_id, + request_path_cluster_name, + request_path_namespace_name, + request_path_branch_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_delete_branch, + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_namespace_release_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='patch'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class MergeBranch(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def merge_branch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def merge_branch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def merge_branch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def merge_branch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def merge_branch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._merge_branch_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpatch(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._merge_branch_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/patch.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/patch.pyi new file mode 100644 index 00000000..2aedba6f --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/patch.pyi @@ -0,0 +1,489 @@ +# 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_release_dto import OpenReleaseDTO +from apollo_openapi.model.namespace_release_dto import NamespaceReleaseDTO + +# Query params +DeleteBranchSchema = schemas.BoolSchema +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'deleteBranch': typing.Union[DeleteBranchSchema, bool, ], + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_delete_branch = api_client.QueryParameter( + name="deleteBranch", + style=api_client.ParameterStyle.FORM, + schema=DeleteBranchSchema, + required=True, + explode=True, +) +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +EnvSchema = schemas.StrSchema +AppIdSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +BranchNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'env': typing.Union[EnvSchema, str, ], + 'appId': typing.Union[AppIdSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'branchName': typing.Union[BranchNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +request_path_branch_name = api_client.PathParameter( + name="branchName", + style=api_client.ParameterStyle.SIMPLE, + schema=BranchNameSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = NamespaceReleaseDTO + + +request_body_namespace_release_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = OpenReleaseDTO + + +@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 _merge_branch_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _merge_branch_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _merge_branch_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _merge_branch_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _merge_branch_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 合并分支到主分支 (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_env, + request_path_app_id, + request_path_cluster_name, + request_path_namespace_name, + request_path_branch_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_delete_branch, + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_namespace_release_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='patch'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class MergeBranch(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def merge_branch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def merge_branch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def merge_branch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def merge_branch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def merge_branch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._merge_branch_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpatch(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def patch( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._merge_branch_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases/__init__.py new file mode 100644 index 00000000..53181b9b --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases/__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_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_GRAYDELRELEASES diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases/post.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases/post.py new file mode 100644 index 00000000..65d5205b --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases/post.py @@ -0,0 +1,429 @@ +# 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_release_dto import OpenReleaseDTO +from apollo_openapi.model.namespace_gray_del_release_dto import NamespaceGrayDelReleaseDTO + +from . import path + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +BranchNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'branchName': typing.Union[BranchNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +request_path_branch_name = api_client.PathParameter( + name="branchName", + style=api_client.ParameterStyle.SIMPLE, + schema=BranchNameSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = NamespaceGrayDelReleaseDTO + + +request_body_namespace_gray_del_release_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = OpenReleaseDTO + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_gray_del_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _create_gray_del_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _create_gray_del_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_gray_del_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_gray_del_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = 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, + ): + """ + 创建灰度删除发布 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + request_path_branch_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_namespace_gray_del_release_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateGrayDelRelease(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_gray_del_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def create_gray_del_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def create_gray_del_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_gray_del_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_gray_del_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_gray_del_release_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_gray_del_release_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases/post.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases/post.pyi new file mode 100644 index 00000000..0f3f2c4a --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases/post.pyi @@ -0,0 +1,421 @@ +# 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_release_dto import OpenReleaseDTO +from apollo_openapi.model.namespace_gray_del_release_dto import NamespaceGrayDelReleaseDTO + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +BranchNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'branchName': typing.Union[BranchNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +request_path_branch_name = api_client.PathParameter( + name="branchName", + style=api_client.ParameterStyle.SIMPLE, + schema=BranchNameSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = NamespaceGrayDelReleaseDTO + + +request_body_namespace_gray_del_release_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = OpenReleaseDTO + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_gray_del_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _create_gray_del_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _create_gray_del_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_gray_del_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_gray_del_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = 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, + ): + """ + 创建灰度删除发布 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + request_path_branch_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_namespace_gray_del_release_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateGrayDelRelease(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_gray_del_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def create_gray_del_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def create_gray_del_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_gray_del_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_gray_del_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_gray_del_release_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_gray_del_release_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items/__init__.py new file mode 100644 index 00000000..a5034e8a --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items/__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_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_ITEMS 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 new file mode 100644 index 00000000..f0d3ed57 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items/get.py @@ -0,0 +1,413 @@ +# 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_item_dto import OpenItemDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +from . import path + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +BranchNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'branchName': typing.Union[BranchNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +request_path_branch_name = api_client.PathParameter( + name="branchName", + style=api_client.ParameterStyle.SIMPLE, + schema=BranchNameSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenItemDTO']: + return OpenItemDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenItemDTO'], typing.List['OpenItemDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenItemDTO': + 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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '404': _response_for_404, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_branch_items_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_branch_items_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_branch_items_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_branch_items_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取分支下的配置项 (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + request_path_branch_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetBranchItems(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_branch_items( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_branch_items( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_branch_items( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_branch_items( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_branch_items_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_branch_items_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_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 new file mode 100644 index 00000000..abb3ea24 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items/get.pyi @@ -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_item_dto import OpenItemDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +BranchNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'branchName': typing.Union[BranchNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +request_path_branch_name = api_client.PathParameter( + name="branchName", + style=api_client.ParameterStyle.SIMPLE, + schema=BranchNameSchema, + required=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenItemDTO']: + return OpenItemDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenItemDTO'], typing.List['OpenItemDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenItemDTO': + 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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_branch_items_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_branch_items_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_branch_items_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_branch_items_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取分支下的配置项 (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + request_path_branch_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetBranchItems(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_branch_items( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_branch_items( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_branch_items( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_branch_items( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_branch_items_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_branch_items_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge/__init__.py new file mode 100644 index 00000000..271d5e9b --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge/__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_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_MERGE 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 new file mode 100644 index 00000000..02cac70c --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge/post.py @@ -0,0 +1,600 @@ +# 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_release_dto import OpenReleaseDTO +from apollo_openapi.model.namespace_release_dto import NamespaceReleaseDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +from . import path + +# Query params +DeleteBranchSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'deleteBranch': typing.Union[DeleteBranchSchema, bool, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_delete_branch = api_client.QueryParameter( + name="deleteBranch", + style=api_client.ParameterStyle.FORM, + schema=DeleteBranchSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +BranchNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'branchName': typing.Union[BranchNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +request_path_branch_name = api_client.PathParameter( + name="branchName", + style=api_client.ParameterStyle.SIMPLE, + schema=BranchNameSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = NamespaceReleaseDTO + + +request_body_namespace_release_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = OpenReleaseDTO + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '400': _response_for_400, + '403': _response_for_403, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _merge_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _merge_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _merge_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _merge_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _merge_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 合并分支 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + request_path_branch_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_delete_branch, + ): + 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) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_namespace_release_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class Merge(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def merge( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def merge( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def merge( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def merge( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def merge( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._merge_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._merge_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_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 new file mode 100644 index 00000000..6e62f372 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge/post.pyi @@ -0,0 +1,590 @@ +# 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_release_dto import OpenReleaseDTO +from apollo_openapi.model.namespace_release_dto import NamespaceReleaseDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +# Query params +DeleteBranchSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'deleteBranch': typing.Union[DeleteBranchSchema, bool, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_delete_branch = api_client.QueryParameter( + name="deleteBranch", + style=api_client.ParameterStyle.FORM, + schema=DeleteBranchSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +BranchNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'branchName': typing.Union[BranchNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +request_path_branch_name = api_client.PathParameter( + name="branchName", + style=api_client.ParameterStyle.SIMPLE, + schema=BranchNameSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = NamespaceReleaseDTO + + +request_body_namespace_release_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = OpenReleaseDTO + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _merge_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _merge_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _merge_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _merge_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _merge_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 合并分支 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + request_path_branch_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_delete_branch, + ): + 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) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_namespace_release_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class Merge(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def merge( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def merge( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def merge( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def merge( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def merge( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._merge_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._merge_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases/__init__.py new file mode 100644 index 00000000..2b996f0b --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases/__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_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_RELEASES diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases/post.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases/post.py new file mode 100644 index 00000000..2613dc55 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases/post.py @@ -0,0 +1,429 @@ +# 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_release_dto import OpenReleaseDTO +from apollo_openapi.model.namespace_release_dto import NamespaceReleaseDTO + +from . import path + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +BranchNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'branchName': typing.Union[BranchNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +request_path_branch_name = api_client.PathParameter( + name="branchName", + style=api_client.ParameterStyle.SIMPLE, + schema=BranchNameSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = NamespaceReleaseDTO + + +request_body_namespace_release_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = OpenReleaseDTO + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_gray_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _create_gray_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _create_gray_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_gray_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_gray_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = 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, + ): + """ + 创建灰度发布 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + request_path_branch_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_namespace_release_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateGrayRelease(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_gray_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def create_gray_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def create_gray_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_gray_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_gray_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_gray_release_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_gray_release_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases/post.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases/post.pyi new file mode 100644 index 00000000..1958542a --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases/post.pyi @@ -0,0 +1,421 @@ +# 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_release_dto import OpenReleaseDTO +from apollo_openapi.model.namespace_release_dto import NamespaceReleaseDTO + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +BranchNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'branchName': typing.Union[BranchNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +request_path_branch_name = api_client.PathParameter( + name="branchName", + style=api_client.ParameterStyle.SIMPLE, + schema=BranchNameSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = NamespaceReleaseDTO + + +request_body_namespace_release_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = OpenReleaseDTO + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_gray_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _create_gray_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _create_gray_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_gray_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_gray_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = 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, + ): + """ + 创建灰度发布 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + request_path_branch_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_namespace_release_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateGrayRelease(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_gray_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def create_gray_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def create_gray_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_gray_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_gray_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_gray_release_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_gray_release_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/__init__.py new file mode 100644 index 00000000..88c7513d --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/__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_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_RULES diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/get.py new file mode 100644 index 00000000..4daaf289 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/get.py @@ -0,0 +1,331 @@ +# 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_gray_release_rule_dto import OpenGrayReleaseRuleDTO + +from . import path + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +BranchNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'branchName': typing.Union[BranchNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +request_path_branch_name = api_client.PathParameter( + name="branchName", + style=api_client.ParameterStyle.SIMPLE, + schema=BranchNameSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = OpenGrayReleaseRuleDTO + + +@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_branch_gray_rules_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_branch_gray_rules_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_branch_gray_rules_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_branch_gray_rules_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取分支灰度发布规则 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + request_path_branch_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetBranchGrayRules(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_branch_gray_rules( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_branch_gray_rules( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_branch_gray_rules( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_branch_gray_rules( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_branch_gray_rules_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_branch_gray_rules_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/get.pyi new file mode 100644 index 00000000..bf2123bc --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/get.pyi @@ -0,0 +1,323 @@ +# 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_gray_release_rule_dto import OpenGrayReleaseRuleDTO + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +BranchNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'branchName': typing.Union[BranchNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +request_path_branch_name = api_client.PathParameter( + name="branchName", + style=api_client.ParameterStyle.SIMPLE, + schema=BranchNameSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = OpenGrayReleaseRuleDTO + + +@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_branch_gray_rules_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_branch_gray_rules_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_branch_gray_rules_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_branch_gray_rules_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取分支灰度发布规则 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + request_path_branch_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetBranchGrayRules(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_branch_gray_rules( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_branch_gray_rules( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_branch_gray_rules( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_branch_gray_rules( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_branch_gray_rules_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_branch_gray_rules_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_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 new file mode 100644 index 00000000..6fada4ff --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/put.py @@ -0,0 +1,523 @@ +# 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_gray_release_rule_dto import OpenGrayReleaseRuleDTO + +from . import path + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +BranchNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'branchName': typing.Union[BranchNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +request_path_branch_name = api_client.PathParameter( + name="branchName", + style=api_client.ParameterStyle.SIMPLE, + schema=BranchNameSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = OpenGrayReleaseRuleDTO + + +request_body_open_gray_release_rule_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_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, + ) + + +@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 _update_branch_rules_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _update_branch_rules_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _update_branch_rules_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_branch_rules_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _update_branch_rules_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 更新分支灰度发布规则 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + request_path_branch_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_open_gray_release_rule_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UpdateBranchRules(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def update_branch_rules( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def update_branch_rules( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def update_branch_rules( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_branch_rules( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def update_branch_rules( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_branch_rules_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_branch_rules_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/put.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/put.pyi new file mode 100644 index 00000000..aa9c817c --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/put.pyi @@ -0,0 +1,515 @@ +# 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_gray_release_rule_dto import OpenGrayReleaseRuleDTO + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +BranchNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'branchName': typing.Union[BranchNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +request_path_branch_name = api_client.PathParameter( + name="branchName", + style=api_client.ParameterStyle.SIMPLE, + schema=BranchNameSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = OpenGrayReleaseRuleDTO + + +request_body_open_gray_release_rule_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + 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, + ) + + +@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 _update_branch_rules_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _update_branch_rules_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _update_branch_rules_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_branch_rules_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _update_branch_rules_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 更新分支灰度发布规则 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + request_path_branch_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_open_gray_release_rule_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UpdateBranchRules(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def update_branch_rules( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def update_branch_rules( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def update_branch_rules( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_branch_rules( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def update_branch_rules( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_branch_rules_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_branch_rules_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/__init__.py new file mode 100644 index 00000000..992f8a40 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/__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_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ENCODED_ITEMS_KEY 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 new file mode 100644 index 00000000..2b9e54db --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/delete.py @@ -0,0 +1,421 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from . import path + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +KeySchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'key': typing.Union[KeySchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +request_path_key = api_client.PathParameter( + name="key", + style=api_client.ParameterStyle.SIMPLE, + schema=KeySchema, + required=True, +) +_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, + ) + + +@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 _delete_item_by_encoded_key_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _delete_item_by_encoded_key_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_item_by_encoded_key_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _delete_item_by_encoded_key_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 通过编码的key删除配置项 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + request_path_key, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.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 DeleteItemByEncodedKey(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_item_by_encoded_key( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def delete_item_by_encoded_key( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_item_by_encoded_key( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_item_by_encoded_key( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_item_by_encoded_key_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + 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 delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_item_by_encoded_key_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/delete.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/delete.pyi new file mode 100644 index 00000000..e43184b7 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/delete.pyi @@ -0,0 +1,413 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +KeySchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'key': typing.Union[KeySchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +request_path_key = api_client.PathParameter( + name="key", + style=api_client.ParameterStyle.SIMPLE, + 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, + ) + + +@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 _delete_item_by_encoded_key_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _delete_item_by_encoded_key_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_item_by_encoded_key_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _delete_item_by_encoded_key_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 通过编码的key删除配置项 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + request_path_key, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.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 DeleteItemByEncodedKey(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_item_by_encoded_key( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def delete_item_by_encoded_key( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_item_by_encoded_key( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_item_by_encoded_key( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_item_by_encoded_key_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + 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 delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_item_by_encoded_key_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/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 new file mode 100644 index 00000000..f7499379 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/get.py @@ -0,0 +1,388 @@ +# 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_item_dto import OpenItemDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +from . import path + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +KeySchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'key': typing.Union[KeySchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +request_path_key = api_client.PathParameter( + name="key", + style=api_client.ParameterStyle.SIMPLE, + schema=KeySchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = OpenItemDTO + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '404': _response_for_404, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_item_by_encoded_key_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_item_by_encoded_key_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_item_by_encoded_key_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_item_by_encoded_key_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 通过查询参数获取配置项(支持编码的key) (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + request_path_key, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetItemByEncodedKey(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_item_by_encoded_key( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_item_by_encoded_key( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_item_by_encoded_key( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_item_by_encoded_key( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_item_by_encoded_key_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_item_by_encoded_key_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_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 new file mode 100644 index 00000000..96d73e00 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/get.pyi @@ -0,0 +1,379 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_item_dto import OpenItemDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +KeySchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'key': typing.Union[KeySchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +request_path_key = api_client.PathParameter( + name="key", + style=api_client.ParameterStyle.SIMPLE, + schema=KeySchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = OpenItemDTO + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_item_by_encoded_key_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_item_by_encoded_key_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_item_by_encoded_key_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_item_by_encoded_key_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 通过查询参数获取配置项(支持编码的key) (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + request_path_key, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetItemByEncodedKey(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_item_by_encoded_key( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_item_by_encoded_key( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_item_by_encoded_key( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_item_by_encoded_key( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_item_by_encoded_key_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_item_by_encoded_key_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_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 new file mode 100644 index 00000000..fc608226 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/put.py @@ -0,0 +1,692 @@ +# 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_item_dto import OpenItemDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +from . import path + +# Query params +CreateIfNotExistsSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'createIfNotExists': typing.Union[CreateIfNotExistsSchema, bool, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_create_if_not_exists = api_client.QueryParameter( + name="createIfNotExists", + style=api_client.ParameterStyle.FORM, + schema=CreateIfNotExistsSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +KeySchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'key': typing.Union[KeySchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +request_path_key = api_client.PathParameter( + name="key", + style=api_client.ParameterStyle.SIMPLE, + schema=KeySchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = OpenItemDTO + + +request_body_open_item_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_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, + ) + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '400': _response_for_400, + '403': _response_for_403, + '404': _response_for_404, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _update_item_by_encoded_key_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _update_item_by_encoded_key_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _update_item_by_encoded_key_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_item_by_encoded_key_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _update_item_by_encoded_key_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 通过编码的key更新配置项 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + request_path_key, + ): + 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_create_if_not_exists, + ): + 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) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_open_item_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UpdateItemByEncodedKey(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def update_item_by_encoded_key( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def update_item_by_encoded_key( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def update_item_by_encoded_key( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_item_by_encoded_key( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def update_item_by_encoded_key( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_item_by_encoded_key_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_item_by_encoded_key_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/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 new file mode 100644 index 00000000..4390a111 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/put.pyi @@ -0,0 +1,681 @@ +# 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_item_dto import OpenItemDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +# Query params +CreateIfNotExistsSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'createIfNotExists': typing.Union[CreateIfNotExistsSchema, bool, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_create_if_not_exists = api_client.QueryParameter( + name="createIfNotExists", + style=api_client.ParameterStyle.FORM, + schema=CreateIfNotExistsSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +KeySchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'key': typing.Union[KeySchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +request_path_key = api_client.PathParameter( + name="key", + style=api_client.ParameterStyle.SIMPLE, + schema=KeySchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = OpenItemDTO + + +request_body_open_item_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + 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, + ) + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _update_item_by_encoded_key_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _update_item_by_encoded_key_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _update_item_by_encoded_key_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_item_by_encoded_key_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _update_item_by_encoded_key_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 通过编码的key更新配置项 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + request_path_key, + ): + 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_create_if_not_exists, + ): + 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) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_open_item_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UpdateItemByEncodedKey(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def update_item_by_encoded_key( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def update_item_by_encoded_key( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def update_item_by_encoded_key( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_item_by_encoded_key( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def update_item_by_encoded_key( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_item_by_encoded_key_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_item_by_encoded_key_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/__init__.py new file mode 100644 index 00000000..a63adc52 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/__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_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/get.py new file mode 100644 index 00000000..8a7ea7ed --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/get.py @@ -0,0 +1,320 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from . import path + +# Path params +EnvSchema = schemas.StrSchema +AppIdSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'env': typing.Union[EnvSchema, str, ], + 'appId': typing.Union[AppIdSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = schemas.IntSchema + + +@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_instance_count_by_namespace_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_instance_count_by_namespace_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_instance_count_by_namespace_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_instance_count_by_namespace_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取命名空间下的实例数量 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_env, + request_path_app_id, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _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 GetInstanceCountByNamespace(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_instance_count_by_namespace( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_instance_count_by_namespace( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_instance_count_by_namespace( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_instance_count_by_namespace( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_instance_count_by_namespace_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_instance_count_by_namespace_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/get.pyi new file mode 100644 index 00000000..a6faafcd --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/get.pyi @@ -0,0 +1,312 @@ +# 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 + +# Path params +EnvSchema = schemas.StrSchema +AppIdSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'env': typing.Union[EnvSchema, str, ], + 'appId': typing.Union[AppIdSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = schemas.IntSchema + + +@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_instance_count_by_namespace_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_instance_count_by_namespace_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_instance_count_by_namespace_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_instance_count_by_namespace_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取命名空间下的实例数量 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_env, + request_path_app_id, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _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 GetInstanceCountByNamespace(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_instance_count_by_namespace( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_instance_count_by_namespace( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_instance_count_by_namespace( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_instance_count_by_namespace( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_instance_count_by_namespace_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_instance_count_by_namespace_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/__init__.py new file mode 100644 index 00000000..d2052f61 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/__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_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_NOT_INT diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/get.py new file mode 100644 index 00000000..7c93e90b --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/get.py @@ -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_dto import OpenInstanceDTO + +from . import path + +# Query params +ExcludeReleasesSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'excludeReleases': typing.Union[ExcludeReleasesSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_exclude_releases = api_client.QueryParameter( + name="excludeReleases", + style=api_client.ParameterStyle.FORM, + schema=ExcludeReleasesSchema, + explode=True, +) +# Path params +EnvSchema = schemas.StrSchema +AppIdSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'env': typing.Union[EnvSchema, str, ], + 'appId': typing.Union[AppIdSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenInstanceDTO']: + return OpenInstanceDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenInstanceDTO'], typing.List['OpenInstanceDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenInstanceDTO': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 查询不在指定发布版本中的实例 (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_env, + request_path_app_id, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_exclude_releases, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/get.pyi new file mode 100644 index 00000000..cc2a38c6 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/get.pyi @@ -0,0 +1,393 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_instance_dto import OpenInstanceDTO + +# Query params +ExcludeReleasesSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'excludeReleases': typing.Union[ExcludeReleasesSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_exclude_releases = api_client.QueryParameter( + name="excludeReleases", + style=api_client.ParameterStyle.FORM, + schema=ExcludeReleasesSchema, + explode=True, +) +# Path params +EnvSchema = schemas.StrSchema +AppIdSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'env': typing.Union[EnvSchema, str, ], + 'appId': typing.Union[AppIdSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenInstanceDTO']: + return OpenInstanceDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenInstanceDTO'], typing.List['OpenInstanceDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenInstanceDTO': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 查询不在指定发布版本中的实例 (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_env, + request_path_app_id, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_exclude_releases, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/__init__.py new file mode 100644 index 00000000..859c2943 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/__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_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS 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 new file mode 100644 index 00000000..1c22811a --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/get.py @@ -0,0 +1,460 @@ +# 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_page_dto_open_item_dto import OpenPageDTOOpenItemDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +from . import path + +# Query params + + +class PageSchema( + schemas.IntSchema +): + + + class MetaOapg: + inclusive_minimum = 0 + + +class SizeSchema( + schemas.IntSchema +): + + + class MetaOapg: + inclusive_minimum = 0 +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'page': typing.Union[PageSchema, decimal.Decimal, int, ], + 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +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 +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = OpenPageDTOOpenItemDTO + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '404': _response_for_404, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _find_items_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 _find_items_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 _find_items_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 _find_items_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, + ): + """ + 获取命名空间下的配置项列表 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_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 FindItemsByNamespace(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def find_items_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 find_items_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 find_items_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 find_items_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._find_items_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._find_items_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_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 new file mode 100644 index 00000000..8cf74453 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/get.pyi @@ -0,0 +1,445 @@ +# 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_page_dto_open_item_dto import OpenPageDTOOpenItemDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +# Query params + + +class PageSchema( + schemas.IntSchema +): + pass + + +class SizeSchema( + schemas.IntSchema +): + pass +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'page': typing.Union[PageSchema, decimal.Decimal, int, ], + 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +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 +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = OpenPageDTOOpenItemDTO + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _find_items_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 _find_items_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 _find_items_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 _find_items_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, + ): + """ + 获取命名空间下的配置项列表 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_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 FindItemsByNamespace(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def find_items_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 find_items_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 find_items_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 find_items_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._find_items_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._find_items_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_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 new file mode 100644 index 00000000..4a5a0cfb --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/post.py @@ -0,0 +1,590 @@ +# 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_item_dto import OpenItemDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +from . import path + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = OpenItemDTO + + +request_body_open_item_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = OpenItemDTO + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '400': _response_for_400, + '403': _response_for_403, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_item_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _create_item_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _create_item_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_item_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_item_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 创建新的配置项 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_open_item_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateItem(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_item( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def create_item( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def create_item( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_item( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_item( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_item_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_item_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/post.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/post.pyi new file mode 100644 index 00000000..eb1e2b65 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/post.pyi @@ -0,0 +1,580 @@ +# 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_item_dto import OpenItemDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = OpenItemDTO + + +request_body_open_item_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = OpenItemDTO + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_item_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _create_item_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _create_item_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_item_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_item_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 创建新的配置项 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_open_item_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateItem(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_item( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def create_item( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def create_item( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_item( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_item( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_item_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_item_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/__init__.py new file mode 100644 index 00000000..9172a7e9 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/__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_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_BATCH_UPDATE 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 new file mode 100644 index 00000000..356ee072 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/put.py @@ -0,0 +1,571 @@ +# 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.exception_response import ExceptionResponse +from apollo_openapi.model.open_namespace_text_model import OpenNamespaceTextModel + +from . import path + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = OpenNamespaceTextModel + + +request_body_open_namespace_text_model = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_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, + ) + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '403': _response_for_403, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _batch_update_items_by_text_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _batch_update_items_by_text_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _batch_update_items_by_text_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _batch_update_items_by_text_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _batch_update_items_by_text_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + 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_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_open_namespace_text_model.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class BatchUpdateItemsByText(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def batch_update_items_by_text( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def batch_update_items_by_text( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def batch_update_items_by_text( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def batch_update_items_by_text( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def batch_update_items_by_text( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._batch_update_items_by_text_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._batch_update_items_by_text_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_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 new file mode 100644 index 00000000..eec274c4 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/put.pyi @@ -0,0 +1,562 @@ +# 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.exception_response import ExceptionResponse +from apollo_openapi.model.open_namespace_text_model import OpenNamespaceTextModel + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = OpenNamespaceTextModel + + +request_body_open_namespace_text_model = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + 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, + ) + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _batch_update_items_by_text_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _batch_update_items_by_text_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _batch_update_items_by_text_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _batch_update_items_by_text_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _batch_update_items_by_text_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + 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_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_open_namespace_text_model.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class BatchUpdateItemsByText(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def batch_update_items_by_text( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def batch_update_items_by_text( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def batch_update_items_by_text( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def batch_update_items_by_text( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def batch_update_items_by_text( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._batch_update_items_by_text_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._batch_update_items_by_text_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/__init__.py new file mode 100644 index 00000000..22c445e3 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/__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_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_COMPARE diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/post.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/post.py new file mode 100644 index 00000000..08001ef3 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/post.py @@ -0,0 +1,445 @@ +# 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_item_diffs import OpenItemDiffs +from apollo_openapi.model.open_namespace_sync_model import OpenNamespaceSyncModel + +from . import path + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = OpenNamespaceSyncModel + + +request_body_open_namespace_sync_model = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenItemDiffs']: + return OpenItemDiffs + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenItemDiffs'], typing.List['OpenItemDiffs']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenItemDiffs': + 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 _compare_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = 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 _compare_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = 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 _compare_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = 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 _compare_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = 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 _compare_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = 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(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_open_namespace_sync_model.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CompareItems(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def compare_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = 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 compare_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = 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 compare_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = 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 compare_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = 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 compare_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = 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._compare_items_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = 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._compare_items_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/post.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/post.pyi new file mode 100644 index 00000000..454f26b2 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/post.pyi @@ -0,0 +1,437 @@ +# 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_item_diffs import OpenItemDiffs +from apollo_openapi.model.open_namespace_sync_model import OpenNamespaceSyncModel + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = OpenNamespaceSyncModel + + +request_body_open_namespace_sync_model = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenItemDiffs']: + return OpenItemDiffs + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenItemDiffs'], typing.List['OpenItemDiffs']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenItemDiffs': + 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 _compare_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = 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 _compare_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = 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 _compare_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = 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 _compare_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = 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 _compare_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = 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(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_open_namespace_sync_model.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CompareItems(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def compare_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = 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 compare_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = 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 compare_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = 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 compare_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = 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 compare_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = 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._compare_items_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = 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._compare_items_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/__init__.py new file mode 100644 index 00000000..cdee9b53 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/__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_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_KEY 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 new file mode 100644 index 00000000..0157c9cb --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/delete.py @@ -0,0 +1,421 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from . import path + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +KeySchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'key': typing.Union[KeySchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +request_path_key = api_client.PathParameter( + name="key", + style=api_client.ParameterStyle.SIMPLE, + schema=KeySchema, + required=True, +) +_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, + ) + + +@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 _delete_item_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _delete_item_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_item_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _delete_item_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 删除配置项 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + request_path_key, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.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 DeleteItem(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_item( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def delete_item( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_item( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_item( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_item_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + 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 delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_item_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/delete.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/delete.pyi new file mode 100644 index 00000000..190bfcbc --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/delete.pyi @@ -0,0 +1,413 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +KeySchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'key': typing.Union[KeySchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +request_path_key = api_client.PathParameter( + name="key", + style=api_client.ParameterStyle.SIMPLE, + 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, + ) + + +@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 _delete_item_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _delete_item_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _delete_item_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _delete_item_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 删除配置项 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + request_path_key, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='delete'.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 DeleteItem(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def delete_item( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def delete_item( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete_item( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def delete_item( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_item_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiFordelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def delete( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def delete( + 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 delete( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._delete_item_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/get.py new file mode 100644 index 00000000..ba6cce9b --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/get.py @@ -0,0 +1,388 @@ +# 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_item_dto import OpenItemDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +from . import path + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +KeySchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'key': typing.Union[KeySchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +request_path_key = api_client.PathParameter( + name="key", + style=api_client.ParameterStyle.SIMPLE, + schema=KeySchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = OpenItemDTO + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '404': _response_for_404, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_item_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_item_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_item_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_item_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取单个配置项 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + request_path_key, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetItem(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_item( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_item( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_item( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_item( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_item_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_item_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_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 new file mode 100644 index 00000000..5d0e0269 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/get.pyi @@ -0,0 +1,379 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_item_dto import OpenItemDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +KeySchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'key': typing.Union[KeySchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +request_path_key = api_client.PathParameter( + name="key", + style=api_client.ParameterStyle.SIMPLE, + schema=KeySchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = OpenItemDTO + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_item_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_item_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_item_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_item_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取单个配置项 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + request_path_key, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetItem(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_item( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_item( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_item( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_item( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_item_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_item_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_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 new file mode 100644 index 00000000..9725768a --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/put.py @@ -0,0 +1,692 @@ +# 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_item_dto import OpenItemDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +from . import path + +# Query params +CreateIfNotExistsSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'createIfNotExists': typing.Union[CreateIfNotExistsSchema, bool, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_create_if_not_exists = api_client.QueryParameter( + name="createIfNotExists", + style=api_client.ParameterStyle.FORM, + schema=CreateIfNotExistsSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +KeySchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'key': typing.Union[KeySchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +request_path_key = api_client.PathParameter( + name="key", + style=api_client.ParameterStyle.SIMPLE, + schema=KeySchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = OpenItemDTO + + +request_body_open_item_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_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, + ) + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '400': _response_for_400, + '403': _response_for_403, + '404': _response_for_404, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _update_item_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _update_item_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _update_item_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_item_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _update_item_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 更新配置项 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + request_path_key, + ): + 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_create_if_not_exists, + ): + 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) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_open_item_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UpdateItem(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def update_item( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def update_item( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def update_item( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_item( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def update_item( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_item_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_item_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_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 new file mode 100644 index 00000000..73309fd4 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/put.pyi @@ -0,0 +1,681 @@ +# 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_item_dto import OpenItemDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +# Query params +CreateIfNotExistsSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'createIfNotExists': typing.Union[CreateIfNotExistsSchema, bool, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_create_if_not_exists = api_client.QueryParameter( + name="createIfNotExists", + style=api_client.ParameterStyle.FORM, + schema=CreateIfNotExistsSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +KeySchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'key': typing.Union[KeySchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +request_path_key = api_client.PathParameter( + name="key", + style=api_client.ParameterStyle.SIMPLE, + schema=KeySchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = OpenItemDTO + + +request_body_open_item_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + 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, + ) + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _update_item_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _update_item_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _update_item_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_item_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _update_item_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 更新配置项 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + request_path_key, + ): + 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_create_if_not_exists, + ): + 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) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_open_item_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class UpdateItem(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def update_item( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def update_item( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def update_item( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def update_item( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def update_item( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_item_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._update_item_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/__init__.py new file mode 100644 index 00000000..252f74d3 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/__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_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_REVERT 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 new file mode 100644 index 00000000..8bec76bb --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/post.py @@ -0,0 +1,526 @@ +# 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.exception_response import ExceptionResponse + +from . import path + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +_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, + ) + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '400': _response_for_400, + '403': _response_for_403, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _revert_items_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 _revert_items_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 _revert_items_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 _revert_items_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_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class RevertItems(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def revert_items( + 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 revert_items( + 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 revert_items( + 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 revert_items( + 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._revert_items_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._revert_items_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_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 new file mode 100644 index 00000000..e0eff515 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/post.pyi @@ -0,0 +1,516 @@ +# 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.exception_response import ExceptionResponse + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + 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, + ) + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _revert_items_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 _revert_items_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 _revert_items_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 _revert_items_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_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class RevertItems(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def revert_items( + 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 revert_items( + 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 revert_items( + 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 revert_items( + 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._revert_items_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._revert_items_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/__init__.py new file mode 100644 index 00000000..f40d4bbf --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/__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_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_SYNC 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 new file mode 100644 index 00000000..6c1aae1c --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/post.py @@ -0,0 +1,627 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_namespace_sync_model import OpenNamespaceSyncModel +from apollo_openapi.model.exception_response import ExceptionResponse + +from . import path + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = OpenNamespaceSyncModel + + +request_body_open_namespace_sync_model = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_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, + ) + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '400': _response_for_400, + '403': _response_for_403, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _sync_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _sync_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _sync_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _sync_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _sync_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + 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_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_open_namespace_sync_model.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class SyncItems(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def sync_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def sync_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def sync_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def sync_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def sync_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._sync_items_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._sync_items_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_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 new file mode 100644 index 00000000..0c76d9df --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/post.pyi @@ -0,0 +1,617 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_namespace_sync_model import OpenNamespaceSyncModel +from apollo_openapi.model.exception_response import ExceptionResponse + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = OpenNamespaceSyncModel + + +request_body_open_namespace_sync_model = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + 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, + ) + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _sync_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _sync_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _sync_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _sync_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _sync_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + 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_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_open_namespace_sync_model.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class SyncItems(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def sync_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def sync_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def sync_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def sync_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def sync_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._sync_items_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._sync_items_oapg( + body=body, + query_params=query_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/__init__.py new file mode 100644 index 00000000..e4c32e78 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/__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_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_VALIDATE 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 new file mode 100644 index 00000000..a5ac515c --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/post.py @@ -0,0 +1,513 @@ +# 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.exception_response import ExceptionResponse +from apollo_openapi.model.open_namespace_text_model import OpenNamespaceTextModel + +from . import path + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = OpenNamespaceTextModel + + +request_body_open_namespace_text_model = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_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, + ) + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor400ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '400': _response_for_400, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _validate_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = 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 _validate_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = 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 _validate_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = 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 _validate_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = 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 _validate_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = 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(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_open_namespace_text_model.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ValidateItems(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def validate_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = 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 validate_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = 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 validate_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = 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 validate_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = 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 validate_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = 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._validate_items_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = 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._validate_items_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_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 new file mode 100644 index 00000000..8b3a78e5 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/post.pyi @@ -0,0 +1,504 @@ +# 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.exception_response import ExceptionResponse +from apollo_openapi.model.open_namespace_text_model import OpenNamespaceTextModel + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = OpenNamespaceTextModel + + +request_body_open_namespace_text_model = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + 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, + ) + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor400ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _validate_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = 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 _validate_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = 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 _validate_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = 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 _validate_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = 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 _validate_items_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = 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(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_open_namespace_text_model.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ValidateItems(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def validate_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = 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 validate_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = 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 validate_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = 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 validate_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = 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 validate_items( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = 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._validate_items_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = 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._validate_items_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/__init__.py new file mode 100644 index 00000000..39040879 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/__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_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_LOCK diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/get.py new file mode 100644 index 00000000..09e2f2ee --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/get.py @@ -0,0 +1,322 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_namespace_lock_dto import OpenNamespaceLockDTO + +from . import path + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = OpenNamespaceLockDTO + + +@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_namespace_lock_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_namespace_lock_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_namespace_lock_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_namespace_lock_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取Namespace的锁状态 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _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 GetNamespaceLock(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_namespace_lock( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_namespace_lock( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_namespace_lock( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_namespace_lock( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_namespace_lock_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_namespace_lock_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/get.pyi new file mode 100644 index 00000000..2c80c230 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/get.pyi @@ -0,0 +1,314 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_namespace_lock_dto import OpenNamespaceLockDTO + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = OpenNamespaceLockDTO + + +@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_namespace_lock_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_namespace_lock_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_namespace_lock_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_namespace_lock_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取Namespace的锁状态 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _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 GetNamespaceLock(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_namespace_lock( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_namespace_lock( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_namespace_lock( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_namespace_lock( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_namespace_lock_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_namespace_lock_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/__init__.py new file mode 100644 index 00000000..f775f750 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/__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_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES 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 new file mode 100644 index 00000000..2f8c955f --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/post.py @@ -0,0 +1,533 @@ +# 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_release_dto import OpenReleaseDTO +from apollo_openapi.model.namespace_release_dto import NamespaceReleaseDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +from . import path + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = NamespaceReleaseDTO + + +request_body_namespace_release_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = OpenReleaseDTO + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '400': _response_for_400, + '403': _response_for_403, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _create_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _create_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = 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, + ): + """ + 创建发布 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_namespace_release_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateRelease(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def create_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def create_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_release_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_release_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/post.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/post.pyi new file mode 100644 index 00000000..035d37cf --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/post.pyi @@ -0,0 +1,523 @@ +# 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_release_dto import OpenReleaseDTO +from apollo_openapi.model.namespace_release_dto import NamespaceReleaseDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = NamespaceReleaseDTO + + +request_body_namespace_release_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = OpenReleaseDTO + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/json': api_client.MediaType( + 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, + ) + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _create_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _create_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_release_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = 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, + ): + """ + 创建发布 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_namespace_release_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateRelease(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def create_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def create_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_release( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_release_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = ..., + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: str = 'application/json', + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_release_oapg( + body=body, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active/__init__.py new file mode 100644 index 00000000..6777bea7 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active/__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_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_ACTIVE diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active/get.py new file mode 100644 index 00000000..df1ea8f1 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active/get.py @@ -0,0 +1,412 @@ +# 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_release_dto import OpenReleaseDTO + +from . import path + +# Query params +PageSchema = schemas.IntSchema +SizeSchema = schemas.IntSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'page': typing.Union[PageSchema, decimal.Decimal, int, ], + 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +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 +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenReleaseDTO']: + return OpenReleaseDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenReleaseDTO'], typing.List['OpenReleaseDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenReleaseDTO': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _find_active_releases_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _find_active_releases_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _find_active_releases_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _find_active_releases_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_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_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 FindActiveReleases(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def find_active_releases( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def find_active_releases( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def find_active_releases( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def find_active_releases( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_active_releases_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_active_releases_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active/get.pyi new file mode 100644 index 00000000..fb7dd89c --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active/get.pyi @@ -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_release_dto import OpenReleaseDTO + +# Query params +PageSchema = schemas.IntSchema +SizeSchema = schemas.IntSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'page': typing.Union[PageSchema, decimal.Decimal, int, ], + 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +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 +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenReleaseDTO']: + return OpenReleaseDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenReleaseDTO'], typing.List['OpenReleaseDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenReleaseDTO': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _find_active_releases_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _find_active_releases_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _find_active_releases_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _find_active_releases_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_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_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 FindActiveReleases(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def find_active_releases( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def find_active_releases( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def find_active_releases( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def find_active_releases( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_active_releases_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_active_releases_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all/__init__.py new file mode 100644 index 00000000..a672d426 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all/__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_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_ALL diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all/get.py new file mode 100644 index 00000000..e8fd38e9 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all/get.py @@ -0,0 +1,412 @@ +# 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_release_bo import OpenReleaseBO + +from . import path + +# Query params +PageSchema = schemas.IntSchema +SizeSchema = schemas.IntSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'page': typing.Union[PageSchema, decimal.Decimal, int, ], + 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +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 +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenReleaseBO']: + return OpenReleaseBO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenReleaseBO'], typing.List['OpenReleaseBO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenReleaseBO': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _find_all_releases_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _find_all_releases_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _find_all_releases_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _find_all_releases_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_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_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 FindAllReleases(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def find_all_releases( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def find_all_releases( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def find_all_releases( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def find_all_releases( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_all_releases_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_all_releases_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all/get.pyi new file mode 100644 index 00000000..3ccc4815 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all/get.pyi @@ -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_release_bo import OpenReleaseBO + +# Query params +PageSchema = schemas.IntSchema +SizeSchema = schemas.IntSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'page': typing.Union[PageSchema, decimal.Decimal, int, ], + 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +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 +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenReleaseBO']: + return OpenReleaseBO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenReleaseBO'], typing.List['OpenReleaseBO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenReleaseBO': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _find_all_releases_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _find_all_releases_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _find_all_releases_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _find_all_releases_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_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_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 FindAllReleases(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def find_all_releases( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def find_all_releases( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def find_all_releases( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def find_all_releases( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_all_releases_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_all_releases_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/__init__.py new file mode 100644 index 00000000..2965d5be --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/__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_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_LATEST 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 new file mode 100644 index 00000000..36da3a65 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/get.py @@ -0,0 +1,379 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_release_dto import OpenReleaseDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +from . import path + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = OpenReleaseDTO + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '404': _response_for_404, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _load_latest_active_release_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _load_latest_active_release_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _load_latest_active_release_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _load_latest_active_release_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取最新活跃发布 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _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 LoadLatestActiveRelease(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def load_latest_active_release( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def load_latest_active_release( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def load_latest_active_release( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def load_latest_active_release( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._load_latest_active_release_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._load_latest_active_release_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_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 new file mode 100644 index 00000000..89eb0914 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/get.pyi @@ -0,0 +1,370 @@ +# 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_release_dto import OpenReleaseDTO +from apollo_openapi.model.exception_response import ExceptionResponse + +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = OpenReleaseDTO + + +@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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _load_latest_active_release_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _load_latest_active_release_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _load_latest_active_release_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _load_latest_active_release_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取最新活跃发布 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _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 LoadLatestActiveRelease(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def load_latest_active_release( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def load_latest_active_release( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def load_latest_active_release( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def load_latest_active_release( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._load_latest_active_release_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._load_latest_active_release_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id/__init__.py new file mode 100644 index 00000000..bcfd370a --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id/__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_releases_release_id import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id/get.py new file mode 100644 index 00000000..d37fee19 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id/get.py @@ -0,0 +1,304 @@ +# 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_release_dto import OpenReleaseDTO + +from . import path + +# 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( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_release_id = api_client.PathParameter( + name="releaseId", + style=api_client.ParameterStyle.SIMPLE, + schema=ReleaseIdSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = OpenReleaseDTO + + +@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_release_by_id_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_release_by_id_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_release_by_id_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_release_by_id_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取发布详情 (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_env, + request_path_release_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetReleaseById(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_release_by_id( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_release_by_id( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_release_by_id( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_release_by_id( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_release_by_id_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_release_by_id_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id/get.pyi new file mode 100644 index 00000000..463a64ac --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id/get.pyi @@ -0,0 +1,296 @@ +# 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_release_dto import OpenReleaseDTO + +# 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( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_release_id = api_client.PathParameter( + name="releaseId", + style=api_client.ParameterStyle.SIMPLE, + schema=ReleaseIdSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = OpenReleaseDTO + + +@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_release_by_id_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_release_by_id_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_release_by_id_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_release_by_id_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取发布详情 (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_env, + request_path_release_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetReleaseById(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_release_by_id( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_release_by_id( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_release_by_id( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_release_by_id( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_release_by_id_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_release_by_id_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/__init__.py new file mode 100644 index 00000000..2d1fda75 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/__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_releases_release_id_instances import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID_INSTANCES diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.py new file mode 100644 index 00000000..8d563059 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.py @@ -0,0 +1,369 @@ +# 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_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO + +from . import path + +# Query params +PageSchema = schemas.IntSchema +SizeSchema = schemas.IntSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'page': typing.Union[PageSchema, decimal.Decimal, int, ], + 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +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 +ReleaseIdSchema = schemas.IntSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'env': typing.Union[EnvSchema, str, ], + 'releaseId': typing.Union[ReleaseIdSchema, decimal.Decimal, int, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_release_id = api_client.PathParameter( + name="releaseId", + style=api_client.ParameterStyle.SIMPLE, + schema=ReleaseIdSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = OpenPageDTOOpenInstanceDTO + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _openapi_v1_envs_env_releases_release_id_instances_get_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _openapi_v1_envs_env_releases_release_id_instances_get_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _openapi_v1_envs_env_releases_release_id_instances_get_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _openapi_v1_envs_env_releases_release_id_instances_get_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 根据发布版本查询实例(支持分页) (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_env, + request_path_release_id, + ): + 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_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 OpenapiV1EnvsEnvReleasesReleaseIdInstancesGet(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def openapi_v1_envs_env_releases_release_id_instances_get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def openapi_v1_envs_env_releases_release_id_instances_get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def openapi_v1_envs_env_releases_release_id_instances_get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def openapi_v1_envs_env_releases_release_id_instances_get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._openapi_v1_envs_env_releases_release_id_instances_get_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._openapi_v1_envs_env_releases_release_id_instances_get_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.pyi new file mode 100644 index 00000000..350b2f73 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.pyi @@ -0,0 +1,361 @@ +# 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_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO + +# Query params +PageSchema = schemas.IntSchema +SizeSchema = schemas.IntSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'page': typing.Union[PageSchema, decimal.Decimal, int, ], + 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +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 +ReleaseIdSchema = schemas.IntSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'env': typing.Union[EnvSchema, str, ], + 'releaseId': typing.Union[ReleaseIdSchema, decimal.Decimal, int, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_release_id = api_client.PathParameter( + name="releaseId", + style=api_client.ParameterStyle.SIMPLE, + schema=ReleaseIdSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = OpenPageDTOOpenInstanceDTO + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _openapi_v1_envs_env_releases_release_id_instances_get_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _openapi_v1_envs_env_releases_release_id_instances_get_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _openapi_v1_envs_env_releases_release_id_instances_get_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _openapi_v1_envs_env_releases_release_id_instances_get_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 根据发布版本查询实例(支持分页) (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_env, + request_path_release_id, + ): + 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_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 OpenapiV1EnvsEnvReleasesReleaseIdInstancesGet(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def openapi_v1_envs_env_releases_release_id_instances_get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def openapi_v1_envs_env_releases_release_id_instances_get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def openapi_v1_envs_env_releases_release_id_instances_get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def openapi_v1_envs_env_releases_release_id_instances_get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._openapi_v1_envs_env_releases_release_id_instances_get_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._openapi_v1_envs_env_releases_release_id_instances_get_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_rollback/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_rollback/__init__.py new file mode 100644 index 00000000..e2075ef5 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_rollback/__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_releases_release_id_rollback import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID_ROLLBACK 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 new file mode 100644 index 00000000..4d764116 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_rollback/put.py @@ -0,0 +1,394 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from . import path + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +EnvSchema = schemas.StrSchema +ReleaseIdSchema = schemas.Int64Schema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'env': typing.Union[EnvSchema, str, ], + 'releaseId': typing.Union[ReleaseIdSchema, decimal.Decimal, int, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_release_id = api_client.PathParameter( + name="releaseId", + style=api_client.ParameterStyle.SIMPLE, + schema=ReleaseIdSchema, + required=True, +) +_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, + ) + + +@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 _rollback_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 _rollback_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 _rollback_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 _rollback_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, + ): + """ + 回滚发布 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_env, + request_path_release_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='put'.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 Rollback(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def rollback( + 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 rollback( + 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 rollback( + 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 rollback( + 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._rollback_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + 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 put( + 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 put( + 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 put( + 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._rollback_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_rollback/put.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_rollback/put.pyi new file mode 100644 index 00000000..808fe6bf --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_rollback/put.pyi @@ -0,0 +1,386 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + required=True, + explode=True, +) +# Path params +EnvSchema = schemas.StrSchema +ReleaseIdSchema = schemas.Int64Schema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'env': typing.Union[EnvSchema, str, ], + 'releaseId': typing.Union[ReleaseIdSchema, decimal.Decimal, int, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_release_id = api_client.PathParameter( + name="releaseId", + style=api_client.ParameterStyle.SIMPLE, + 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, + ) + + +@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 _rollback_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 _rollback_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 _rollback_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 _rollback_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, + ): + """ + 回滚发布 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_env, + request_path_release_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='put'.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 Rollback(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def rollback( + 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 rollback( + 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 rollback( + 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 rollback( + 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._rollback_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + 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 put( + 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 put( + 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 put( + 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._rollback_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_organizations/__init__.py b/python/apollo_openapi/paths/openapi_v1_organizations/__init__.py new file mode 100644 index 00000000..5dbe4893 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_organizations/__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_organizations import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ORGANIZATIONS diff --git a/python/apollo_openapi/paths/openapi_v1_organizations/get.py b/python/apollo_openapi/paths/openapi_v1_organizations/get.py new file mode 100644 index 00000000..dec816d7 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_organizations/get.py @@ -0,0 +1,323 @@ +# 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.exception_response import ExceptionResponse +from apollo_openapi.model.open_organization_dto import OpenOrganizationDto + +from . import path + +_auth = [ + 'ApiKeyAuth', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenOrganizationDto']: + return OpenOrganizationDto + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenOrganizationDto'], typing.List['OpenOrganizationDto']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenOrganizationDto': + 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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor401(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor401ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_401 = api_client.OpenApiResponse( + response_cls=ApiResponseFor401, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor401ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '401': _response_for_401, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_organization_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_organization_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_organization_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_organization_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取所有组织信息 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path.value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetOrganization(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_organization( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_organization( + self, + skip_deserialization: typing_extensions.Literal[True], + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_organization( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_organization( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_organization_oapg( + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_organization_oapg( + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_organizations/get.pyi b/python/apollo_openapi/paths/openapi_v1_organizations/get.pyi new file mode 100644 index 00000000..33bd455e --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_organizations/get.pyi @@ -0,0 +1,314 @@ +# 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.exception_response import ExceptionResponse +from apollo_openapi.model.open_organization_dto import OpenOrganizationDto + + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenOrganizationDto']: + return OpenOrganizationDto + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenOrganizationDto'], typing.List['OpenOrganizationDto']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenOrganizationDto': + 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), + }, +) + + +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, + ) + + +@dataclass +class ApiResponseFor401(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor401ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_401 = api_client.OpenApiResponse( + response_cls=ApiResponseFor401, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor401ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_organization_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _get_organization_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _get_organization_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _get_organization_oapg( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 获取所有组织信息 (original openapi) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path.value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class GetOrganization(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_organization( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get_organization( + self, + skip_deserialization: typing_extensions.Literal[True], + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get_organization( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get_organization( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_organization_oapg( + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._get_organization_oapg( + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/py.typed b/python/apollo_openapi/py.typed deleted file mode 100644 index e69de29b..00000000 diff --git a/python/apollo_openapi/rest.py b/python/apollo_openapi/rest.py index cad1090b..733b8586 100644 --- a/python/apollo_openapi/rest.py +++ b/python/apollo_openapi/rest.py @@ -3,66 +3,34 @@ """ Apollo OpenAPI - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` +

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 OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - + Generated by: https://openapi-generator.tech +""" -import io -import json -import re +import logging import ssl +from urllib.parse import urlencode +import typing +import certifi import urllib3 +from urllib3._collections import HTTPHeaderDict from apollo_openapi.exceptions import ApiException, ApiValueError -SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} -RESTResponseType = urllib3.HTTPResponse - - -def is_socks_proxy_url(url): - if url is None: - return False - split_section = url.split("://") - if len(split_section) < 2: - return False - else: - return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES - - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.response.headers - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.response.headers.get(name, default) +logger = logging.getLogger(__name__) -class RESTClientObject: +class RESTClientObject(object): - def __init__(self, configuration) -> None: + def __init__(self, configuration, pools_size=4, maxsize=None): # urllib3.PoolManager will pass all kw parameters to connectionpool # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 # cert_reqs @@ -71,168 +39,143 @@ def __init__(self, configuration) -> None: else: cert_reqs = ssl.CERT_NONE - pool_args = { - "cert_reqs": cert_reqs, - "ca_certs": configuration.ssl_ca_cert, - "cert_file": configuration.cert_file, - "key_file": configuration.key_file, - "ca_cert_data": configuration.ca_cert_data, - } + # ca_certs + if configuration.ssl_ca_cert: + ca_certs = configuration.ssl_ca_cert + else: + # if not set certificate file, use Mozilla's root certificates. + ca_certs = certifi.where() + + addition_pool_args = {} if configuration.assert_hostname is not None: - pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 if configuration.retries is not None: - pool_args['retries'] = configuration.retries + addition_pool_args['retries'] = configuration.retries if configuration.tls_server_name: - pool_args['server_hostname'] = configuration.tls_server_name - + addition_pool_args['server_hostname'] = configuration.tls_server_name if configuration.socket_options is not None: - pool_args['socket_options'] = configuration.socket_options + addition_pool_args['socket_options'] = configuration.socket_options - if configuration.connection_pool_maxsize is not None: - pool_args['maxsize'] = configuration.connection_pool_maxsize + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 # https pool manager - self.pool_manager: urllib3.PoolManager - if configuration.proxy: - if is_socks_proxy_url(configuration.proxy): - from urllib3.contrib.socks import SOCKSProxyManager - pool_args["proxy_url"] = configuration.proxy - pool_args["headers"] = configuration.proxy_headers - self.pool_manager = SOCKSProxyManager(**pool_args) - else: - pool_args["proxy_url"] = configuration.proxy - pool_args["proxy_headers"] = configuration.proxy_headers - self.pool_manager = urllib3.ProxyManager(**pool_args) + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) else: - self.pool_manager = urllib3.PoolManager(**pool_args) + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) def request( self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): + method: str, + url: str, + headers: typing.Optional[HTTPHeaderDict] = None, + fields: typing.Optional[typing.Tuple[typing.Tuple[str, typing.Any], ...]] = None, + body: typing.Optional[typing.Union[str, bytes]] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> urllib3.HTTPResponse: """Perform requests. :param method: http request method :param url: http request url :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. + :param body: request body, for other types + :param fields: request parameters for + `application/x-www-form-urlencoded` + or `multipart/form-data` + :param stream: if True, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is False. + :param timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. """ method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] - - if post_params and body: + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if fields and body: raise ApiValueError( - "body parameter cannot be used with post_params parameter." + "body parameter cannot be used with fields parameter." ) - post_params = post_params or {} + fields = fields or {} headers = headers or {} - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): - timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): - timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) + if timeout: + if isinstance(timeout, (int, float)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=timeout) + elif (isinstance(timeout, tuple) and + len(timeout) == 2): + timeout = urllib3.Timeout(connect=timeout[0], read=timeout[1]) try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): - request_body = None - if body is not None: - request_body = json.dumps(body) + if 'Content-Type' not in headers and body is None: r = self.pool_manager.request( method, url, - body=request_body, + preload_content=not stream, timeout=timeout, - headers=headers, - preload_content=False + headers=headers ) - elif content_type == 'application/x-www-form-urlencoded': + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 r = self.pool_manager.request( - method, - url, - fields=post_params, + method, url, + body=body, + fields=fields, encode_multipart=False, + preload_content=not stream, timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'multipart/form-data': + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. del headers['Content-Type'] - # Ensures that dict objects are serialized - post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] r = self.pool_manager.request( - method, - url, - fields=post_params, + method, url, + fields=fields, encode_multipart=True, + preload_content=not stream, timeout=timeout, - headers=headers, - preload_content=False - ) + headers=headers) # Pass a `string` parameter directly in the body to support - # other content types than JSON when `body` argument is - # provided in serialized form. + # other content types than Json when `body` argument is + # provided in serialized form elif isinstance(body, str) or isinstance(body, bytes): + request_body = body r = self.pool_manager.request( - method, - url, - body=body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif headers['Content-Type'].startswith('text/') and isinstance(body, bool): - request_body = "true" if body else "false" - r = self.pool_manager.request( - method, - url, + method, url, body=request_body, - preload_content=False, + preload_content=not stream, timeout=timeout, headers=headers) else: @@ -243,16 +186,72 @@ def request( raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: - r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False - ) + r = self.pool_manager.request(method, url, + preload_content=not stream, + timeout=timeout, + headers=headers) except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) + msg = "{0}\n{1}".format(type(e).__name__, str(e)) raise ApiException(status=0, reason=msg) - return RESTResponse(r) + if not stream: + # log response body + logger.debug("response body: %s", r.data) + + return r + + def GET(self, url, headers=None, stream=False, + timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("GET", url, + headers=headers, + stream=stream, + timeout=timeout, + fields=fields) + + def HEAD(self, url, headers=None, stream=False, + timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("HEAD", url, + headers=headers, + stream=stream, + timeout=timeout, + fields=fields) + + def OPTIONS(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("OPTIONS", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def DELETE(self, url, headers=None, body=None, + stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("DELETE", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def POST(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("POST", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def PUT(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("PUT", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def PATCH(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("PATCH", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) diff --git a/python/apollo_openapi/schemas.py b/python/apollo_openapi/schemas.py new file mode 100644 index 00000000..3d68e842 --- /dev/null +++ b/python/apollo_openapi/schemas.py @@ -0,0 +1,2475 @@ +# 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 collections import defaultdict +from datetime import date, datetime, timedelta # noqa: F401 +import functools +import decimal +import io +import re +import types +import typing +import uuid + +from dateutil.parser.isoparser import isoparser, _takes_ascii +import frozendict + +from apollo_openapi.exceptions import ( + ApiTypeError, + ApiValueError, +) +from apollo_openapi.configuration import ( + Configuration, +) + + +class Unset(object): + """ + An instance of this class is set as the default value for object type(dict) properties that are optional + When a property has an unset value, that property will not be assigned in the dict + """ + pass + +unset = Unset() + +none_type = type(None) +file_type = io.IOBase + + +class FileIO(io.FileIO): + """ + A class for storing files + Note: this class is not immutable + """ + + def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader]): + if isinstance(_arg, (io.FileIO, io.BufferedReader)): + if _arg.closed: + raise ApiValueError('Invalid file state; file is closed and must be open') + _arg.close() + inst = super(FileIO, cls).__new__(cls, _arg.name) + super(FileIO, inst).__init__(_arg.name) + return inst + raise ApiValueError('FileIO must be passed _arg which contains the open file') + + def __init__(self, _arg: typing.Union[io.FileIO, io.BufferedReader]): + pass + + +def update(d: dict, u: dict): + """ + Adds u to d + Where each dict is defaultdict(set) + """ + if not u: + return d + for k, v in u.items(): + if k not in d: + d[k] = v + else: + d[k] = d[k] | v + + +class ValidationMetadata(frozendict.frozendict): + """ + A class storing metadata that is needed to validate OpenApi Schema payloads + """ + def __new__( + cls, + path_to_item: typing.Tuple[typing.Union[str, int], ...] = tuple(['args[0]']), + from_server: bool = False, + configuration: typing.Optional[Configuration] = None, + seen_classes: typing.FrozenSet[typing.Type] = frozenset(), + validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Type]] = frozendict.frozendict() + ): + """ + Args: + path_to_item: the path to the current data being instantiated. + For {'a': [1]} if the code is handling, 1, then the path is ('args[0]', 'a', 0) + This changes from location to location + from_server: whether or not this data came form the server + True when receiving server data + False when instantiating model with client side data not form the server + This does not change from location to location + configuration: the Configuration instance to use + This is needed because in Configuration: + - one can disable validation checking + This does not change from location to location + seen_classes: when deserializing data that matches multiple schemas, this is used to store + the schemas that have been traversed. This is used to stop processing when a cycle is seen. + This changes from location to location + validated_path_to_schemas: stores the already validated schema classes for a given path location + This does not change from location to location + """ + return super().__new__( + cls, + path_to_item=path_to_item, + from_server=from_server, + configuration=configuration, + seen_classes=seen_classes, + validated_path_to_schemas=validated_path_to_schemas + ) + + def validation_ran_earlier(self, cls: type) -> bool: + validated_schemas = self.validated_path_to_schemas.get(self.path_to_item, set()) + validation_ran_earlier = validated_schemas and cls in validated_schemas + if validation_ran_earlier: + return True + if cls in self.seen_classes: + return True + return False + + @property + def path_to_item(self) -> typing.Tuple[typing.Union[str, int], ...]: + return self.get('path_to_item') + + @property + def from_server(self) -> bool: + return self.get('from_server') + + @property + def configuration(self) -> typing.Optional[Configuration]: + return self.get('configuration') + + @property + def seen_classes(self) -> typing.FrozenSet[typing.Type]: + return self.get('seen_classes') + + @property + def validated_path_to_schemas(self) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Type]]: + return self.get('validated_path_to_schemas') + + +def add_deeper_validated_schemas(validation_metadata: ValidationMetadata, path_to_schemas: dict): + # this is called if validation_ran_earlier and current and deeper locations need to be added + current_path_to_item = validation_metadata.path_to_item + other_path_to_schemas = {} + for path_to_item, schemas in validation_metadata.validated_path_to_schemas.items(): + if len(path_to_item) < len(current_path_to_item): + continue + path_begins_with_current_path = path_to_item[:len(current_path_to_item)] == current_path_to_item + if path_begins_with_current_path: + other_path_to_schemas[path_to_item] = schemas + update(path_to_schemas, other_path_to_schemas) + + +class Singleton: + """ + Enums and singletons are the same + The same instance is returned for a given key of (cls, _arg) + """ + _instances = {} + + def __new__(cls, _arg: typing.Any, **kwargs): + """ + cls base classes: BoolClass, NoneClass, str, decimal.Decimal + The 3rd key is used in the tuple below for a corner case where an enum contains integer 1 + However 1.0 can also be ingested into that enum schema because 1.0 == 1 and + Decimal('1.0') == Decimal('1') + But if we omitted the 3rd value in the key, then Decimal('1.0') would be stored as Decimal('1') + and json serializing that instance would be '1' rather than the expected '1.0' + Adding the 3rd value, the str of _arg ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 + """ + key = (cls, _arg, str(_arg)) + if key not in cls._instances: + if isinstance(_arg, (none_type, bool, BoolClass, NoneClass)): + inst = super().__new__(cls) + cls._instances[key] = inst + else: + cls._instances[key] = super().__new__(cls, _arg) + return cls._instances[key] + + def __repr__(self): + if isinstance(self, NoneClass): + return f'<{self.__class__.__name__}: None>' + elif isinstance(self, BoolClass): + if bool(self): + return f'<{self.__class__.__name__}: True>' + return f'<{self.__class__.__name__}: False>' + return f'<{self.__class__.__name__}: {super().__repr__()}>' + + +class classproperty: + + def __init__(self, fget): + self.fget = fget + + def __get__(self, owner_self, owner_cls): + return self.fget(owner_cls) + + +class NoneClass(Singleton): + @classproperty + def NONE(cls): + return cls(None) + + def __bool__(self) -> bool: + return False + + +class BoolClass(Singleton): + @classproperty + def TRUE(cls): + return cls(True) + + @classproperty + def FALSE(cls): + return cls(False) + + @functools.lru_cache() + def __bool__(self) -> bool: + for key, instance in self._instances.items(): + if self is instance: + return bool(key[1]) + raise ValueError('Unable to find the boolean value of this instance') + + +class MetaOapgTyped: + exclusive_maximum: typing.Union[int, float] + inclusive_maximum: typing.Union[int, float] + exclusive_minimum: typing.Union[int, float] + inclusive_minimum: typing.Union[int, float] + max_items: int + min_items: int + discriminator: typing.Dict[str, typing.Dict[str, typing.Type['Schema']]] + + + class properties: + # to hold object properties + pass + + additional_properties: typing.Optional[typing.Type['Schema']] + max_properties: int + min_properties: int + all_of: typing.List[typing.Type['Schema']] + one_of: typing.List[typing.Type['Schema']] + any_of: typing.List[typing.Type['Schema']] + not_schema: typing.Type['Schema'] + max_length: int + min_length: int + items: typing.Type['Schema'] + + +class Schema: + """ + the base class of all swagger/openapi schemas/models + """ + __inheritable_primitive_types_set = {decimal.Decimal, str, tuple, frozendict.frozendict, FileIO, bytes, BoolClass, NoneClass} + _types: typing.Set[typing.Type] + MetaOapg = MetaOapgTyped + + @staticmethod + def __get_valid_classes_phrase(input_classes): + """Returns a string phrase describing what types are allowed""" + all_classes = list(input_classes) + all_classes = sorted(all_classes, key=lambda cls: cls.__name__) + all_class_names = [cls.__name__ for cls in all_classes] + if len(all_class_names) == 1: + return "is {0}".format(all_class_names[0]) + return "is one of [{0}]".format(", ".join(all_class_names)) + + @staticmethod + def _get_class_oapg(item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type['Schema']]) -> typing.Type['Schema']: + if isinstance(item_cls, types.FunctionType): + # referenced schema + return item_cls() + elif isinstance(item_cls, staticmethod): + # referenced schema + return item_cls.__func__() + return item_cls + + @classmethod + def __type_error_message( + cls, var_value=None, var_name=None, valid_classes=None, key_type=None + ): + """ + Keyword Args: + var_value (any): the variable which has the type_error + var_name (str): the name of the variable which has the typ error + valid_classes (tuple): the accepted classes for current_item's + value + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a tuple + """ + key_or_value = "value" + if key_type: + key_or_value = "key" + valid_classes_phrase = cls.__get_valid_classes_phrase(valid_classes) + msg = "Invalid type. Required {1} type {2} and " "passed type was {3}".format( + var_name, + key_or_value, + valid_classes_phrase, + type(var_value).__name__, + ) + return msg + + @classmethod + def __get_type_error(cls, var_value, path_to_item, valid_classes, key_type=False): + error_msg = cls.__type_error_message( + var_name=path_to_item[-1], + var_value=var_value, + valid_classes=valid_classes, + key_type=key_type, + ) + return ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=valid_classes, + key_type=key_type, + ) + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: ValidationMetadata, + ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: + """ + Schema _validate_oapg + All keyword validation except for type checking was done in calling stack frames + If those validations passed, the validated classes are collected in path_to_schemas + + Returns: + path_to_schemas: a map of path to schemas + + Raises: + ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes + ApiTypeError: when the input type is not in the list of allowed spec types + """ + base_class = type(arg) + if base_class not in cls._types: + raise cls.__get_type_error( + arg, + validation_metadata.path_to_item, + cls._types, + key_type=False, + ) + + path_to_schemas = {validation_metadata.path_to_item: set()} + path_to_schemas[validation_metadata.path_to_item].add(cls) + path_to_schemas[validation_metadata.path_to_item].add(base_class) + return path_to_schemas + + @staticmethod + def _process_schema_classes_oapg( + schema_classes: typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]] + ): + """ + Processes and mutates schema_classes + If a SomeSchema is a subclass of DictSchema then remove DictSchema because it is already included + """ + if len(schema_classes) < 2: + return + if len(schema_classes) > 2 and UnsetAnyTypeSchema in schema_classes: + schema_classes.remove(UnsetAnyTypeSchema) + x_schema = schema_type_classes & schema_classes + if not x_schema: + return + x_schema = x_schema.pop() + if any(c is not x_schema and issubclass(c, x_schema) for c in schema_classes): + # needed to not have a mro error in get_new_class + schema_classes.remove(x_schema) + + @classmethod + def __get_new_cls( + cls, + arg, + validation_metadata: ValidationMetadata + ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']]: + """ + Make a new dynamic class and return an instance of that class + We are making an instance of cls, but instead of making cls + make a new class, new_cls + which includes dynamic bases including cls + return an instance of that new class + + Dict property + List Item Assignment Use cases: + 1. value is NOT an instance of the required schema class + the value is validated by _validate_oapg + _validate_oapg returns a key value pair + where the key is the path to the item, and the value will be the required manufactured class + made out of the matching schemas + 2. value is an instance of the correct schema type + the value is NOT validated by _validate_oapg, _validate_oapg only checks that the instance is of the correct schema type + for this value, _validate_oapg does NOT return an entry for it in _path_to_schemas + and in list/dict _get_items_oapg,_get_properties_oapg the value will be directly assigned + because value is of the correct type, and validation was run earlier when the instance was created + """ + _path_to_schemas = {} + if validation_metadata.validation_ran_earlier(cls): + add_deeper_validated_schemas(validation_metadata, _path_to_schemas) + else: + other_path_to_schemas = cls._validate_oapg(arg, validation_metadata=validation_metadata) + update(_path_to_schemas, other_path_to_schemas) + # loop through it make a new class for each entry + # do not modify the returned result because it is cached and we would be modifying the cached value + path_to_schemas = {} + for path, schema_classes in _path_to_schemas.items(): + """ + Use cases + 1. N number of schema classes + enum + type != bool/None, classes in path_to_schemas: tuple/frozendict.frozendict/str/Decimal/bytes/FileIo + needs Singleton added + 2. N number of schema classes + enum + type == bool/None, classes in path_to_schemas: BoolClass/NoneClass + Singleton already added + 3. N number of schema classes, classes in path_to_schemas: BoolClass/NoneClass/tuple/frozendict.frozendict/str/Decimal/bytes/FileIo + """ + cls._process_schema_classes_oapg(schema_classes) + enum_schema = any( + issubclass(this_cls, EnumBase) for this_cls in schema_classes) + inheritable_primitive_type = schema_classes.intersection(cls.__inheritable_primitive_types_set) + chosen_schema_classes = schema_classes - inheritable_primitive_type + suffix = tuple(inheritable_primitive_type) + if enum_schema and suffix[0] not in {NoneClass, BoolClass}: + suffix = (Singleton,) + suffix + + used_classes = tuple(sorted(chosen_schema_classes, key=lambda a_cls: a_cls.__name__)) + suffix + mfg_cls = get_new_class(class_name='DynamicSchema', bases=used_classes) + path_to_schemas[path] = mfg_cls + + return path_to_schemas + + @classmethod + def _get_new_instance_without_conversion_oapg( + cls, + arg: typing.Any, + path_to_item: typing.Tuple[typing.Union[str, int], ...], + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']] + ): + # We have a Dynamic class and we are making an instance of it + if issubclass(cls, frozendict.frozendict) and issubclass(cls, DictBase): + properties = cls._get_properties_oapg(arg, path_to_item, path_to_schemas) + return super(Schema, cls).__new__(cls, properties) + elif issubclass(cls, tuple) and issubclass(cls, ListBase): + items = cls._get_items_oapg(arg, path_to_item, path_to_schemas) + return super(Schema, cls).__new__(cls, items) + """ + str = openapi str, date, and datetime + decimal.Decimal = openapi int and float + FileIO = openapi binary type and the user inputs a file + bytes = openapi binary type and the user inputs bytes + """ + return super(Schema, cls).__new__(cls, arg) + + @classmethod + def from_openapi_data_oapg( + cls, + arg: typing.Union[ + str, + date, + datetime, + int, + float, + decimal.Decimal, + bool, + None, + 'Schema', + dict, + frozendict.frozendict, + tuple, + list, + io.FileIO, + io.BufferedReader, + bytes + ], + _configuration: typing.Optional[Configuration] + ): + """ + Schema from_openapi_data_oapg + """ + from_server = True + validated_path_to_schemas = {} + arg = cast_to_allowed_types(arg, from_server, validated_path_to_schemas) + validation_metadata = ValidationMetadata( + from_server=from_server, configuration=_configuration, validated_path_to_schemas=validated_path_to_schemas) + path_to_schemas = cls.__get_new_cls(arg, validation_metadata) + new_cls = path_to_schemas[validation_metadata.path_to_item] + new_inst = new_cls._get_new_instance_without_conversion_oapg( + arg, + validation_metadata.path_to_item, + path_to_schemas + ) + return new_inst + + @staticmethod + def __get_input_dict(*args, **kwargs) -> frozendict.frozendict: + input_dict = {} + if args and isinstance(args[0], (dict, frozendict.frozendict)): + input_dict.update(args[0]) + if kwargs: + input_dict.update(kwargs) + return frozendict.frozendict(input_dict) + + @staticmethod + def __remove_unsets(kwargs): + return {key: val for key, val in kwargs.items() if val is not unset} + + def __new__(cls, *_args: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]): + """ + Schema __new__ + + Args: + _args (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value + kwargs (str, int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): dict values + _configuration: contains the Configuration that enables json schema validation keywords + like minItems, minLength etc + + Note: double underscores are used here because pycharm thinks that these variables + are instance properties if they are named normally :( + """ + __kwargs = cls.__remove_unsets(kwargs) + if not _args and not __kwargs: + raise TypeError( + 'No input given. args or kwargs must be given.' + ) + if not __kwargs and _args and not isinstance(_args[0], dict): + __arg = _args[0] + else: + __arg = cls.__get_input_dict(*_args, **__kwargs) + __from_server = False + __validated_path_to_schemas = {} + __arg = cast_to_allowed_types( + __arg, __from_server, __validated_path_to_schemas) + __validation_metadata = ValidationMetadata( + configuration=_configuration, from_server=__from_server, validated_path_to_schemas=__validated_path_to_schemas) + __path_to_schemas = cls.__get_new_cls(__arg, __validation_metadata) + __new_cls = __path_to_schemas[__validation_metadata.path_to_item] + return __new_cls._get_new_instance_without_conversion_oapg( + __arg, + __validation_metadata.path_to_item, + __path_to_schemas + ) + + def __init__( + self, + *_args: typing.Union[ + dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Union[ + dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset + ] + ): + """ + this is needed to fix 'Unexpected argument' warning in pycharm + this code does nothing because all Schema instances are immutable + this means that all input data is passed into and used in new, and after the new instance is made + no new attributes are assigned and init is not used + """ + pass + +""" +import itertools +data_types = ('None', 'FrozenDict', 'Tuple', 'Str', 'Decimal', 'Bool') +type_to_cls = { + 'None': 'NoneClass', + 'FrozenDict': 'frozendict.frozendict', + 'Tuple': 'tuple', + 'Str': 'str', + 'Decimal': 'decimal.Decimal', + 'Bool': 'BoolClass' +} +cls_tuples = [v for v in itertools.combinations(data_types, 5)] +typed_classes = [f"class {''.join(cls_tuple)}Mixin({', '.join(type_to_cls[typ] for typ in cls_tuple)}):\n pass" for cls_tuple in cls_tuples] +for cls in typed_classes: + print(cls) +object_classes = [f"{''.join(cls_tuple)}Mixin = object" for cls_tuple in cls_tuples] +for cls in object_classes: + print(cls) +""" +if typing.TYPE_CHECKING: + # qty 1 + NoneMixin = NoneClass + FrozenDictMixin = frozendict.frozendict + TupleMixin = tuple + StrMixin = str + DecimalMixin = decimal.Decimal + BoolMixin = BoolClass + BytesMixin = bytes + FileMixin = FileIO + # qty 2 + class BinaryMixin(bytes, FileIO): + pass + class NoneFrozenDictMixin(NoneClass, frozendict.frozendict): + pass + class NoneTupleMixin(NoneClass, tuple): + pass + class NoneStrMixin(NoneClass, str): + pass + class NoneDecimalMixin(NoneClass, decimal.Decimal): + pass + class NoneBoolMixin(NoneClass, BoolClass): + pass + class FrozenDictTupleMixin(frozendict.frozendict, tuple): + pass + class FrozenDictStrMixin(frozendict.frozendict, str): + pass + class FrozenDictDecimalMixin(frozendict.frozendict, decimal.Decimal): + pass + class FrozenDictBoolMixin(frozendict.frozendict, BoolClass): + pass + class TupleStrMixin(tuple, str): + pass + class TupleDecimalMixin(tuple, decimal.Decimal): + pass + class TupleBoolMixin(tuple, BoolClass): + pass + class StrDecimalMixin(str, decimal.Decimal): + pass + class StrBoolMixin(str, BoolClass): + pass + class DecimalBoolMixin(decimal.Decimal, BoolClass): + pass + # qty 3 + class NoneFrozenDictTupleMixin(NoneClass, frozendict.frozendict, tuple): + pass + class NoneFrozenDictStrMixin(NoneClass, frozendict.frozendict, str): + pass + class NoneFrozenDictDecimalMixin(NoneClass, frozendict.frozendict, decimal.Decimal): + pass + class NoneFrozenDictBoolMixin(NoneClass, frozendict.frozendict, BoolClass): + pass + class NoneTupleStrMixin(NoneClass, tuple, str): + pass + class NoneTupleDecimalMixin(NoneClass, tuple, decimal.Decimal): + pass + class NoneTupleBoolMixin(NoneClass, tuple, BoolClass): + pass + class NoneStrDecimalMixin(NoneClass, str, decimal.Decimal): + pass + class NoneStrBoolMixin(NoneClass, str, BoolClass): + pass + class NoneDecimalBoolMixin(NoneClass, decimal.Decimal, BoolClass): + pass + class FrozenDictTupleStrMixin(frozendict.frozendict, tuple, str): + pass + class FrozenDictTupleDecimalMixin(frozendict.frozendict, tuple, decimal.Decimal): + pass + class FrozenDictTupleBoolMixin(frozendict.frozendict, tuple, BoolClass): + pass + class FrozenDictStrDecimalMixin(frozendict.frozendict, str, decimal.Decimal): + pass + class FrozenDictStrBoolMixin(frozendict.frozendict, str, BoolClass): + pass + class FrozenDictDecimalBoolMixin(frozendict.frozendict, decimal.Decimal, BoolClass): + pass + class TupleStrDecimalMixin(tuple, str, decimal.Decimal): + pass + class TupleStrBoolMixin(tuple, str, BoolClass): + pass + class TupleDecimalBoolMixin(tuple, decimal.Decimal, BoolClass): + pass + class StrDecimalBoolMixin(str, decimal.Decimal, BoolClass): + pass + # qty 4 + class NoneFrozenDictTupleStrMixin(NoneClass, frozendict.frozendict, tuple, str): + pass + class NoneFrozenDictTupleDecimalMixin(NoneClass, frozendict.frozendict, tuple, decimal.Decimal): + pass + class NoneFrozenDictTupleBoolMixin(NoneClass, frozendict.frozendict, tuple, BoolClass): + pass + class NoneFrozenDictStrDecimalMixin(NoneClass, frozendict.frozendict, str, decimal.Decimal): + pass + class NoneFrozenDictStrBoolMixin(NoneClass, frozendict.frozendict, str, BoolClass): + pass + class NoneFrozenDictDecimalBoolMixin(NoneClass, frozendict.frozendict, decimal.Decimal, BoolClass): + pass + class NoneTupleStrDecimalMixin(NoneClass, tuple, str, decimal.Decimal): + pass + class NoneTupleStrBoolMixin(NoneClass, tuple, str, BoolClass): + pass + class NoneTupleDecimalBoolMixin(NoneClass, tuple, decimal.Decimal, BoolClass): + pass + class NoneStrDecimalBoolMixin(NoneClass, str, decimal.Decimal, BoolClass): + pass + class FrozenDictTupleStrDecimalMixin(frozendict.frozendict, tuple, str, decimal.Decimal): + pass + class FrozenDictTupleStrBoolMixin(frozendict.frozendict, tuple, str, BoolClass): + pass + class FrozenDictTupleDecimalBoolMixin(frozendict.frozendict, tuple, decimal.Decimal, BoolClass): + pass + class FrozenDictStrDecimalBoolMixin(frozendict.frozendict, str, decimal.Decimal, BoolClass): + pass + class TupleStrDecimalBoolMixin(tuple, str, decimal.Decimal, BoolClass): + pass + # qty 5 + class NoneFrozenDictTupleStrDecimalMixin(NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal): + pass + class NoneFrozenDictTupleStrBoolMixin(NoneClass, frozendict.frozendict, tuple, str, BoolClass): + pass + class NoneFrozenDictTupleDecimalBoolMixin(NoneClass, frozendict.frozendict, tuple, decimal.Decimal, BoolClass): + pass + class NoneFrozenDictStrDecimalBoolMixin(NoneClass, frozendict.frozendict, str, decimal.Decimal, BoolClass): + pass + class NoneTupleStrDecimalBoolMixin(NoneClass, tuple, str, decimal.Decimal, BoolClass): + pass + class FrozenDictTupleStrDecimalBoolMixin(frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass): + pass + # qty 6 + class NoneFrozenDictTupleStrDecimalBoolMixin(NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass): + pass + # qty 8 + class NoneFrozenDictTupleStrDecimalBoolFileBytesMixin(NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass, FileIO, bytes): + pass +else: + # qty 1 + class NoneMixin: + _types = {NoneClass} + class FrozenDictMixin: + _types = {frozendict.frozendict} + class TupleMixin: + _types = {tuple} + class StrMixin: + _types = {str} + class DecimalMixin: + _types = {decimal.Decimal} + class BoolMixin: + _types = {BoolClass} + class BytesMixin: + _types = {bytes} + class FileMixin: + _types = {FileIO} + # qty 2 + class BinaryMixin: + _types = {bytes, FileIO} + class NoneFrozenDictMixin: + _types = {NoneClass, frozendict.frozendict} + class NoneTupleMixin: + _types = {NoneClass, tuple} + class NoneStrMixin: + _types = {NoneClass, str} + class NoneDecimalMixin: + _types = {NoneClass, decimal.Decimal} + class NoneBoolMixin: + _types = {NoneClass, BoolClass} + class FrozenDictTupleMixin: + _types = {frozendict.frozendict, tuple} + class FrozenDictStrMixin: + _types = {frozendict.frozendict, str} + class FrozenDictDecimalMixin: + _types = {frozendict.frozendict, decimal.Decimal} + class FrozenDictBoolMixin: + _types = {frozendict.frozendict, BoolClass} + class TupleStrMixin: + _types = {tuple, str} + class TupleDecimalMixin: + _types = {tuple, decimal.Decimal} + class TupleBoolMixin: + _types = {tuple, BoolClass} + class StrDecimalMixin: + _types = {str, decimal.Decimal} + class StrBoolMixin: + _types = {str, BoolClass} + class DecimalBoolMixin: + _types = {decimal.Decimal, BoolClass} + # qty 3 + class NoneFrozenDictTupleMixin: + _types = {NoneClass, frozendict.frozendict, tuple} + class NoneFrozenDictStrMixin: + _types = {NoneClass, frozendict.frozendict, str} + class NoneFrozenDictDecimalMixin: + _types = {NoneClass, frozendict.frozendict, decimal.Decimal} + class NoneFrozenDictBoolMixin: + _types = {NoneClass, frozendict.frozendict, BoolClass} + class NoneTupleStrMixin: + _types = {NoneClass, tuple, str} + class NoneTupleDecimalMixin: + _types = {NoneClass, tuple, decimal.Decimal} + class NoneTupleBoolMixin: + _types = {NoneClass, tuple, BoolClass} + class NoneStrDecimalMixin: + _types = {NoneClass, str, decimal.Decimal} + class NoneStrBoolMixin: + _types = {NoneClass, str, BoolClass} + class NoneDecimalBoolMixin: + _types = {NoneClass, decimal.Decimal, BoolClass} + class FrozenDictTupleStrMixin: + _types = {frozendict.frozendict, tuple, str} + class FrozenDictTupleDecimalMixin: + _types = {frozendict.frozendict, tuple, decimal.Decimal} + class FrozenDictTupleBoolMixin: + _types = {frozendict.frozendict, tuple, BoolClass} + class FrozenDictStrDecimalMixin: + _types = {frozendict.frozendict, str, decimal.Decimal} + class FrozenDictStrBoolMixin: + _types = {frozendict.frozendict, str, BoolClass} + class FrozenDictDecimalBoolMixin: + _types = {frozendict.frozendict, decimal.Decimal, BoolClass} + class TupleStrDecimalMixin: + _types = {tuple, str, decimal.Decimal} + class TupleStrBoolMixin: + _types = {tuple, str, BoolClass} + class TupleDecimalBoolMixin: + _types = {tuple, decimal.Decimal, BoolClass} + class StrDecimalBoolMixin: + _types = {str, decimal.Decimal, BoolClass} + # qty 4 + class NoneFrozenDictTupleStrMixin: + _types = {NoneClass, frozendict.frozendict, tuple, str} + class NoneFrozenDictTupleDecimalMixin: + _types = {NoneClass, frozendict.frozendict, tuple, decimal.Decimal} + class NoneFrozenDictTupleBoolMixin: + _types = {NoneClass, frozendict.frozendict, tuple, BoolClass} + class NoneFrozenDictStrDecimalMixin: + _types = {NoneClass, frozendict.frozendict, str, decimal.Decimal} + class NoneFrozenDictStrBoolMixin: + _types = {NoneClass, frozendict.frozendict, str, BoolClass} + class NoneFrozenDictDecimalBoolMixin: + _types = {NoneClass, frozendict.frozendict, decimal.Decimal, BoolClass} + class NoneTupleStrDecimalMixin: + _types = {NoneClass, tuple, str, decimal.Decimal} + class NoneTupleStrBoolMixin: + _types = {NoneClass, tuple, str, BoolClass} + class NoneTupleDecimalBoolMixin: + _types = {NoneClass, tuple, decimal.Decimal, BoolClass} + class NoneStrDecimalBoolMixin: + _types = {NoneClass, str, decimal.Decimal, BoolClass} + class FrozenDictTupleStrDecimalMixin: + _types = {frozendict.frozendict, tuple, str, decimal.Decimal} + class FrozenDictTupleStrBoolMixin: + _types = {frozendict.frozendict, tuple, str, BoolClass} + class FrozenDictTupleDecimalBoolMixin: + _types = {frozendict.frozendict, tuple, decimal.Decimal, BoolClass} + class FrozenDictStrDecimalBoolMixin: + _types = {frozendict.frozendict, str, decimal.Decimal, BoolClass} + class TupleStrDecimalBoolMixin: + _types = {tuple, str, decimal.Decimal, BoolClass} + # qty 5 + class NoneFrozenDictTupleStrDecimalMixin: + _types = {NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal} + class NoneFrozenDictTupleStrBoolMixin: + _types = {NoneClass, frozendict.frozendict, tuple, str, BoolClass} + class NoneFrozenDictTupleDecimalBoolMixin: + _types = {NoneClass, frozendict.frozendict, tuple, decimal.Decimal, BoolClass} + class NoneFrozenDictStrDecimalBoolMixin: + _types = {NoneClass, frozendict.frozendict, str, decimal.Decimal, BoolClass} + class NoneTupleStrDecimalBoolMixin: + _types = {NoneClass, tuple, str, decimal.Decimal, BoolClass} + class FrozenDictTupleStrDecimalBoolMixin: + _types = {frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass} + # qty 6 + class NoneFrozenDictTupleStrDecimalBoolMixin: + _types = {NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass} + # qty 8 + class NoneFrozenDictTupleStrDecimalBoolFileBytesMixin: + _types = {NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass, FileIO, bytes} + + +class ValidatorBase: + @staticmethod + def _is_json_validation_enabled_oapg(schema_keyword, configuration=None): + """Returns true if JSON schema validation is enabled for the specified + validation keyword. This can be used to skip JSON schema structural validation + as requested in the configuration. + Note: the suffix _oapg stands for openapi python (experimental) generator and + it has been added to prevent collisions with other methods and properties + + Args: + schema_keyword (string): the name of a JSON schema validation keyword. + configuration (Configuration): the configuration class. + """ + + return (configuration is None or + not hasattr(configuration, '_disabled_client_side_validations') or + schema_keyword not in configuration._disabled_client_side_validations) + + @staticmethod + def _raise_validation_error_message_oapg(value, constraint_msg, constraint_value, path_to_item, additional_txt=""): + raise ApiValueError( + "Invalid value `{value}`, {constraint_msg} `{constraint_value}`{additional_txt} at {path_to_item}".format( + value=value, + constraint_msg=constraint_msg, + constraint_value=constraint_value, + additional_txt=additional_txt, + path_to_item=path_to_item, + ) + ) + + +class EnumBase: + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: ValidationMetadata, + ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: + """ + EnumBase _validate_oapg + Validates that arg is in the enum's allowed values + """ + try: + cls.MetaOapg.enum_value_to_name[arg] + except KeyError: + raise ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, cls.MetaOapg.enum_value_to_name.keys())) + return super()._validate_oapg(arg, validation_metadata=validation_metadata) + + +class BoolBase: + def is_true_oapg(self) -> bool: + """ + A replacement for x is True + True if the instance is a BoolClass True Singleton + """ + if not issubclass(self.__class__, BoolClass): + return False + return bool(self) + + def is_false_oapg(self) -> bool: + """ + A replacement for x is False + True if the instance is a BoolClass False Singleton + """ + if not issubclass(self.__class__, BoolClass): + return False + return bool(self) is False + + +class NoneBase: + def is_none_oapg(self) -> bool: + """ + A replacement for x is None + True if the instance is a NoneClass None Singleton + """ + if issubclass(self.__class__, NoneClass): + return True + return False + + +class StrBase(ValidatorBase): + MetaOapg: MetaOapgTyped + + @property + def as_str_oapg(self) -> str: + return self + + @property + def as_date_oapg(self) -> date: + raise Exception('not implemented') + + @property + def as_datetime_oapg(self) -> datetime: + raise Exception('not implemented') + + @property + def as_decimal_oapg(self) -> decimal.Decimal: + raise Exception('not implemented') + + @property + def as_uuid_oapg(self) -> uuid.UUID: + raise Exception('not implemented') + + @classmethod + def __check_str_validations( + cls, + arg: str, + validation_metadata: ValidationMetadata + ): + if not hasattr(cls, 'MetaOapg'): + return + if (cls._is_json_validation_enabled_oapg('maxLength', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'max_length') and + len(arg) > cls.MetaOapg.max_length): + cls._raise_validation_error_message_oapg( + value=arg, + constraint_msg="length must be less than or equal to", + constraint_value=cls.MetaOapg.max_length, + path_to_item=validation_metadata.path_to_item + ) + + if (cls._is_json_validation_enabled_oapg('minLength', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'min_length') and + len(arg) < cls.MetaOapg.min_length): + cls._raise_validation_error_message_oapg( + value=arg, + constraint_msg="length must be greater than or equal to", + constraint_value=cls.MetaOapg.min_length, + path_to_item=validation_metadata.path_to_item + ) + + if (cls._is_json_validation_enabled_oapg('pattern', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'regex')): + for regex_dict in cls.MetaOapg.regex: + flags = regex_dict.get('flags', 0) + if not re.search(regex_dict['pattern'], arg, flags=flags): + if flags != 0: + # Don't print the regex flags if the flags are not + # specified in the OAS document. + cls._raise_validation_error_message_oapg( + value=arg, + constraint_msg="must match regular expression", + constraint_value=regex_dict['pattern'], + path_to_item=validation_metadata.path_to_item, + additional_txt=" with flags=`{}`".format(flags) + ) + cls._raise_validation_error_message_oapg( + value=arg, + constraint_msg="must match regular expression", + constraint_value=regex_dict['pattern'], + path_to_item=validation_metadata.path_to_item + ) + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: ValidationMetadata, + ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: + """ + StrBase _validate_oapg + Validates that validations pass + """ + if isinstance(arg, str): + cls.__check_str_validations(arg, validation_metadata) + return super()._validate_oapg(arg, validation_metadata=validation_metadata) + + +class UUIDBase: + @property + @functools.lru_cache() + def as_uuid_oapg(self) -> uuid.UUID: + return uuid.UUID(self) + + @classmethod + def __validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): + if isinstance(arg, str): + try: + uuid.UUID(arg) + return True + except ValueError: + raise ApiValueError( + "Invalid value '{}' for type UUID at {}".format(arg, validation_metadata.path_to_item) + ) + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: typing.Optional[ValidationMetadata] = None, + ): + """ + UUIDBase _validate_oapg + """ + cls.__validate_format(arg, validation_metadata=validation_metadata) + return super()._validate_oapg(arg, validation_metadata=validation_metadata) + + +class CustomIsoparser(isoparser): + + @_takes_ascii + def parse_isodatetime(self, dt_str): + components, pos = self._parse_isodate(dt_str) + if len(dt_str) > pos: + if self._sep is None or dt_str[pos:pos + 1] == self._sep: + components += self._parse_isotime(dt_str[pos + 1:]) + else: + raise ValueError('String contains unknown ISO components') + + if len(components) > 3 and components[3] == 24: + components[3] = 0 + return datetime(*components) + timedelta(days=1) + + if len(components) <= 3: + raise ValueError('Value is not a datetime') + + return datetime(*components) + + @_takes_ascii + def parse_isodate(self, datestr): + components, pos = self._parse_isodate(datestr) + + if len(datestr) > pos: + raise ValueError('String contains invalid time components') + + if len(components) > 3: + raise ValueError('String contains invalid time components') + + return date(*components) + + +DEFAULT_ISOPARSER = CustomIsoparser() + + +class DateBase: + @property + @functools.lru_cache() + def as_date_oapg(self) -> date: + return DEFAULT_ISOPARSER.parse_isodate(self) + + @classmethod + def __validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): + if isinstance(arg, str): + try: + DEFAULT_ISOPARSER.parse_isodate(arg) + return True + except ValueError: + raise ApiValueError( + "Value does not conform to the required ISO-8601 date format. " + "Invalid value '{}' for type date at {}".format(arg, validation_metadata.path_to_item) + ) + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: typing.Optional[ValidationMetadata] = None, + ): + """ + DateBase _validate_oapg + """ + cls.__validate_format(arg, validation_metadata=validation_metadata) + return super()._validate_oapg(arg, validation_metadata=validation_metadata) + + +class DateTimeBase: + @property + @functools.lru_cache() + def as_datetime_oapg(self) -> datetime: + return DEFAULT_ISOPARSER.parse_isodatetime(self) + + @classmethod + def __validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): + if isinstance(arg, str): + try: + DEFAULT_ISOPARSER.parse_isodatetime(arg) + return True + except ValueError: + raise ApiValueError( + "Value does not conform to the required ISO-8601 datetime format. " + "Invalid value '{}' for type datetime at {}".format(arg, validation_metadata.path_to_item) + ) + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: ValidationMetadata, + ): + """ + DateTimeBase _validate_oapg + """ + cls.__validate_format(arg, validation_metadata=validation_metadata) + return super()._validate_oapg(arg, validation_metadata=validation_metadata) + + +class DecimalBase: + """ + A class for storing decimals that are sent over the wire as strings + These schemas must remain based on StrBase rather than NumberBase + because picking base classes must be deterministic + """ + + @property + @functools.lru_cache() + def as_decimal_oapg(self) -> decimal.Decimal: + return decimal.Decimal(self) + + @classmethod + def __validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): + if isinstance(arg, str): + try: + decimal.Decimal(arg) + return True + except decimal.InvalidOperation: + raise ApiValueError( + "Value cannot be converted to a decimal. " + "Invalid value '{}' for type decimal at {}".format(arg, validation_metadata.path_to_item) + ) + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: ValidationMetadata, + ): + """ + DecimalBase _validate_oapg + """ + cls.__validate_format(arg, validation_metadata=validation_metadata) + return super()._validate_oapg(arg, validation_metadata=validation_metadata) + + +class NumberBase(ValidatorBase): + MetaOapg: MetaOapgTyped + + @property + def as_int_oapg(self) -> int: + try: + return self._as_int + except AttributeError: + """ + Note: for some numbers like 9.0 they could be represented as an + integer but our code chooses to store them as + >>> Decimal('9.0').as_tuple() + DecimalTuple(sign=0, digits=(9, 0), exponent=-1) + so we can tell that the value came from a float and convert it back to a float + during later serialization + """ + if self.as_tuple().exponent < 0: + # this could be represented as an integer but should be represented as a float + # because that's what it was serialized from + raise ApiValueError(f'{self} is not an integer') + self._as_int = int(self) + return self._as_int + + @property + def as_float_oapg(self) -> float: + try: + return self._as_float + except AttributeError: + if self.as_tuple().exponent >= 0: + raise ApiValueError(f'{self} is not a float') + self._as_float = float(self) + return self._as_float + + @classmethod + def __check_numeric_validations( + cls, + arg, + validation_metadata: ValidationMetadata + ): + if not hasattr(cls, 'MetaOapg'): + return + if cls._is_json_validation_enabled_oapg('multipleOf', + validation_metadata.configuration) and hasattr(cls.MetaOapg, 'multiple_of'): + multiple_of_value = cls.MetaOapg.multiple_of + if (not (float(arg) / multiple_of_value).is_integer()): + # Note 'multipleOf' will be as good as the floating point arithmetic. + cls._raise_validation_error_message_oapg( + value=arg, + constraint_msg="value must be a multiple of", + constraint_value=multiple_of_value, + path_to_item=validation_metadata.path_to_item + ) + + checking_max_or_min_values = any( + hasattr(cls.MetaOapg, validation_key) for validation_key in { + 'exclusive_maximum', + 'inclusive_maximum', + 'exclusive_minimum', + 'inclusive_minimum', + } + ) + if not checking_max_or_min_values: + return + + if (cls._is_json_validation_enabled_oapg('exclusiveMaximum', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'exclusive_maximum') and + arg >= cls.MetaOapg.exclusive_maximum): + cls._raise_validation_error_message_oapg( + value=arg, + constraint_msg="must be a value less than", + constraint_value=cls.MetaOapg.exclusive_maximum, + path_to_item=validation_metadata.path_to_item + ) + + if (cls._is_json_validation_enabled_oapg('maximum', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'inclusive_maximum') and + arg > cls.MetaOapg.inclusive_maximum): + cls._raise_validation_error_message_oapg( + value=arg, + constraint_msg="must be a value less than or equal to", + constraint_value=cls.MetaOapg.inclusive_maximum, + path_to_item=validation_metadata.path_to_item + ) + + if (cls._is_json_validation_enabled_oapg('exclusiveMinimum', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'exclusive_minimum') and + arg <= cls.MetaOapg.exclusive_minimum): + cls._raise_validation_error_message_oapg( + value=arg, + constraint_msg="must be a value greater than", + constraint_value=cls.MetaOapg.exclusive_maximum, + path_to_item=validation_metadata.path_to_item + ) + + if (cls._is_json_validation_enabled_oapg('minimum', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'inclusive_minimum') and + arg < cls.MetaOapg.inclusive_minimum): + cls._raise_validation_error_message_oapg( + value=arg, + constraint_msg="must be a value greater than or equal to", + constraint_value=cls.MetaOapg.inclusive_minimum, + path_to_item=validation_metadata.path_to_item + ) + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: ValidationMetadata, + ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: + """ + NumberBase _validate_oapg + Validates that validations pass + """ + if isinstance(arg, decimal.Decimal): + cls.__check_numeric_validations(arg, validation_metadata) + return super()._validate_oapg(arg, validation_metadata=validation_metadata) + + +class ListBase(ValidatorBase): + MetaOapg: MetaOapgTyped + + @classmethod + def __validate_items(cls, list_items, validation_metadata: ValidationMetadata): + """ + Ensures that: + - values passed in for items are valid + Exceptions will be raised if: + - invalid arguments were passed in + + Args: + list_items: the input list of items + + Raises: + ApiTypeError - for missing required arguments, or for invalid properties + """ + + # if we have definitions for an items schema, use it + # otherwise accept anything + item_cls = getattr(cls.MetaOapg, 'items', UnsetAnyTypeSchema) + item_cls = cls._get_class_oapg(item_cls) + path_to_schemas = {} + for i, value in enumerate(list_items): + item_validation_metadata = ValidationMetadata( + from_server=validation_metadata.from_server, + configuration=validation_metadata.configuration, + path_to_item=validation_metadata.path_to_item+(i,), + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if item_validation_metadata.validation_ran_earlier(item_cls): + add_deeper_validated_schemas(item_validation_metadata, path_to_schemas) + continue + other_path_to_schemas = item_cls._validate_oapg( + value, validation_metadata=item_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + @classmethod + def __check_tuple_validations( + cls, arg, + validation_metadata: ValidationMetadata): + if not hasattr(cls, 'MetaOapg'): + return + if (cls._is_json_validation_enabled_oapg('maxItems', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'max_items') and + len(arg) > cls.MetaOapg.max_items): + cls._raise_validation_error_message_oapg( + value=arg, + constraint_msg="number of items must be less than or equal to", + constraint_value=cls.MetaOapg.max_items, + path_to_item=validation_metadata.path_to_item + ) + + if (cls._is_json_validation_enabled_oapg('minItems', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'min_items') and + len(arg) < cls.MetaOapg.min_items): + cls._raise_validation_error_message_oapg( + value=arg, + constraint_msg="number of items must be greater than or equal to", + constraint_value=cls.MetaOapg.min_items, + path_to_item=validation_metadata.path_to_item + ) + + if (cls._is_json_validation_enabled_oapg('uniqueItems', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'unique_items') and cls.MetaOapg.unique_items and arg): + unique_items = set(arg) + if len(arg) > len(unique_items): + cls._raise_validation_error_message_oapg( + value=arg, + constraint_msg="duplicate items were found, and the tuple must not contain duplicates because", + constraint_value='unique_items==True', + path_to_item=validation_metadata.path_to_item + ) + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: ValidationMetadata, + ): + """ + ListBase _validate_oapg + We return dynamic classes of different bases depending upon the inputs + This makes it so: + - the returned instance is always a subclass of our defining schema + - this allows us to check type based on whether an instance is a subclass of a schema + - the returned instance is a serializable type (except for None, True, and False) which are enums + + Returns: + new_cls (type): the new class + + Raises: + ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes + ApiTypeError: when the input type is not in the list of allowed spec types + """ + if isinstance(arg, tuple): + cls.__check_tuple_validations(arg, validation_metadata) + _path_to_schemas = super()._validate_oapg(arg, validation_metadata=validation_metadata) + if not isinstance(arg, tuple): + return _path_to_schemas + updated_vm = ValidationMetadata( + configuration=validation_metadata.configuration, + from_server=validation_metadata.from_server, + path_to_item=validation_metadata.path_to_item, + seen_classes=validation_metadata.seen_classes | frozenset({cls}), + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + other_path_to_schemas = cls.__validate_items(arg, validation_metadata=updated_vm) + update(_path_to_schemas, other_path_to_schemas) + return _path_to_schemas + + @classmethod + def _get_items_oapg( + cls: 'Schema', + arg: typing.List[typing.Any], + path_to_item: typing.Tuple[typing.Union[str, int], ...], + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']] + ): + ''' + ListBase _get_items_oapg + ''' + cast_items = [] + + for i, value in enumerate(arg): + item_path_to_item = path_to_item + (i,) + item_cls = path_to_schemas[item_path_to_item] + new_value = item_cls._get_new_instance_without_conversion_oapg( + value, + item_path_to_item, + path_to_schemas + ) + cast_items.append(new_value) + + return cast_items + + +class Discriminable: + MetaOapg: MetaOapgTyped + + @classmethod + def _ensure_discriminator_value_present_oapg(cls, disc_property_name: str, validation_metadata: ValidationMetadata, *args): + if not args or args and disc_property_name not in args[0]: + # The input data does not contain the discriminator property + raise ApiValueError( + "Cannot deserialize input data due to missing discriminator. " + "The discriminator property '{}' is missing at path: {}".format(disc_property_name, validation_metadata.path_to_item) + ) + + @classmethod + def get_discriminated_class_oapg(cls, disc_property_name: str, disc_payload_value: str): + """ + Used in schemas with discriminators + """ + if not hasattr(cls.MetaOapg, 'discriminator'): + return None + disc = cls.MetaOapg.discriminator() + if disc_property_name not in disc: + return None + discriminated_cls = disc[disc_property_name].get(disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + if not hasattr(cls, 'MetaOapg'): + return None + elif not ( + hasattr(cls.MetaOapg, 'all_of') or + hasattr(cls.MetaOapg, 'one_of') or + hasattr(cls.MetaOapg, 'any_of') + ): + return None + # TODO stop traveling if a cycle is hit + if hasattr(cls.MetaOapg, 'all_of'): + for allof_cls in cls.MetaOapg.all_of(): + discriminated_cls = allof_cls.get_discriminated_class_oapg( + disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + if hasattr(cls.MetaOapg, 'one_of'): + for oneof_cls in cls.MetaOapg.one_of(): + discriminated_cls = oneof_cls.get_discriminated_class_oapg( + disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + if hasattr(cls.MetaOapg, 'any_of'): + for anyof_cls in cls.MetaOapg.any_of(): + discriminated_cls = anyof_cls.get_discriminated_class_oapg( + disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + return None + + +class DictBase(Discriminable, ValidatorBase): + + @classmethod + def __validate_arg_presence(cls, arg): + """ + Ensures that: + - all required arguments are passed in + - the input variable names are valid + - present in properties or + - accepted because additionalProperties exists + Exceptions will be raised if: + - invalid arguments were passed in + - a var_name is invalid if additional_properties == NotAnyTypeSchema + and var_name not in properties.__annotations__ + - required properties were not passed in + + Args: + arg: the input dict + + Raises: + ApiTypeError - for missing required arguments, or for invalid properties + """ + seen_required_properties = set() + invalid_arguments = [] + required_property_names = getattr(cls.MetaOapg, 'required', set()) + additional_properties = getattr(cls.MetaOapg, 'additional_properties', UnsetAnyTypeSchema) + properties = getattr(cls.MetaOapg, 'properties', {}) + property_annotations = getattr(properties, '__annotations__', {}) + for property_name in arg: + if property_name in required_property_names: + seen_required_properties.add(property_name) + elif property_name in property_annotations: + continue + elif additional_properties is not NotAnyTypeSchema: + continue + else: + invalid_arguments.append(property_name) + missing_required_arguments = list(required_property_names - seen_required_properties) + if missing_required_arguments: + missing_required_arguments.sort() + raise ApiTypeError( + "{} is missing {} required argument{}: {}".format( + cls.__name__, + len(missing_required_arguments), + "s" if len(missing_required_arguments) > 1 else "", + missing_required_arguments + ) + ) + if invalid_arguments: + invalid_arguments.sort() + raise ApiTypeError( + "{} was passed {} invalid argument{}: {}".format( + cls.__name__, + len(invalid_arguments), + "s" if len(invalid_arguments) > 1 else "", + invalid_arguments + ) + ) + + @classmethod + def __validate_args(cls, arg, validation_metadata: ValidationMetadata): + """ + Ensures that: + - values passed in for properties are valid + Exceptions will be raised if: + - invalid arguments were passed in + + Args: + arg: the input dict + + Raises: + ApiTypeError - for missing required arguments, or for invalid properties + """ + path_to_schemas = {} + additional_properties = getattr(cls.MetaOapg, 'additional_properties', UnsetAnyTypeSchema) + properties = getattr(cls.MetaOapg, 'properties', {}) + property_annotations = getattr(properties, '__annotations__', {}) + for property_name, value in arg.items(): + path_to_item = validation_metadata.path_to_item+(property_name,) + if property_name in property_annotations: + schema = property_annotations[property_name] + elif additional_properties is not NotAnyTypeSchema: + if additional_properties is UnsetAnyTypeSchema: + """ + If additionalProperties is unset and this path_to_item does not yet have + any validations on it, validate it. + If it already has validations on it, skip this validation. + """ + if path_to_item in path_to_schemas: + continue + schema = additional_properties + else: + raise ApiTypeError('Unable to find schema for value={} in class={} at path_to_item={}'.format( + value, cls, validation_metadata.path_to_item+(property_name,) + )) + schema = cls._get_class_oapg(schema) + arg_validation_metadata = ValidationMetadata( + from_server=validation_metadata.from_server, + configuration=validation_metadata.configuration, + path_to_item=path_to_item, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if arg_validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate_oapg(value, validation_metadata=arg_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + @classmethod + def __check_dict_validations( + cls, + arg, + validation_metadata: ValidationMetadata + ): + if not hasattr(cls, 'MetaOapg'): + return + if (cls._is_json_validation_enabled_oapg('maxProperties', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'max_properties') and + len(arg) > cls.MetaOapg.max_properties): + cls._raise_validation_error_message_oapg( + value=arg, + constraint_msg="number of properties must be less than or equal to", + constraint_value=cls.MetaOapg.max_properties, + path_to_item=validation_metadata.path_to_item + ) + + if (cls._is_json_validation_enabled_oapg('minProperties', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'min_properties') and + len(arg) < cls.MetaOapg.min_properties): + cls._raise_validation_error_message_oapg( + value=arg, + constraint_msg="number of properties must be greater than or equal to", + constraint_value=cls.MetaOapg.min_properties, + path_to_item=validation_metadata.path_to_item + ) + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: ValidationMetadata, + ): + """ + DictBase _validate_oapg + We return dynamic classes of different bases depending upon the inputs + This makes it so: + - the returned instance is always a subclass of our defining schema + - this allows us to check type based on whether an instance is a subclass of a schema + - the returned instance is a serializable type (except for None, True, and False) which are enums + + Returns: + new_cls (type): the new class + + Raises: + ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes + ApiTypeError: when the input type is not in the list of allowed spec types + """ + if isinstance(arg, frozendict.frozendict): + cls.__check_dict_validations(arg, validation_metadata) + _path_to_schemas = super()._validate_oapg(arg, validation_metadata=validation_metadata) + if not isinstance(arg, frozendict.frozendict): + return _path_to_schemas + cls.__validate_arg_presence(arg) + other_path_to_schemas = cls.__validate_args(arg, validation_metadata=validation_metadata) + update(_path_to_schemas, other_path_to_schemas) + try: + discriminator = cls.MetaOapg.discriminator() + except AttributeError: + return _path_to_schemas + # discriminator exists + disc_prop_name = list(discriminator.keys())[0] + cls._ensure_discriminator_value_present_oapg(disc_prop_name, validation_metadata, arg) + discriminated_cls = cls.get_discriminated_class_oapg( + disc_property_name=disc_prop_name, disc_payload_value=arg[disc_prop_name]) + if discriminated_cls is None: + raise ApiValueError( + "Invalid discriminator value was passed in to {}.{} Only the values {} are allowed at {}".format( + cls.__name__, + disc_prop_name, + list(discriminator[disc_prop_name].keys()), + validation_metadata.path_to_item + (disc_prop_name,) + ) + ) + updated_vm = ValidationMetadata( + configuration=validation_metadata.configuration, + from_server=validation_metadata.from_server, + path_to_item=validation_metadata.path_to_item, + seen_classes=validation_metadata.seen_classes | frozenset({cls}), + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if updated_vm.validation_ran_earlier(discriminated_cls): + add_deeper_validated_schemas(updated_vm, _path_to_schemas) + return _path_to_schemas + other_path_to_schemas = discriminated_cls._validate_oapg(arg, validation_metadata=updated_vm) + update(_path_to_schemas, other_path_to_schemas) + return _path_to_schemas + + @classmethod + def _get_properties_oapg( + cls, + arg: typing.Dict[str, typing.Any], + path_to_item: typing.Tuple[typing.Union[str, int], ...], + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']] + ): + """ + DictBase _get_properties_oapg, this is how properties are set + These values already passed validation + """ + dict_items = {} + + for property_name_js, value in arg.items(): + property_path_to_item = path_to_item + (property_name_js,) + property_cls = path_to_schemas[property_path_to_item] + new_value = property_cls._get_new_instance_without_conversion_oapg( + value, + property_path_to_item, + path_to_schemas + ) + dict_items[property_name_js] = new_value + + return dict_items + + def __setattr__(self, name: str, value: typing.Any): + if not isinstance(self, FileIO): + raise AttributeError('property setting not supported on immutable instances') + + def __getattr__(self, name: str): + """ + for instance.name access + Properties are only type hinted for required properties + so that hasattr(instance, 'optionalProp') is False when that key is not present + """ + if not isinstance(self, frozendict.frozendict): + return super().__getattr__(name) + if name not in self.__class__.__annotations__: + raise AttributeError(f"{self} has no attribute '{name}'") + try: + value = self[name] + return value + except KeyError as ex: + raise AttributeError(str(ex)) + + def __getitem__(self, name: str): + """ + dict_instance[name] accessor + key errors thrown + """ + if not isinstance(self, frozendict.frozendict): + return super().__getattr__(name) + return super().__getitem__(name) + + def get_item_oapg(self, name: str) -> typing.Union['AnyTypeSchema', Unset]: + # dict_instance[name] accessor + if not isinstance(self, frozendict.frozendict): + raise NotImplementedError() + try: + return super().__getitem__(name) + except KeyError: + return unset + + +def cast_to_allowed_types( + arg: typing.Union[str, date, datetime, uuid.UUID, decimal.Decimal, int, float, None, dict, frozendict.frozendict, list, tuple, bytes, Schema, io.FileIO, io.BufferedReader], + from_server: bool, + validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]], + path_to_item: typing.Tuple[typing.Union[str, int], ...] = tuple(['args[0]']), +) -> typing.Union[frozendict.frozendict, tuple, decimal.Decimal, str, bytes, BoolClass, NoneClass, FileIO]: + """ + Casts the input payload arg into the allowed types + The input validated_path_to_schemas is mutated by running this function + + When from_server is False then + - date/datetime is cast to str + - int/float is cast to Decimal + + If a Schema instance is passed in it is converted back to a primitive instance because + One may need to validate that data to the original Schema class AND additional different classes + those additional classes will need to be added to the new manufactured class for that payload + If the code didn't do this and kept the payload as a Schema instance it would fail to validate to other + Schema classes and the code wouldn't be able to mfg a new class that includes all valid schemas + TODO: store the validated schema classes in validation_metadata + + Args: + arg: the payload + from_server: whether this payload came from the server or not + validated_path_to_schemas: a dict that stores the validated classes at any path location in the payload + """ + if isinstance(arg, Schema): + # store the already run validations + schema_classes = set() + for cls in arg.__class__.__bases__: + if cls is Singleton: + # Skip Singleton + continue + schema_classes.add(cls) + validated_path_to_schemas[path_to_item] = schema_classes + + type_error = ApiTypeError(f"Invalid type. Required value type is str and passed type was {type(arg)} at {path_to_item}") + if isinstance(arg, str): + return str(arg) + elif isinstance(arg, (dict, frozendict.frozendict)): + return frozendict.frozendict({key: cast_to_allowed_types(val, from_server, validated_path_to_schemas, path_to_item + (key,)) for key, val in arg.items()}) + elif isinstance(arg, (bool, BoolClass)): + """ + this check must come before isinstance(arg, (int, float)) + because isinstance(True, int) is True + """ + if arg: + return BoolClass.TRUE + return BoolClass.FALSE + elif isinstance(arg, int): + return decimal.Decimal(arg) + elif isinstance(arg, float): + decimal_from_float = decimal.Decimal(arg) + if decimal_from_float.as_integer_ratio()[1] == 1: + # 9.0 -> Decimal('9.0') + # 3.4028234663852886e+38 -> Decimal('340282346638528859811704183484516925440.0') + return decimal.Decimal(str(decimal_from_float)+'.0') + return decimal_from_float + elif isinstance(arg, (tuple, list)): + return tuple([cast_to_allowed_types(item, from_server, validated_path_to_schemas, path_to_item + (i,)) for i, item in enumerate(arg)]) + elif isinstance(arg, (none_type, NoneClass)): + return NoneClass.NONE + elif isinstance(arg, (date, datetime)): + if not from_server: + return arg.isoformat() + raise type_error + elif isinstance(arg, uuid.UUID): + if not from_server: + return str(arg) + raise type_error + elif isinstance(arg, decimal.Decimal): + return decimal.Decimal(arg) + elif isinstance(arg, bytes): + return bytes(arg) + elif isinstance(arg, (io.FileIO, io.BufferedReader)): + return FileIO(arg) + raise ValueError('Invalid type passed in got input={} type={}'.format(arg, type(arg))) + + +class ComposedBase(Discriminable): + + @classmethod + def __get_allof_classes(cls, arg, validation_metadata: ValidationMetadata): + path_to_schemas = defaultdict(set) + for allof_cls in cls.MetaOapg.all_of(): + if validation_metadata.validation_ran_earlier(allof_cls): + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + other_path_to_schemas = allof_cls._validate_oapg(arg, validation_metadata=validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + @classmethod + def __get_oneof_class( + cls, + arg, + discriminated_cls, + validation_metadata: ValidationMetadata, + ): + oneof_classes = [] + path_to_schemas = defaultdict(set) + for oneof_cls in cls.MetaOapg.one_of(): + if oneof_cls in path_to_schemas[validation_metadata.path_to_item]: + oneof_classes.append(oneof_cls) + continue + if validation_metadata.validation_ran_earlier(oneof_cls): + oneof_classes.append(oneof_cls) + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + try: + path_to_schemas = oneof_cls._validate_oapg(arg, validation_metadata=validation_metadata) + except (ApiValueError, ApiTypeError) as ex: + if discriminated_cls is not None and oneof_cls is discriminated_cls: + raise ex + continue + oneof_classes.append(oneof_cls) + if not oneof_classes: + raise ApiValueError( + "Invalid inputs given to generate an instance of {}. None " + "of the oneOf schemas matched the input data.".format(cls) + ) + elif len(oneof_classes) > 1: + raise ApiValueError( + "Invalid inputs given to generate an instance of {}. Multiple " + "oneOf schemas {} matched the inputs, but a max of one is allowed.".format(cls, oneof_classes) + ) + # exactly one class matches + return path_to_schemas + + @classmethod + def __get_anyof_classes( + cls, + arg, + discriminated_cls, + validation_metadata: ValidationMetadata + ): + anyof_classes = [] + path_to_schemas = defaultdict(set) + for anyof_cls in cls.MetaOapg.any_of(): + if validation_metadata.validation_ran_earlier(anyof_cls): + anyof_classes.append(anyof_cls) + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + + try: + other_path_to_schemas = anyof_cls._validate_oapg(arg, validation_metadata=validation_metadata) + except (ApiValueError, ApiTypeError) as ex: + if discriminated_cls is not None and anyof_cls is discriminated_cls: + raise ex + continue + anyof_classes.append(anyof_cls) + update(path_to_schemas, other_path_to_schemas) + if not anyof_classes: + raise ApiValueError( + "Invalid inputs given to generate an instance of {}. None " + "of the anyOf schemas matched the input data.".format(cls) + ) + return path_to_schemas + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: ValidationMetadata, + ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: + """ + ComposedBase _validate_oapg + We return dynamic classes of different bases depending upon the inputs + This makes it so: + - the returned instance is always a subclass of our defining schema + - this allows us to check type based on whether an instance is a subclass of a schema + - the returned instance is a serializable type (except for None, True, and False) which are enums + + Returns: + new_cls (type): the new class + + Raises: + ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes + ApiTypeError: when the input type is not in the list of allowed spec types + """ + # validation checking on types, validations, and enums + path_to_schemas = super()._validate_oapg(arg, validation_metadata=validation_metadata) + + updated_vm = ValidationMetadata( + configuration=validation_metadata.configuration, + from_server=validation_metadata.from_server, + path_to_item=validation_metadata.path_to_item, + seen_classes=validation_metadata.seen_classes | frozenset({cls}), + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + + # process composed schema + discriminator = None + if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'discriminator'): + discriminator = cls.MetaOapg.discriminator() + discriminated_cls = None + if discriminator and arg and isinstance(arg, frozendict.frozendict): + disc_property_name = list(discriminator.keys())[0] + cls._ensure_discriminator_value_present_oapg(disc_property_name, updated_vm, arg) + # get discriminated_cls by looking at the dict in the current class + discriminated_cls = cls.get_discriminated_class_oapg( + disc_property_name=disc_property_name, disc_payload_value=arg[disc_property_name]) + if discriminated_cls is None: + raise ApiValueError( + "Invalid discriminator value '{}' was passed in to {}.{} Only the values {} are allowed at {}".format( + arg[disc_property_name], + cls.__name__, + disc_property_name, + list(discriminator[disc_property_name].keys()), + updated_vm.path_to_item + (disc_property_name,) + ) + ) + + if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'all_of'): + other_path_to_schemas = cls.__get_allof_classes(arg, validation_metadata=updated_vm) + update(path_to_schemas, other_path_to_schemas) + if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'one_of'): + other_path_to_schemas = cls.__get_oneof_class( + arg, + discriminated_cls=discriminated_cls, + validation_metadata=updated_vm + ) + update(path_to_schemas, other_path_to_schemas) + if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'any_of'): + other_path_to_schemas = cls.__get_anyof_classes( + arg, + discriminated_cls=discriminated_cls, + validation_metadata=updated_vm + ) + update(path_to_schemas, other_path_to_schemas) + not_cls = None + if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'not_schema'): + not_cls = cls.MetaOapg.not_schema + not_cls = cls._get_class_oapg(not_cls) + if not_cls: + other_path_to_schemas = None + not_exception = ApiValueError( + "Invalid value '{}' was passed in to {}. Value is invalid because it is disallowed by {}".format( + arg, + cls.__name__, + not_cls.__name__, + ) + ) + if updated_vm.validation_ran_earlier(not_cls): + raise not_exception + + try: + other_path_to_schemas = not_cls._validate_oapg(arg, validation_metadata=updated_vm) + except (ApiValueError, ApiTypeError): + pass + if other_path_to_schemas: + raise not_exception + + if discriminated_cls is not None and not updated_vm.validation_ran_earlier(discriminated_cls): + # TODO use an exception from this package here + add_deeper_validated_schemas(updated_vm, path_to_schemas) + assert discriminated_cls in path_to_schemas[updated_vm.path_to_item] + return path_to_schemas + + +# DictBase, ListBase, NumberBase, StrBase, BoolBase, NoneBase +class ComposedSchema( + ComposedBase, + DictBase, + ListBase, + NumberBase, + StrBase, + BoolBase, + NoneBase, + Schema, + NoneFrozenDictTupleStrDecimalBoolMixin +): + @classmethod + def from_openapi_data_oapg(cls, *args: typing.Any, _configuration: typing.Optional[Configuration] = None, **kwargs): + if not args: + if not kwargs: + raise ApiTypeError('{} is missing required input data in args or kwargs'.format(cls.__name__)) + args = (kwargs, ) + return super().from_openapi_data_oapg(args[0], _configuration=_configuration) + + +class ListSchema( + ListBase, + Schema, + TupleMixin +): + + @classmethod + def from_openapi_data_oapg(cls, arg: typing.List[typing.Any], _configuration: typing.Optional[Configuration] = None): + return super().from_openapi_data_oapg(arg, _configuration=_configuration) + + def __new__(cls, _arg: typing.Union[typing.List[typing.Any], typing.Tuple[typing.Any]], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) + + +class NoneSchema( + NoneBase, + Schema, + NoneMixin +): + + @classmethod + def from_openapi_data_oapg(cls, arg: None, _configuration: typing.Optional[Configuration] = None): + return super().from_openapi_data_oapg(arg, _configuration=_configuration) + + def __new__(cls, _arg: None, **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) + + +class NumberSchema( + NumberBase, + Schema, + DecimalMixin +): + """ + This is used for type: number with no format + Both integers AND floats are accepted + """ + + @classmethod + def from_openapi_data_oapg(cls, arg: typing.Union[int, float], _configuration: typing.Optional[Configuration] = None): + return super().from_openapi_data_oapg(arg, _configuration=_configuration) + + def __new__(cls, _arg: typing.Union[decimal.Decimal, int, float], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) + + +class IntBase: + @property + def as_int_oapg(self) -> int: + try: + return self._as_int + except AttributeError: + self._as_int = int(self) + return self._as_int + + @classmethod + def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): + if isinstance(arg, decimal.Decimal): + + denominator = arg.as_integer_ratio()[-1] + if denominator != 1: + raise ApiValueError( + "Invalid value '{}' for type integer at {}".format(arg, validation_metadata.path_to_item) + ) + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: ValidationMetadata, + ): + """ + IntBase _validate_oapg + TODO what about types = (int, number) -> IntBase, NumberBase? We could drop int and keep number only + """ + cls.__validate_format(arg, validation_metadata=validation_metadata) + return super()._validate_oapg(arg, validation_metadata=validation_metadata) + + +class IntSchema(IntBase, NumberSchema): + + @classmethod + def from_openapi_data_oapg(cls, arg: int, _configuration: typing.Optional[Configuration] = None): + return super().from_openapi_data_oapg(arg, _configuration=_configuration) + + def __new__(cls, _arg: typing.Union[decimal.Decimal, int], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) + + +class Int32Base: + __inclusive_minimum = decimal.Decimal(-2147483648) + __inclusive_maximum = decimal.Decimal(2147483647) + + @classmethod + def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): + if isinstance(arg, decimal.Decimal) and arg.as_tuple().exponent == 0: + if not cls.__inclusive_minimum <= arg <= cls.__inclusive_maximum: + raise ApiValueError( + "Invalid value '{}' for type int32 at {}".format(arg, validation_metadata.path_to_item) + ) + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: ValidationMetadata, + ): + """ + Int32Base _validate_oapg + """ + cls.__validate_format(arg, validation_metadata=validation_metadata) + return super()._validate_oapg(arg, validation_metadata=validation_metadata) + + +class Int32Schema( + Int32Base, + IntSchema +): + pass + + +class Int64Base: + __inclusive_minimum = decimal.Decimal(-9223372036854775808) + __inclusive_maximum = decimal.Decimal(9223372036854775807) + + @classmethod + def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): + if isinstance(arg, decimal.Decimal) and arg.as_tuple().exponent == 0: + if not cls.__inclusive_minimum <= arg <= cls.__inclusive_maximum: + raise ApiValueError( + "Invalid value '{}' for type int64 at {}".format(arg, validation_metadata.path_to_item) + ) + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: ValidationMetadata, + ): + """ + Int64Base _validate_oapg + """ + cls.__validate_format(arg, validation_metadata=validation_metadata) + return super()._validate_oapg(arg, validation_metadata=validation_metadata) + + +class Int64Schema( + Int64Base, + IntSchema +): + pass + + +class Float32Base: + __inclusive_minimum = decimal.Decimal(-3.4028234663852886e+38) + __inclusive_maximum = decimal.Decimal(3.4028234663852886e+38) + + @classmethod + def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): + if isinstance(arg, decimal.Decimal): + if not cls.__inclusive_minimum <= arg <= cls.__inclusive_maximum: + raise ApiValueError( + "Invalid value '{}' for type float at {}".format(arg, validation_metadata.path_to_item) + ) + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: ValidationMetadata, + ): + """ + Float32Base _validate_oapg + """ + cls.__validate_format(arg, validation_metadata=validation_metadata) + return super()._validate_oapg(arg, validation_metadata=validation_metadata) + + +class Float32Schema( + Float32Base, + NumberSchema +): + + @classmethod + def from_openapi_data_oapg(cls, arg: float, _configuration: typing.Optional[Configuration] = None): + return super().from_openapi_data_oapg(arg, _configuration=_configuration) + + +class Float64Base: + __inclusive_minimum = decimal.Decimal(-1.7976931348623157E+308) + __inclusive_maximum = decimal.Decimal(1.7976931348623157E+308) + + @classmethod + def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): + if isinstance(arg, decimal.Decimal): + if not cls.__inclusive_minimum <= arg <= cls.__inclusive_maximum: + raise ApiValueError( + "Invalid value '{}' for type double at {}".format(arg, validation_metadata.path_to_item) + ) + + @classmethod + def _validate_oapg( + cls, + arg, + validation_metadata: ValidationMetadata, + ): + """ + Float64Base _validate_oapg + """ + cls.__validate_format(arg, validation_metadata=validation_metadata) + return super()._validate_oapg(arg, validation_metadata=validation_metadata) + +class Float64Schema( + Float64Base, + NumberSchema +): + + @classmethod + def from_openapi_data_oapg(cls, arg: float, _configuration: typing.Optional[Configuration] = None): + # todo check format + return super().from_openapi_data_oapg(arg, _configuration=_configuration) + + +class StrSchema( + StrBase, + Schema, + StrMixin +): + """ + date + datetime string types must inherit from this class + That is because one can validate a str payload as both: + - type: string (format unset) + - type: string, format: date + """ + + @classmethod + def from_openapi_data_oapg(cls, arg: str, _configuration: typing.Optional[Configuration] = None) -> 'StrSchema': + return super().from_openapi_data_oapg(arg, _configuration=_configuration) + + def __new__(cls, _arg: typing.Union[str, date, datetime, uuid.UUID], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) + + +class UUIDSchema(UUIDBase, StrSchema): + + def __new__(cls, _arg: typing.Union[str, uuid.UUID], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) + + +class DateSchema(DateBase, StrSchema): + + def __new__(cls, _arg: typing.Union[str, date], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) + + +class DateTimeSchema(DateTimeBase, StrSchema): + + def __new__(cls, _arg: typing.Union[str, datetime], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) + + +class DecimalSchema(DecimalBase, StrSchema): + + def __new__(cls, _arg: str, **kwargs: Configuration): + """ + Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads + which can be simple (str) or complex (dicts or lists with nested values) + Because casting is only done once and recursively casts all values prior to validation then for a potential + client side Decimal input if Decimal was accepted as an input in DecimalSchema then one would not know + if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema + where it should stay as Decimal. + """ + return super().__new__(cls, _arg, **kwargs) + + +class BytesSchema( + Schema, + BytesMixin +): + """ + this class will subclass bytes and is immutable + """ + def __new__(cls, _arg: bytes, **kwargs: Configuration): + return super(Schema, cls).__new__(cls, _arg) + + +class FileSchema( + Schema, + FileMixin +): + """ + This class is NOT immutable + Dynamic classes are built using it for example when AnyType allows in binary data + Al other schema classes ARE immutable + If one wanted to make this immutable one could make this a DictSchema with required properties: + - data = BytesSchema (which would be an immutable bytes based schema) + - file_name = StrSchema + and cast_to_allowed_types would convert bytes and file instances into dicts containing data + file_name + The downside would be that data would be stored in memory which one may not want to do for very large files + + The developer is responsible for closing this file and deleting it + + This class was kept as mutable: + - to allow file reading and writing to disk + - to be able to preserve file name info + """ + + def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader], **kwargs: Configuration): + return super(Schema, cls).__new__(cls, _arg) + + +class BinaryBase: + pass + + +class BinarySchema( + ComposedBase, + BinaryBase, + Schema, + BinaryMixin +): + class MetaOapg: + @staticmethod + def one_of(): + return [ + BytesSchema, + FileSchema, + ] + + def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: Configuration): + return super().__new__(cls, _arg) + + +class BoolSchema( + BoolBase, + Schema, + BoolMixin +): + + @classmethod + def from_openapi_data_oapg(cls, arg: bool, _configuration: typing.Optional[Configuration] = None): + return super().from_openapi_data_oapg(arg, _configuration=_configuration) + + def __new__(cls, _arg: bool, **kwargs: ValidationMetadata): + return super().__new__(cls, _arg, **kwargs) + + +class AnyTypeSchema( + DictBase, + ListBase, + NumberBase, + StrBase, + BoolBase, + NoneBase, + Schema, + NoneFrozenDictTupleStrDecimalBoolFileBytesMixin +): + # Python representation of a schema defined as true or {} + pass + + +class UnsetAnyTypeSchema(AnyTypeSchema): + # Used when additionalProperties/items was not explicitly defined and a defining schema is needed + pass + + +class NotAnyTypeSchema( + ComposedSchema, +): + """ + Python representation of a schema defined as false or {'not': {}} + Does not allow inputs in of AnyType + Note: validations on this class are never run because the code knows that no inputs will ever validate + """ + + class MetaOapg: + not_schema = AnyTypeSchema + + def __new__( + cls, + *_args, + _configuration: typing.Optional[Configuration] = None, + ) -> 'NotAnyTypeSchema': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + ) + + +class DictSchema( + DictBase, + Schema, + FrozenDictMixin +): + @classmethod + def from_openapi_data_oapg(cls, arg: typing.Dict[str, typing.Any], _configuration: typing.Optional[Configuration] = None): + return super().from_openapi_data_oapg(arg, _configuration=_configuration) + + def __new__(cls, *_args: typing.Union[dict, frozendict.frozendict], **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, ValidationMetadata]): + return super().__new__(cls, *_args, **kwargs) + + +schema_type_classes = {NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema, AnyTypeSchema} + + +@functools.lru_cache() +def get_new_class( + class_name: str, + bases: typing.Tuple[typing.Type[typing.Union[Schema, typing.Any]], ...] +) -> typing.Type[Schema]: + """ + Returns a new class that is made with the subclass bases + """ + new_cls: typing.Type[Schema] = type(class_name, bases, {}) + return new_cls + + +LOG_CACHE_USAGE = False + + +def log_cache_usage(cache_fn): + if LOG_CACHE_USAGE: + print(cache_fn.__name__, cache_fn.cache_info()) diff --git a/python/docs/AppManagementApi.md b/python/docs/AppManagementApi.md deleted file mode 100644 index dae6308c..00000000 --- a/python/docs/AppManagementApi.md +++ /dev/null @@ -1,1067 +0,0 @@ -# apollo_openapi.AppManagementApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**openapi_v1_apps_app_id_appnamespaces_namespace_name_delete**](AppManagementApi.md#openapi_v1_apps_app_id_appnamespaces_namespace_name_delete) | **DELETE** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 删除AppNamespace -[**openapi_v1_apps_app_id_delete**](AppManagementApi.md#openapi_v1_apps_app_id_delete) | **DELETE** /openapi/v1/apps/{appId} | 删除应用 -[**openapi_v1_apps_app_id_env_clusters_get**](AppManagementApi.md#openapi_v1_apps_app_id_env_clusters_get) | **GET** /openapi/v1/apps/{appId}/env-clusters | 获取应用的环境集群信息 -[**openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete**](AppManagementApi.md#openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete) | **DELETE** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links | 删除关联的Namespace -[**openapi_v1_apps_app_id_get**](AppManagementApi.md#openapi_v1_apps_app_id_get) | **GET** /openapi/v1/apps/{appId} | 获取单个应用信息 -[**openapi_v1_apps_app_id_miss_envs_get**](AppManagementApi.md#openapi_v1_apps_app_id_miss_envs_get) | **GET** /openapi/v1/apps/{appId}/miss_envs | 查找缺失的环境 -[**openapi_v1_apps_app_id_namespaces_releases_status_get**](AppManagementApi.md#openapi_v1_apps_app_id_namespaces_releases_status_get) | **GET** /openapi/v1/apps/{appId}/namespaces/releases/status | 获取应用下所有Namespace的发布状态 -[**openapi_v1_apps_app_id_navtree_get**](AppManagementApi.md#openapi_v1_apps_app_id_navtree_get) | **GET** /openapi/v1/apps/{appId}/navtree | 获取应用导航树 -[**openapi_v1_apps_app_id_put**](AppManagementApi.md#openapi_v1_apps_app_id_put) | **PUT** /openapi/v1/apps/{appId} | 更新应用 -[**openapi_v1_apps_by_self_get**](AppManagementApi.md#openapi_v1_apps_by_self_get) | **GET** /openapi/v1/apps/by-self | 获取当前Consumer的应用列表(分页) -[**openapi_v1_apps_envs_env_post**](AppManagementApi.md#openapi_v1_apps_envs_env_post) | **POST** /openapi/v1/apps/envs/{env} | 在指定环境创建应用 -[**openapi_v1_apps_get**](AppManagementApi.md#openapi_v1_apps_get) | **GET** /openapi/v1/apps | 获取当前Consumer授权的应用列表 -[**openapi_v1_apps_post**](AppManagementApi.md#openapi_v1_apps_post) | **POST** /openapi/v1/apps | 创建应用 - - -# **openapi_v1_apps_app_id_appnamespaces_namespace_name_delete** -> object openapi_v1_apps_app_id_appnamespaces_namespace_name_delete(app_id, namespace_name) - -删除AppNamespace - -DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.AppManagementApi(api_client) - app_id = 'app_id_example' # str | - namespace_name = 'namespace_name_example' # str | - - try: - # 删除AppNamespace - api_response = api_instance.openapi_v1_apps_app_id_appnamespaces_namespace_name_delete(app_id, namespace_name) - print("The response of AppManagementApi->openapi_v1_apps_app_id_appnamespaces_namespace_name_delete:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AppManagementApi->openapi_v1_apps_app_id_appnamespaces_namespace_name_delete: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **namespace_name** | **str**| | - -### Return type - -**object** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_apps_app_id_delete** -> OpenapiV1AppsGet401Response openapi_v1_apps_app_id_delete(app_id) - -删除应用 - -DELETE /openapi/v1/apps/{appId} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.AppManagementApi(api_client) - app_id = 'app_id_example' # str | - - try: - # 删除应用 - api_response = api_instance.openapi_v1_apps_app_id_delete(app_id) - print("The response of AppManagementApi->openapi_v1_apps_app_id_delete:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AppManagementApi->openapi_v1_apps_app_id_delete: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - -### Return type - -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 应用删除成功 | - | -**403** | 权限不足,需要超级管理员权限 | - | -**404** | 应用不存在 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_apps_app_id_env_clusters_get** -> List[OpenEnvClusterDTO] openapi_v1_apps_app_id_env_clusters_get(app_id) - -获取应用的环境集群信息 - -GET /openapi/v1/apps/{appId}/env-clusters - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_env_cluster_dto import OpenEnvClusterDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.AppManagementApi(api_client) - app_id = 'app_id_example' # str | - - try: - # 获取应用的环境集群信息 - api_response = api_instance.openapi_v1_apps_app_id_env_clusters_get(app_id) - print("The response of AppManagementApi->openapi_v1_apps_app_id_env_clusters_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AppManagementApi->openapi_v1_apps_app_id_env_clusters_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - -### Return type - -[**List[OpenEnvClusterDTO]**](OpenEnvClusterDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 成功获取应用环境集群信息 | - | -**404** | 应用不存在 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete** -> object openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete(app_id, env, cluster_name, namespace_name) - -删除关联的Namespace - -DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.AppManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - - try: - # 删除关联的Namespace - api_response = api_instance.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete(app_id, env, cluster_name, namespace_name) - print("The response of AppManagementApi->openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AppManagementApi->openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - -### Return type - -**object** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_apps_app_id_get** -> OpenAppDTO openapi_v1_apps_app_id_get(app_id) - -获取单个应用信息 - -GET /openapi/v1/apps/{appId} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_app_dto import OpenAppDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.AppManagementApi(api_client) - app_id = 'app_id_example' # str | - - try: - # 获取单个应用信息 - api_response = api_instance.openapi_v1_apps_app_id_get(app_id) - print("The response of AppManagementApi->openapi_v1_apps_app_id_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AppManagementApi->openapi_v1_apps_app_id_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - -### Return type - -[**OpenAppDTO**](OpenAppDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 成功获取应用信息 | - | -**404** | 应用不存在 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_apps_app_id_miss_envs_get** -> List[str] openapi_v1_apps_app_id_miss_envs_get(app_id) - -查找缺失的环境 - -GET /openapi/v1/apps/{appId}/miss_envs - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.AppManagementApi(api_client) - app_id = 'app_id_example' # str | - - try: - # 查找缺失的环境 - api_response = api_instance.openapi_v1_apps_app_id_miss_envs_get(app_id) - print("The response of AppManagementApi->openapi_v1_apps_app_id_miss_envs_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AppManagementApi->openapi_v1_apps_app_id_miss_envs_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - -### Return type - -**List[str]** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 成功获取应用缺失的环境列表 | - | -**404** | 应用不存在 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_apps_app_id_namespaces_releases_status_get** -> Dict[str, Dict[str, bool]] openapi_v1_apps_app_id_namespaces_releases_status_get(app_id) - -获取应用下所有Namespace的发布状态 - -GET /openapi/v1/apps/{appId}/namespaces/releases/status - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.AppManagementApi(api_client) - app_id = 'app_id_example' # str | - - try: - # 获取应用下所有Namespace的发布状态 - api_response = api_instance.openapi_v1_apps_app_id_namespaces_releases_status_get(app_id) - print("The response of AppManagementApi->openapi_v1_apps_app_id_namespaces_releases_status_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AppManagementApi->openapi_v1_apps_app_id_namespaces_releases_status_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - -### Return type - -**Dict[str, Dict[str, bool]]** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_apps_app_id_navtree_get** -> List[EnvClusterInfo] openapi_v1_apps_app_id_navtree_get(app_id) - -获取应用导航树 - -GET /openapi/v1/apps/{appId}/navtree - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.env_cluster_info import EnvClusterInfo -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.AppManagementApi(api_client) - app_id = 'app_id_example' # str | - - try: - # 获取应用导航树 - api_response = api_instance.openapi_v1_apps_app_id_navtree_get(app_id) - print("The response of AppManagementApi->openapi_v1_apps_app_id_navtree_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AppManagementApi->openapi_v1_apps_app_id_navtree_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - -### Return type - -[**List[EnvClusterInfo]**](EnvClusterInfo.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 成功获取应用导航树 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_apps_app_id_put** -> OpenAppDTO openapi_v1_apps_app_id_put(app_id, open_app_dto) - -更新应用 - -PUT /openapi/v1/apps/{appId} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_app_dto import OpenAppDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.AppManagementApi(api_client) - app_id = 'app_id_example' # str | - open_app_dto = apollo_openapi.OpenAppDTO() # OpenAppDTO | - - try: - # 更新应用 - api_response = api_instance.openapi_v1_apps_app_id_put(app_id, open_app_dto) - print("The response of AppManagementApi->openapi_v1_apps_app_id_put:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AppManagementApi->openapi_v1_apps_app_id_put: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **open_app_dto** | [**OpenAppDTO**](OpenAppDTO.md)| | - -### Return type - -[**OpenAppDTO**](OpenAppDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | -**400** | 请求参数错误 | - | -**403** | 权限不足 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_apps_by_self_get** -> List[OpenAppDTO] openapi_v1_apps_by_self_get() - -获取当前Consumer的应用列表(分页) - -GET /openapi/v1/apps/by-self - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_app_dto import OpenAppDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.AppManagementApi(api_client) - - try: - # 获取当前Consumer的应用列表(分页) - api_response = api_instance.openapi_v1_apps_by_self_get() - print("The response of AppManagementApi->openapi_v1_apps_by_self_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AppManagementApi->openapi_v1_apps_by_self_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**List[OpenAppDTO]**](OpenAppDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 成功获取Consumer的应用列表 | - | -**401** | 未授权访问 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_apps_envs_env_post** -> OpenapiV1AppsGet401Response openapi_v1_apps_envs_env_post(env, open_app_dto) - -在指定环境创建应用 - -POST /openapi/v1/apps/envs/{env} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_app_dto import OpenAppDTO -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.AppManagementApi(api_client) - env = 'env_example' # str | - open_app_dto = apollo_openapi.OpenAppDTO() # OpenAppDTO | - - try: - # 在指定环境创建应用 - api_response = api_instance.openapi_v1_apps_envs_env_post(env, open_app_dto) - print("The response of AppManagementApi->openapi_v1_apps_envs_env_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AppManagementApi->openapi_v1_apps_envs_env_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env** | **str**| | - **open_app_dto** | [**OpenAppDTO**](OpenAppDTO.md)| | - -### Return type - -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 应用在指定环境创建成功 | - | -**400** | 请求参数错误 | - | -**403** | 权限不足 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_apps_get** -> List[OpenAppDTO] openapi_v1_apps_get(authorized=authorized) - -获取当前Consumer授权的应用列表 - -GET /openapi/v1/apps?authorized=true - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_app_dto import OpenAppDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.AppManagementApi(api_client) - authorized = 'true' # str | 是否只返回授权的应用 (optional) - - try: - # 获取当前Consumer授权的应用列表 - api_response = api_instance.openapi_v1_apps_get(authorized=authorized) - print("The response of AppManagementApi->openapi_v1_apps_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AppManagementApi->openapi_v1_apps_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorized** | **str**| 是否只返回授权的应用 | [optional] - -### Return type - -[**List[OpenAppDTO]**](OpenAppDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 成功获取授权应用列表 | - | -**401** | 未授权访问 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_apps_post** -> OpenAppDTO openapi_v1_apps_post(openapi_v1_apps_post_request) - -创建应用 - -POST /openapi/v1/apps - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_app_dto import OpenAppDTO -from apollo_openapi.models.openapi_v1_apps_post_request import OpenapiV1AppsPostRequest -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.AppManagementApi(api_client) - openapi_v1_apps_post_request = apollo_openapi.OpenapiV1AppsPostRequest() # OpenapiV1AppsPostRequest | - - try: - # 创建应用 - api_response = api_instance.openapi_v1_apps_post(openapi_v1_apps_post_request) - print("The response of AppManagementApi->openapi_v1_apps_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AppManagementApi->openapi_v1_apps_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **openapi_v1_apps_post_request** | [**OpenapiV1AppsPostRequest**](OpenapiV1AppsPostRequest.md)| | - -### Return type - -[**OpenAppDTO**](OpenAppDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 应用创建成功 | - | -**400** | 请求参数错误 | - | -**403** | 权限不足 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/python/docs/Change.md b/python/docs/Change.md deleted file mode 100644 index 7d79f7ea..00000000 --- a/python/docs/Change.md +++ /dev/null @@ -1,30 +0,0 @@ -# Change - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **str** | | [optional] -**entity** | [**EntityPairKVEntity**](EntityPairKVEntity.md) | | [optional] - -## Example - -```python -from apollo_openapi.models.change import Change - -# TODO update the JSON string below -json = "{}" -# create an instance of Change from a JSON string -change_instance = Change.from_json(json) -# print the JSON string representation of the object -print(Change.to_json()) - -# convert the object into a dict -change_dict = change_instance.to_dict() -# create an instance of Change from a dict -change_from_dict = Change.from_dict(change_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/ClusterDTO.md b/python/docs/ClusterDTO.md deleted file mode 100644 index 86c91e62..00000000 --- a/python/docs/ClusterDTO.md +++ /dev/null @@ -1,39 +0,0 @@ -# ClusterDTO - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | **str** | | [optional] -**data_change_last_modified_by** | **str** | | [optional] -**data_change_created_by_display_name** | **str** | | [optional] -**data_change_last_modified_by_display_name** | **str** | | [optional] -**data_change_created_time** | **str** | | [optional] -**data_change_last_modified_time** | **str** | | [optional] -**id** | **int** | | [optional] -**name** | **str** | | -**app_id** | **str** | | -**parent_cluster_id** | **int** | | [optional] -**comment** | **str** | | [optional] - -## Example - -```python -from apollo_openapi.models.cluster_dto import ClusterDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of ClusterDTO from a JSON string -cluster_dto_instance = ClusterDTO.from_json(json) -# print the JSON string representation of the object -print(ClusterDTO.to_json()) - -# convert the object into a dict -cluster_dto_dict = cluster_dto_instance.to_dict() -# create an instance of ClusterDTO from a dict -cluster_dto_from_dict = ClusterDTO.from_dict(cluster_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/ClusterManagementApi.md b/python/docs/ClusterManagementApi.md deleted file mode 100644 index a3d9d866..00000000 --- a/python/docs/ClusterManagementApi.md +++ /dev/null @@ -1,437 +0,0 @@ -# apollo_openapi.ClusterManagementApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**openapi_v1_apps_app_id_clusters_cluster_name_get**](ClusterManagementApi.md#openapi_v1_apps_app_id_clusters_cluster_name_get) | **GET** /openapi/v1/apps/{appId}/clusters/{clusterName} | 获取指定集群信息 -[**openapi_v1_apps_app_id_clusters_post**](ClusterManagementApi.md#openapi_v1_apps_app_id_clusters_post) | **POST** /openapi/v1/apps/{appId}/clusters | 创建集群 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete**](ClusterManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 删除集群 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get**](ClusterManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches | 获取命名空间分支信息 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get**](ClusterManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} | 获取指定的Namespace - - -# **openapi_v1_apps_app_id_clusters_cluster_name_get** -> OpenClusterDTO openapi_v1_apps_app_id_clusters_cluster_name_get(app_id, cluster_name) - -获取指定集群信息 - -GET /openapi/v1/apps/{appId}/clusters/{clusterName} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_cluster_dto import OpenClusterDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ClusterManagementApi(api_client) - app_id = 'app_id_example' # str | - cluster_name = 'cluster_name_example' # str | - - try: - # 获取指定集群信息 - api_response = api_instance.openapi_v1_apps_app_id_clusters_cluster_name_get(app_id, cluster_name) - print("The response of ClusterManagementApi->openapi_v1_apps_app_id_clusters_cluster_name_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ClusterManagementApi->openapi_v1_apps_app_id_clusters_cluster_name_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **cluster_name** | **str**| | - -### Return type - -[**OpenClusterDTO**](OpenClusterDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 成功获取集群信息 | - | -**404** | 集群不存在 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_apps_app_id_clusters_post** -> OpenClusterDTO openapi_v1_apps_app_id_clusters_post(app_id, open_cluster_dto) - -创建集群 - -POST /openapi/v1/apps/{appId}/clusters - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_cluster_dto import OpenClusterDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ClusterManagementApi(api_client) - app_id = 'app_id_example' # str | - open_cluster_dto = apollo_openapi.OpenClusterDTO() # OpenClusterDTO | - - try: - # 创建集群 - api_response = api_instance.openapi_v1_apps_app_id_clusters_post(app_id, open_cluster_dto) - print("The response of ClusterManagementApi->openapi_v1_apps_app_id_clusters_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ClusterManagementApi->openapi_v1_apps_app_id_clusters_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **open_cluster_dto** | [**OpenClusterDTO**](OpenClusterDTO.md)| | - -### Return type - -[**OpenClusterDTO**](OpenClusterDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 集群创建成功 | - | -**400** | 请求参数错误 | - | -**403** | 权限不足 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete** -> OpenapiV1AppsGet401Response openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete(env, app_id, cluster_name) - -删除集群 - -DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ClusterManagementApi(api_client) - env = 'env_example' # str | - app_id = 'app_id_example' # str | - cluster_name = 'cluster_name_example' # str | - - try: - # 删除集群 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete(env, app_id, cluster_name) - print("The response of ClusterManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ClusterManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env** | **str**| | - **app_id** | **str**| | - **cluster_name** | **str**| | - -### Return type - -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 集群删除成功 | - | -**400** | 删除失败,集群可能包含配置 | - | -**403** | 权限不足 | - | -**404** | 集群不存在 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get** -> OpenNamespaceDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get(app_id, env, cluster_name, namespace_name) - -获取命名空间分支信息 - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ClusterManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - - try: - # 获取命名空间分支信息 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get(app_id, env, cluster_name, namespace_name) - print("The response of ClusterManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ClusterManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - -### Return type - -[**OpenNamespaceDTO**](OpenNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | -**404** | 分支不存在 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get** -> OpenNamespaceDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get(app_id, env, cluster_name, namespace_name, fill_item_detail) - -获取指定的Namespace - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ClusterManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - fill_item_detail = true # bool | - - try: - # 获取指定的Namespace - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get(app_id, env, cluster_name, namespace_name, fill_item_detail) - print("The response of ClusterManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ClusterManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **fill_item_detail** | **bool**| | - -### Return type - -[**OpenNamespaceDTO**](OpenNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/python/docs/EntityPairKVEntity.md b/python/docs/EntityPairKVEntity.md deleted file mode 100644 index bcf9fbef..00000000 --- a/python/docs/EntityPairKVEntity.md +++ /dev/null @@ -1,30 +0,0 @@ -# EntityPairKVEntity - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**first_entity** | [**KVEntity**](KVEntity.md) | | [optional] -**second_entity** | [**KVEntity**](KVEntity.md) | | [optional] - -## Example - -```python -from apollo_openapi.models.entity_pair_kv_entity import EntityPairKVEntity - -# TODO update the JSON string below -json = "{}" -# create an instance of EntityPairKVEntity from a JSON string -entity_pair_kv_entity_instance = EntityPairKVEntity.from_json(json) -# print the JSON string representation of the object -print(EntityPairKVEntity.to_json()) - -# convert the object into a dict -entity_pair_kv_entity_dict = entity_pair_kv_entity_instance.to_dict() -# create an instance of EntityPairKVEntity from a dict -entity_pair_kv_entity_from_dict = EntityPairKVEntity.from_dict(entity_pair_kv_entity_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/EnvClusterInfo.md b/python/docs/EnvClusterInfo.md deleted file mode 100644 index ef7a147e..00000000 --- a/python/docs/EnvClusterInfo.md +++ /dev/null @@ -1,30 +0,0 @@ -# EnvClusterInfo - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**env** | **str** | | [optional] -**clusters** | [**List[ClusterDTO]**](ClusterDTO.md) | | [optional] - -## Example - -```python -from apollo_openapi.models.env_cluster_info import EnvClusterInfo - -# TODO update the JSON string below -json = "{}" -# create an instance of EnvClusterInfo from a JSON string -env_cluster_info_instance = EnvClusterInfo.from_json(json) -# print the JSON string representation of the object -print(EnvClusterInfo.to_json()) - -# convert the object into a dict -env_cluster_info_dict = env_cluster_info_instance.to_dict() -# create an instance of EnvClusterInfo from a dict -env_cluster_info_from_dict = EnvClusterInfo.from_dict(env_cluster_info_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/InstanceManagementApi.md b/python/docs/InstanceManagementApi.md deleted file mode 100644 index 98cf1948..00000000 --- a/python/docs/InstanceManagementApi.md +++ /dev/null @@ -1,265 +0,0 @@ -# apollo_openapi.InstanceManagementApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get**](InstanceManagementApi.md#openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get) | **GET** /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 获取命名空间下的实例数量 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get**](InstanceManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 查询不在指定发布版本中的实例 -[**openapi_v1_envs_env_releases_release_id_instances_get**](InstanceManagementApi.md#openapi_v1_envs_env_releases_release_id_instances_get) | **GET** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) - - -# **openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get** -> int openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get(app_id, cluster_name, namespace_name) - -获取命名空间下的实例数量 - -GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.InstanceManagementApi(api_client) - app_id = 'app_id_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - - try: - # 获取命名空间下的实例数量 - api_response = api_instance.openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get(app_id, cluster_name, namespace_name) - print("The response of InstanceManagementApi->openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling InstanceManagementApi->openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - -### Return type - -**int** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get** -> List[OpenInstanceDTO] openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get(env, app_id, cluster_name, namespace_name, exclude_releases=exclude_releases) - -查询不在指定发布版本中的实例 - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_instance_dto import OpenInstanceDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.InstanceManagementApi(api_client) - env = 'env_example' # str | - app_id = 'app_id_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - exclude_releases = 'exclude_releases_example' # str | 排除的发布ID列表,用逗号分隔 (optional) - - try: - # 查询不在指定发布版本中的实例 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get(env, app_id, cluster_name, namespace_name, exclude_releases=exclude_releases) - print("The response of InstanceManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling InstanceManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env** | **str**| | - **app_id** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **exclude_releases** | **str**| 排除的发布ID列表,用逗号分隔 | [optional] - -### Return type - -[**List[OpenInstanceDTO]**](OpenInstanceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_releases_release_id_instances_get** -> OpenPageDTOOpenInstanceDTO openapi_v1_envs_env_releases_release_id_instances_get(env, release_id, page, size) - -根据发布版本查询实例(支持分页) - -GET /openapi/v1/envs/{env}/releases/{releaseId}/instances - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.InstanceManagementApi(api_client) - env = 'env_example' # str | - release_id = 56 # int | - page = 0 # int | - size = 20 # int | - - try: - # 根据发布版本查询实例(支持分页) - api_response = api_instance.openapi_v1_envs_env_releases_release_id_instances_get(env, release_id, page, size) - print("The response of InstanceManagementApi->openapi_v1_envs_env_releases_release_id_instances_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling InstanceManagementApi->openapi_v1_envs_env_releases_release_id_instances_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env** | **str**| | - **release_id** | **int**| | - **page** | **int**| | - **size** | **int**| | - -### Return type - -[**OpenPageDTOOpenInstanceDTO**](OpenPageDTOOpenInstanceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/python/docs/ItemChangeSets.md b/python/docs/ItemChangeSets.md deleted file mode 100644 index f5697ea2..00000000 --- a/python/docs/ItemChangeSets.md +++ /dev/null @@ -1,37 +0,0 @@ -# ItemChangeSets - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | **str** | | [optional] -**data_change_last_modified_by** | **str** | | [optional] -**data_change_created_by_display_name** | **str** | | [optional] -**data_change_last_modified_by_display_name** | **str** | | [optional] -**data_change_created_time** | **str** | | [optional] -**data_change_last_modified_time** | **str** | | [optional] -**create_items** | [**List[ItemDTO]**](ItemDTO.md) | | [optional] [default to []] -**update_items** | [**List[ItemDTO]**](ItemDTO.md) | | [optional] [default to []] -**delete_items** | [**List[ItemDTO]**](ItemDTO.md) | | [optional] [default to []] - -## Example - -```python -from apollo_openapi.models.item_change_sets import ItemChangeSets - -# TODO update the JSON string below -json = "{}" -# create an instance of ItemChangeSets from a JSON string -item_change_sets_instance = ItemChangeSets.from_json(json) -# print the JSON string representation of the object -print(ItemChangeSets.to_json()) - -# convert the object into a dict -item_change_sets_dict = item_change_sets_instance.to_dict() -# create an instance of ItemChangeSets from a dict -item_change_sets_from_dict = ItemChangeSets.from_dict(item_change_sets_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/ItemDTO.md b/python/docs/ItemDTO.md deleted file mode 100644 index 77b6a2ef..00000000 --- a/python/docs/ItemDTO.md +++ /dev/null @@ -1,41 +0,0 @@ -# ItemDTO - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | **str** | | [optional] -**data_change_last_modified_by** | **str** | | [optional] -**data_change_created_by_display_name** | **str** | | [optional] -**data_change_last_modified_by_display_name** | **str** | | [optional] -**data_change_created_time** | **str** | | [optional] -**data_change_last_modified_time** | **str** | | [optional] -**id** | **int** | | [optional] -**namespace_id** | **int** | | [optional] -**key** | **str** | | [optional] -**type** | **int** | | [optional] -**value** | **str** | | [optional] -**comment** | **str** | | [optional] -**line_num** | **int** | | [optional] - -## Example - -```python -from apollo_openapi.models.item_dto import ItemDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of ItemDTO from a JSON string -item_dto_instance = ItemDTO.from_json(json) -# print the JSON string representation of the object -print(ItemDTO.to_json()) - -# convert the object into a dict -item_dto_dict = item_dto_instance.to_dict() -# create an instance of ItemDTO from a dict -item_dto_from_dict = ItemDTO.from_dict(item_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/ItemManagementApi.md b/python/docs/ItemManagementApi.md deleted file mode 100644 index 23a4e718..00000000 --- a/python/docs/ItemManagementApi.md +++ /dev/null @@ -1,1186 +0,0 @@ -# apollo_openapi.ItemManagementApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete**](ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key删除配置项 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get**](ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过查询参数获取配置项(支持编码的key) -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put**](ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key更新配置项 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put**](ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate | 通过文本批量修改配置项 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post**](ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare | 对比命名空间配置差异 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get**](ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 获取命名空间下的配置项列表 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete**](ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 删除配置项 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get**](ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 获取单个配置项 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put**](ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 更新配置项 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post**](ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 创建新的配置项 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post**](ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert | 撤销配置项更改 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post**](ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync | 同步配置项到多个命名空间 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post**](ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate | 验证配置文本语法 - - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete** -> object openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete(app_id, env, cluster_name, namespace_name, key, operator) - -通过编码的key删除配置项 - -DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ItemManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - key = 'key_example' # str | - operator = 'operator_example' # str | - - try: - # 通过编码的key删除配置项 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete(app_id, env, cluster_name, namespace_name, key, operator) - print("The response of ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **key** | **str**| | - **operator** | **str**| | - -### Return type - -**object** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get** -> OpenItemDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get(app_id, env, cluster_name, namespace_name, key) - -通过查询参数获取配置项(支持编码的key) - -GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_item_dto import OpenItemDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ItemManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - key = 'key_example' # str | - - try: - # 通过查询参数获取配置项(支持编码的key) - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get(app_id, env, cluster_name, namespace_name, key) - print("The response of ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **key** | **str**| | - -### Return type - -[**OpenItemDTO**](OpenItemDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 成功获取配置项(支持编码key) | - | -**404** | 配置项不存在 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put** -> OpenapiV1AppsGet401Response openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put(app_id, env, cluster_name, namespace_name, key, create_if_not_exists, open_item_dto) - -通过编码的key更新配置项 - -PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_item_dto import OpenItemDTO -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ItemManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - key = 'key_example' # str | - create_if_not_exists = false # bool | - open_item_dto = apollo_openapi.OpenItemDTO() # OpenItemDTO | - - try: - # 通过编码的key更新配置项 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put(app_id, env, cluster_name, namespace_name, key, create_if_not_exists, open_item_dto) - print("The response of ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **key** | **str**| | - **create_if_not_exists** | **bool**| | - **open_item_dto** | [**OpenItemDTO**](OpenItemDTO.md)| | - -### Return type - -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 配置项更新成功(编码key) | - | -**400** | 请求参数错误 | - | -**403** | 权限不足 | - | -**404** | 配置项不存在 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put** -> OpenapiV1AppsGet401Response openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put(app_id, env, cluster_name, namespace_name, namespace_text_model) - -通过文本批量修改配置项 - -PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.namespace_text_model import NamespaceTextModel -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ItemManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - namespace_text_model = apollo_openapi.NamespaceTextModel() # NamespaceTextModel | - - try: - # 通过文本批量修改配置项 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put(app_id, env, cluster_name, namespace_name, namespace_text_model) - print("The response of ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **namespace_text_model** | [**NamespaceTextModel**](NamespaceTextModel.md)| | - -### Return type - -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 批量更新配置项成功 | - | -**400** | 请求参数错误 | - | -**403** | 权限不足 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post** -> List[ListItemDiffs] openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post(app_id, env, cluster_name, namespace_name, namespace_sync_model) - -对比命名空间配置差异 - -POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.list_item_diffs import ListItemDiffs -from apollo_openapi.models.namespace_sync_model import NamespaceSyncModel -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ItemManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - namespace_sync_model = apollo_openapi.NamespaceSyncModel() # NamespaceSyncModel | - - try: - # 对比命名空间配置差异 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post(app_id, env, cluster_name, namespace_name, namespace_sync_model) - print("The response of ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **namespace_sync_model** | [**NamespaceSyncModel**](NamespaceSyncModel.md)| | - -### Return type - -[**List[ListItemDiffs]**](ListItemDiffs.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 成功对比命名空间配置差异 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get** -> OpenPageDTOOpenItemDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get(app_id, env, cluster_name, namespace_name, page, size) - -获取命名空间下的配置项列表 - - - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_page_dto_open_item_dto import OpenPageDTOOpenItemDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ItemManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - page = 0 # int | - size = 50 # int | - - try: - # 获取命名空间下的配置项列表 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get(app_id, env, cluster_name, namespace_name, page, size) - print("The response of ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **page** | **int**| | - **size** | **int**| | - -### Return type - -[**OpenPageDTOOpenItemDTO**](OpenPageDTOOpenItemDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 成功获取配置项列表 | - | -**404** | 命名空间不存在 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete** -> object openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete(app_id, env, cluster_name, namespace_name, key, operator) - -删除配置项 - -DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ItemManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - key = 'key_example' # str | - operator = 'operator_example' # str | - - try: - # 删除配置项 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete(app_id, env, cluster_name, namespace_name, key, operator) - print("The response of ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **key** | **str**| | - **operator** | **str**| | - -### Return type - -**object** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get** -> OpenItemDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get(app_id, env, cluster_name, namespace_name, key) - -获取单个配置项 - -GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_item_dto import OpenItemDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ItemManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - key = 'key_example' # str | - - try: - # 获取单个配置项 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get(app_id, env, cluster_name, namespace_name, key) - print("The response of ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **key** | **str**| | - -### Return type - -[**OpenItemDTO**](OpenItemDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 成功获取配置项 | - | -**404** | 配置项不存在 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put** -> OpenapiV1AppsGet401Response openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put(app_id, env, cluster_name, namespace_name, key, create_if_not_exists, open_item_dto) - -更新配置项 - -PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_item_dto import OpenItemDTO -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ItemManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - key = 'key_example' # str | - create_if_not_exists = false # bool | - open_item_dto = apollo_openapi.OpenItemDTO() # OpenItemDTO | - - try: - # 更新配置项 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put(app_id, env, cluster_name, namespace_name, key, create_if_not_exists, open_item_dto) - print("The response of ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **key** | **str**| | - **create_if_not_exists** | **bool**| | - **open_item_dto** | [**OpenItemDTO**](OpenItemDTO.md)| | - -### Return type - -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 配置项更新成功 | - | -**400** | 请求参数错误 | - | -**403** | 权限不足 | - | -**404** | 配置项不存在 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post** -> OpenItemDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post(app_id, env, cluster_name, namespace_name, open_item_dto) - -创建新的配置项 - -POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_item_dto import OpenItemDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ItemManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - open_item_dto = apollo_openapi.OpenItemDTO() # OpenItemDTO | - - try: - # 创建新的配置项 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post(app_id, env, cluster_name, namespace_name, open_item_dto) - print("The response of ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **open_item_dto** | [**OpenItemDTO**](OpenItemDTO.md)| | - -### Return type - -[**OpenItemDTO**](OpenItemDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 配置项创建成功 | - | -**400** | 请求参数错误 | - | -**403** | 权限不足 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post** -> OpenapiV1AppsGet401Response openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post(app_id, env, cluster_name, namespace_name) - -撤销配置项更改 - -POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ItemManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - - try: - # 撤销配置项更改 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post(app_id, env, cluster_name, namespace_name) - print("The response of ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - -### Return type - -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 配置项更改撤销成功 | - | -**400** | 请求参数错误 | - | -**403** | 权限不足 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post** -> OpenapiV1AppsGet401Response openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post(app_id, env, cluster_name, namespace_name, namespace_sync_model) - -同步配置项到多个命名空间 - -POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.namespace_sync_model import NamespaceSyncModel -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ItemManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - namespace_sync_model = apollo_openapi.NamespaceSyncModel() # NamespaceSyncModel | - - try: - # 同步配置项到多个命名空间 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post(app_id, env, cluster_name, namespace_name, namespace_sync_model) - print("The response of ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **namespace_sync_model** | [**NamespaceSyncModel**](NamespaceSyncModel.md)| | - -### Return type - -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 配置项同步成功 | - | -**400** | 请求参数错误 | - | -**403** | 权限不足 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post** -> OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post(app_id, env, cluster_name, namespace_name, namespace_text_model) - -验证配置文本语法 - -POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.namespace_text_model import NamespaceTextModel -from apollo_openapi.models.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ItemManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - namespace_text_model = apollo_openapi.NamespaceTextModel() # NamespaceTextModel | - - try: - # 验证配置文本语法 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post(app_id, env, cluster_name, namespace_name, namespace_text_model) - print("The response of ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **namespace_text_model** | [**NamespaceTextModel**](NamespaceTextModel.md)| | - -### Return type - -[**OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response**](OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 配置文本语法验证通过 | - | -**400** | 配置文本语法错误 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/python/docs/KVEntity.md b/python/docs/KVEntity.md deleted file mode 100644 index d7671770..00000000 --- a/python/docs/KVEntity.md +++ /dev/null @@ -1,30 +0,0 @@ -# KVEntity - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | **str** | | [optional] -**value** | **str** | | [optional] - -## Example - -```python -from apollo_openapi.models.kv_entity import KVEntity - -# TODO update the JSON string below -json = "{}" -# create an instance of KVEntity from a JSON string -kv_entity_instance = KVEntity.from_json(json) -# print the JSON string representation of the object -print(KVEntity.to_json()) - -# convert the object into a dict -kv_entity_dict = kv_entity_instance.to_dict() -# create an instance of KVEntity from a dict -kv_entity_from_dict = KVEntity.from_dict(kv_entity_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/ListItemDiffs.md b/python/docs/ListItemDiffs.md deleted file mode 100644 index 48028bdc..00000000 --- a/python/docs/ListItemDiffs.md +++ /dev/null @@ -1,31 +0,0 @@ -# ListItemDiffs - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**namespace** | [**NamespaceIdentifier**](NamespaceIdentifier.md) | | [optional] -**diffs** | [**ItemChangeSets**](ItemChangeSets.md) | | [optional] -**ext_info** | **str** | | [optional] - -## Example - -```python -from apollo_openapi.models.list_item_diffs import ListItemDiffs - -# TODO update the JSON string below -json = "{}" -# create an instance of ListItemDiffs from a JSON string -list_item_diffs_instance = ListItemDiffs.from_json(json) -# print the JSON string representation of the object -print(ListItemDiffs.to_json()) - -# convert the object into a dict -list_item_diffs_dict = list_item_diffs_instance.to_dict() -# create an instance of ListItemDiffs from a dict -list_item_diffs_from_dict = ListItemDiffs.from_dict(list_item_diffs_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/ListReleaseBO.md b/python/docs/ListReleaseBO.md deleted file mode 100644 index da94c58f..00000000 --- a/python/docs/ListReleaseBO.md +++ /dev/null @@ -1,30 +0,0 @@ -# ListReleaseBO - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**base_info** | [**ReleaseDTO**](ReleaseDTO.md) | | [optional] -**items** | [**List[KVEntity]**](KVEntity.md) | | [optional] - -## Example - -```python -from apollo_openapi.models.list_release_bo import ListReleaseBO - -# TODO update the JSON string below -json = "{}" -# create an instance of ListReleaseBO from a JSON string -list_release_bo_instance = ListReleaseBO.from_json(json) -# print the JSON string representation of the object -print(ListReleaseBO.to_json()) - -# convert the object into a dict -list_release_bo_dict = list_release_bo_instance.to_dict() -# create an instance of ListReleaseBO from a dict -list_release_bo_from_dict = ListReleaseBO.from_dict(list_release_bo_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/MapString.md b/python/docs/MapString.md deleted file mode 100644 index b99798f9..00000000 --- a/python/docs/MapString.md +++ /dev/null @@ -1,30 +0,0 @@ -# MapString - -字符串映射对象,用于表示键值对的配置数据结构 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | **str** | | [optional] - -## Example - -```python -from apollo_openapi.models.map_string import MapString - -# TODO update the JSON string below -json = "{}" -# create an instance of MapString from a JSON string -map_string_instance = MapString.from_json(json) -# print the JSON string representation of the object -print(MapString.to_json()) - -# convert the object into a dict -map_string_dict = map_string_instance.to_dict() -# create an instance of MapString from a dict -map_string_from_dict = MapString.from_dict(map_string_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/NamespaceBranchManagementApi.md b/python/docs/NamespaceBranchManagementApi.md deleted file mode 100644 index 0b34f710..00000000 --- a/python/docs/NamespaceBranchManagementApi.md +++ /dev/null @@ -1,828 +0,0 @@ -# apollo_openapi.NamespaceBranchManagementApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post**](NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch | 创建命名空间分支 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete**](NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 删除命名空间分支 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post**](NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases | 创建灰度删除发布 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get**](NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules | 获取分支灰度发布规则 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put**](NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules | 更新分支灰度发布规则 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get**](NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items | 获取分支下的配置项 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post**](NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge | 合并分支 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch**](NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch) | **PATCH** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 合并分支到主分支 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post**](NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases | 创建灰度发布 - - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post** -> OpenNamespaceDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post(app_id, env, cluster_name, namespace_name, operator) - -创建命名空间分支 - -POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceBranchManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - operator = 'operator_example' # str | - - try: - # 创建命名空间分支 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post(app_id, env, cluster_name, namespace_name, operator) - print("The response of NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **operator** | **str**| | - -### Return type - -[**OpenNamespaceDTO**](OpenNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete** -> object openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete(env, app_id, cluster_name, namespace_name, branch_name, operator) - -删除命名空间分支 - -DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceBranchManagementApi(api_client) - env = 'env_example' # str | - app_id = 'app_id_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - branch_name = 'branch_name_example' # str | - operator = 'operator_example' # str | - - try: - # 删除命名空间分支 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete(env, app_id, cluster_name, namespace_name, branch_name, operator) - print("The response of NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env** | **str**| | - **app_id** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **branch_name** | **str**| | - **operator** | **str**| | - -### Return type - -**object** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post** -> OpenReleaseDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post(app_id, env, cluster_name, namespace_name, branch_name, namespace_gray_del_release_dto) - -创建灰度删除发布 - - - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.namespace_gray_del_release_dto import NamespaceGrayDelReleaseDTO -from apollo_openapi.models.open_release_dto import OpenReleaseDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceBranchManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - branch_name = 'branch_name_example' # str | - namespace_gray_del_release_dto = apollo_openapi.NamespaceGrayDelReleaseDTO() # NamespaceGrayDelReleaseDTO | - - try: - # 创建灰度删除发布 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post(app_id, env, cluster_name, namespace_name, branch_name, namespace_gray_del_release_dto) - print("The response of NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **branch_name** | **str**| | - **namespace_gray_del_release_dto** | [**NamespaceGrayDelReleaseDTO**](NamespaceGrayDelReleaseDTO.md)| | - -### Return type - -[**OpenReleaseDTO**](OpenReleaseDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get** -> OpenGrayReleaseRuleDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get(app_id, env, cluster_name, namespace_name, branch_name) - -获取分支灰度发布规则 - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_gray_release_rule_dto import OpenGrayReleaseRuleDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceBranchManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - branch_name = 'branch_name_example' # str | - - try: - # 获取分支灰度发布规则 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get(app_id, env, cluster_name, namespace_name, branch_name) - print("The response of NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **branch_name** | **str**| | - -### Return type - -[**OpenGrayReleaseRuleDTO**](OpenGrayReleaseRuleDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put** -> object openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put(app_id, env, cluster_name, namespace_name, branch_name, operator, open_gray_release_rule_dto) - -更新分支灰度发布规则 - -PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_gray_release_rule_dto import OpenGrayReleaseRuleDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceBranchManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - branch_name = 'branch_name_example' # str | - operator = 'operator_example' # str | - open_gray_release_rule_dto = apollo_openapi.OpenGrayReleaseRuleDTO() # OpenGrayReleaseRuleDTO | - - try: - # 更新分支灰度发布规则 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put(app_id, env, cluster_name, namespace_name, branch_name, operator, open_gray_release_rule_dto) - print("The response of NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **branch_name** | **str**| | - **operator** | **str**| | - **open_gray_release_rule_dto** | [**OpenGrayReleaseRuleDTO**](OpenGrayReleaseRuleDTO.md)| | - -### Return type - -**object** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get** -> List[OpenItemDTO] openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get(app_id, env, cluster_name, namespace_name, branch_name) - -获取分支下的配置项 - -GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_item_dto import OpenItemDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceBranchManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - branch_name = 'branch_name_example' # str | - - try: - # 获取分支下的配置项 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get(app_id, env, cluster_name, namespace_name, branch_name) - print("The response of NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **branch_name** | **str**| | - -### Return type - -[**List[OpenItemDTO]**](OpenItemDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 成功获取分支下的配置项列表 | - | -**404** | 分支不存在 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post** -> OpenReleaseDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post(app_id, env, cluster_name, namespace_name, branch_name, delete_branch, namespace_release_dto) - -合并分支 - - - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.namespace_release_dto import NamespaceReleaseDTO -from apollo_openapi.models.open_release_dto import OpenReleaseDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceBranchManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - branch_name = 'branch_name_example' # str | - delete_branch = true # bool | - namespace_release_dto = apollo_openapi.NamespaceReleaseDTO() # NamespaceReleaseDTO | - - try: - # 合并分支 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post(app_id, env, cluster_name, namespace_name, branch_name, delete_branch, namespace_release_dto) - print("The response of NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **branch_name** | **str**| | - **delete_branch** | **bool**| | - **namespace_release_dto** | [**NamespaceReleaseDTO**](NamespaceReleaseDTO.md)| | - -### Return type - -[**OpenReleaseDTO**](OpenReleaseDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 分支合并成功 | - | -**400** | 合并参数错误 | - | -**403** | 权限不足 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch** -> OpenReleaseDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch(env, app_id, cluster_name, namespace_name, branch_name, delete_branch, x_apollo_operator, namespace_release_dto) - -合并分支到主分支 - -PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - -使用 PATCH 方法表示部分更新操作(将分支状态从"独立"更新为"合并") - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.namespace_release_dto import NamespaceReleaseDTO -from apollo_openapi.models.open_release_dto import OpenReleaseDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceBranchManagementApi(api_client) - env = 'env_example' # str | - app_id = 'app_id_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - branch_name = 'branch_name_example' # str | - delete_branch = true # bool | - x_apollo_operator = 'x_apollo_operator_example' # str | - namespace_release_dto = apollo_openapi.NamespaceReleaseDTO() # NamespaceReleaseDTO | - - try: - # 合并分支到主分支 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch(env, app_id, cluster_name, namespace_name, branch_name, delete_branch, x_apollo_operator, namespace_release_dto) - print("The response of NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env** | **str**| | - **app_id** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **branch_name** | **str**| | - **delete_branch** | **bool**| | - **x_apollo_operator** | **str**| | - **namespace_release_dto** | [**NamespaceReleaseDTO**](NamespaceReleaseDTO.md)| | - -### Return type - -[**OpenReleaseDTO**](OpenReleaseDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post** -> OpenReleaseDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post(app_id, env, cluster_name, namespace_name, branch_name, namespace_release_dto) - -创建灰度发布 - - - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.namespace_release_dto import NamespaceReleaseDTO -from apollo_openapi.models.open_release_dto import OpenReleaseDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceBranchManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - branch_name = 'branch_name_example' # str | - namespace_release_dto = apollo_openapi.NamespaceReleaseDTO() # NamespaceReleaseDTO | - - try: - # 创建灰度发布 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post(app_id, env, cluster_name, namespace_name, branch_name, namespace_release_dto) - print("The response of NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **branch_name** | **str**| | - **namespace_release_dto** | [**NamespaceReleaseDTO**](NamespaceReleaseDTO.md)| | - -### Return type - -[**OpenReleaseDTO**](OpenReleaseDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/python/docs/NamespaceGrayDelReleaseDTO.md b/python/docs/NamespaceGrayDelReleaseDTO.md deleted file mode 100644 index 66a55ecd..00000000 --- a/python/docs/NamespaceGrayDelReleaseDTO.md +++ /dev/null @@ -1,34 +0,0 @@ -# NamespaceGrayDelReleaseDTO - -命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**release_title** | **str** | 发布标题,用于标识这次灰度删除发布的名称或版本号 | [optional] -**release_comment** | **str** | 发布备注,详细描述本次灰度删除发布的目的和删除的配置项 | [optional] -**released_by** | **str** | 发布操作者用户名,记录是谁执行了这次灰度删除发布操作 | [optional] -**is_emergency_publish** | **bool** | 是否为紧急发布,紧急发布可能会跳过某些审核流程 | [optional] -**gray_del_keys** | **List[str]** | 需要在灰度发布中删除的配置项键名列表 | [optional] - -## Example - -```python -from apollo_openapi.models.namespace_gray_del_release_dto import NamespaceGrayDelReleaseDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of NamespaceGrayDelReleaseDTO from a JSON string -namespace_gray_del_release_dto_instance = NamespaceGrayDelReleaseDTO.from_json(json) -# print the JSON string representation of the object -print(NamespaceGrayDelReleaseDTO.to_json()) - -# convert the object into a dict -namespace_gray_del_release_dto_dict = namespace_gray_del_release_dto_instance.to_dict() -# create an instance of NamespaceGrayDelReleaseDTO from a dict -namespace_gray_del_release_dto_from_dict = NamespaceGrayDelReleaseDTO.from_dict(namespace_gray_del_release_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/NamespaceIdentifier.md b/python/docs/NamespaceIdentifier.md deleted file mode 100644 index 66589f74..00000000 --- a/python/docs/NamespaceIdentifier.md +++ /dev/null @@ -1,32 +0,0 @@ -# NamespaceIdentifier - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**app_id** | **str** | | [optional] -**env** | **str** | | [optional] -**cluster_name** | **str** | | [optional] -**namespace_name** | **str** | | [optional] - -## Example - -```python -from apollo_openapi.models.namespace_identifier import NamespaceIdentifier - -# TODO update the JSON string below -json = "{}" -# create an instance of NamespaceIdentifier from a JSON string -namespace_identifier_instance = NamespaceIdentifier.from_json(json) -# print the JSON string representation of the object -print(NamespaceIdentifier.to_json()) - -# convert the object into a dict -namespace_identifier_dict = namespace_identifier_instance.to_dict() -# create an instance of NamespaceIdentifier from a dict -namespace_identifier_from_dict = NamespaceIdentifier.from_dict(namespace_identifier_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/NamespaceManagementApi.md b/python/docs/NamespaceManagementApi.md deleted file mode 100644 index e5c3499e..00000000 --- a/python/docs/NamespaceManagementApi.md +++ /dev/null @@ -1,761 +0,0 @@ -# apollo_openapi.NamespaceManagementApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**openapi_v1_appnamespaces_get**](NamespaceManagementApi.md#openapi_v1_appnamespaces_get) | **GET** /openapi/v1/appnamespaces | 获取所有公共AppNamespace -[**openapi_v1_apps_app_id_appnamespaces_get**](NamespaceManagementApi.md#openapi_v1_apps_app_id_appnamespaces_get) | **GET** /openapi/v1/apps/{appId}/appnamespaces | 获取指定应用的AppNamespace -[**openapi_v1_apps_app_id_appnamespaces_namespace_name_get**](NamespaceManagementApi.md#openapi_v1_apps_app_id_appnamespaces_namespace_name_get) | **GET** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 获取指定的AppNamespace -[**openapi_v1_apps_app_id_appnamespaces_post**](NamespaceManagementApi.md#openapi_v1_apps_app_id_appnamespaces_post) | **POST** /openapi/v1/apps/{appId}/appnamespaces | 创建AppNamespace -[**openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get**](NamespaceManagementApi.md#openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check | 检查缺失的Namespace -[**openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get**](NamespaceManagementApi.md#openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association | 获取关联的公共Namespace -[**openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get**](NamespaceManagementApi.md#openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get) | **GET** /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances | 获取公共AppNamespace的所有实例 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get**](NamespaceManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces | 获取指定集群下的所有Namespace -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get**](NamespaceManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock | 获取Namespace的锁状态 - - -# **openapi_v1_appnamespaces_get** -> List[OpenAppNamespaceDTO] openapi_v1_appnamespaces_get(public_only) - -获取所有公共AppNamespace - -GET /openapi/v1/appnamespaces?public=true - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_app_namespace_dto import OpenAppNamespaceDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceManagementApi(api_client) - public_only = false # bool | - - try: - # 获取所有公共AppNamespace - api_response = api_instance.openapi_v1_appnamespaces_get(public_only) - print("The response of NamespaceManagementApi->openapi_v1_appnamespaces_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceManagementApi->openapi_v1_appnamespaces_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **public_only** | **bool**| | - -### Return type - -[**List[OpenAppNamespaceDTO]**](OpenAppNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_apps_app_id_appnamespaces_get** -> List[OpenAppNamespaceDTO] openapi_v1_apps_app_id_appnamespaces_get(app_id) - -获取指定应用的AppNamespace - -GET /openapi/v1/apps/{appId}/appnamespaces - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_app_namespace_dto import OpenAppNamespaceDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceManagementApi(api_client) - app_id = 'app_id_example' # str | - - try: - # 获取指定应用的AppNamespace - api_response = api_instance.openapi_v1_apps_app_id_appnamespaces_get(app_id) - print("The response of NamespaceManagementApi->openapi_v1_apps_app_id_appnamespaces_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceManagementApi->openapi_v1_apps_app_id_appnamespaces_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - -### Return type - -[**List[OpenAppNamespaceDTO]**](OpenAppNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_apps_app_id_appnamespaces_namespace_name_get** -> OpenAppNamespaceDTO openapi_v1_apps_app_id_appnamespaces_namespace_name_get(app_id, namespace_name) - -获取指定的AppNamespace - -GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_app_namespace_dto import OpenAppNamespaceDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceManagementApi(api_client) - app_id = 'app_id_example' # str | - namespace_name = 'namespace_name_example' # str | - - try: - # 获取指定的AppNamespace - api_response = api_instance.openapi_v1_apps_app_id_appnamespaces_namespace_name_get(app_id, namespace_name) - print("The response of NamespaceManagementApi->openapi_v1_apps_app_id_appnamespaces_namespace_name_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceManagementApi->openapi_v1_apps_app_id_appnamespaces_namespace_name_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **namespace_name** | **str**| | - -### Return type - -[**OpenAppNamespaceDTO**](OpenAppNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_apps_app_id_appnamespaces_post** -> OpenAppNamespaceDTO openapi_v1_apps_app_id_appnamespaces_post(app_id, open_app_namespace_dto) - -创建AppNamespace - -POST /openapi/v1/apps/{appId}/appnamespaces - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_app_namespace_dto import OpenAppNamespaceDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceManagementApi(api_client) - app_id = 'app_id_example' # str | - open_app_namespace_dto = apollo_openapi.OpenAppNamespaceDTO() # OpenAppNamespaceDTO | - - try: - # 创建AppNamespace - api_response = api_instance.openapi_v1_apps_app_id_appnamespaces_post(app_id, open_app_namespace_dto) - print("The response of NamespaceManagementApi->openapi_v1_apps_app_id_appnamespaces_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceManagementApi->openapi_v1_apps_app_id_appnamespaces_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **open_app_namespace_dto** | [**OpenAppNamespaceDTO**](OpenAppNamespaceDTO.md)| | - -### Return type - -[**OpenAppNamespaceDTO**](OpenAppNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | AppNamespace创建成功 | - | -**400** | 请求参数错误 | - | -**403** | 权限不足 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get** -> List[str] openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get(app_id, env, cluster_name) - -检查缺失的Namespace - -GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - - try: - # 检查缺失的Namespace - api_response = api_instance.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get(app_id, env, cluster_name) - print("The response of NamespaceManagementApi->openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceManagementApi->openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - -### Return type - -**List[str]** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get** -> OpenNamespaceDTO openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get(app_id, env, cluster_name, namespace_name) - -获取关联的公共Namespace - -GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - - try: - # 获取关联的公共Namespace - api_response = api_instance.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get(app_id, env, cluster_name, namespace_name) - print("The response of NamespaceManagementApi->openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceManagementApi->openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - -### Return type - -[**OpenNamespaceDTO**](OpenNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get** -> List[OpenNamespaceDTO] openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get(env, public_namespace_name, page, size) - -获取公共AppNamespace的所有实例 - -GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceManagementApi(api_client) - env = 'env_example' # str | - public_namespace_name = 'public_namespace_name_example' # str | - page = 0 # int | - size = 10 # int | - - try: - # 获取公共AppNamespace的所有实例 - api_response = api_instance.openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get(env, public_namespace_name, page, size) - print("The response of NamespaceManagementApi->openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceManagementApi->openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env** | **str**| | - **public_namespace_name** | **str**| | - **page** | **int**| | - **size** | **int**| | - -### Return type - -[**List[OpenNamespaceDTO]**](OpenNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get** -> List[OpenNamespaceDTO] openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get(app_id, env, cluster_name, fill_item_detail) - -获取指定集群下的所有Namespace - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - fill_item_detail = true # bool | - - try: - # 获取指定集群下的所有Namespace - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get(app_id, env, cluster_name, fill_item_detail) - print("The response of NamespaceManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **fill_item_detail** | **bool**| | - -### Return type - -[**List[OpenNamespaceDTO]**](OpenNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get** -> OpenNamespaceLockDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get(app_id, env, cluster_name, namespace_name) - -获取Namespace的锁状态 - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_namespace_lock_dto import OpenNamespaceLockDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - - try: - # 获取Namespace的锁状态 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get(app_id, env, cluster_name, namespace_name) - print("The response of NamespaceManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - -### Return type - -[**OpenNamespaceLockDTO**](OpenNamespaceLockDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/python/docs/NamespaceReleaseDTO.md b/python/docs/NamespaceReleaseDTO.md deleted file mode 100644 index 24dedfcf..00000000 --- a/python/docs/NamespaceReleaseDTO.md +++ /dev/null @@ -1,33 +0,0 @@ -# NamespaceReleaseDTO - -命名空间发布请求数据传输对象,用于创建新的配置发布 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**release_title** | **str** | 发布标题,用于标识这次发布的名称或版本号 | [optional] -**release_comment** | **str** | 发布备注,详细描述本次发布的变更内容和目的 | [optional] -**released_by** | **str** | 发布操作者用户名,记录是谁执行了这次发布操作 | [optional] -**is_emergency_publish** | **bool** | 是否为紧急发布,紧急发布可能会跳过某些审核流程 | [optional] - -## Example - -```python -from apollo_openapi.models.namespace_release_dto import NamespaceReleaseDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of NamespaceReleaseDTO from a JSON string -namespace_release_dto_instance = NamespaceReleaseDTO.from_json(json) -# print the JSON string representation of the object -print(NamespaceReleaseDTO.to_json()) - -# convert the object into a dict -namespace_release_dto_dict = namespace_release_dto_instance.to_dict() -# create an instance of NamespaceReleaseDTO from a dict -namespace_release_dto_from_dict = NamespaceReleaseDTO.from_dict(namespace_release_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/NamespaceSyncModel.md b/python/docs/NamespaceSyncModel.md deleted file mode 100644 index c9cfb85c..00000000 --- a/python/docs/NamespaceSyncModel.md +++ /dev/null @@ -1,30 +0,0 @@ -# NamespaceSyncModel - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sync_to_namespaces** | [**List[NamespaceIdentifier]**](NamespaceIdentifier.md) | | [optional] -**sync_items** | [**List[ItemDTO]**](ItemDTO.md) | | [optional] - -## Example - -```python -from apollo_openapi.models.namespace_sync_model import NamespaceSyncModel - -# TODO update the JSON string below -json = "{}" -# create an instance of NamespaceSyncModel from a JSON string -namespace_sync_model_instance = NamespaceSyncModel.from_json(json) -# print the JSON string representation of the object -print(NamespaceSyncModel.to_json()) - -# convert the object into a dict -namespace_sync_model_dict = namespace_sync_model_instance.to_dict() -# create an instance of NamespaceSyncModel from a dict -namespace_sync_model_from_dict = NamespaceSyncModel.from_dict(namespace_sync_model_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/NamespaceTextModel.md b/python/docs/NamespaceTextModel.md deleted file mode 100644 index dc4b68e7..00000000 --- a/python/docs/NamespaceTextModel.md +++ /dev/null @@ -1,36 +0,0 @@ -# NamespaceTextModel - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**app_id** | **str** | | [optional] -**env** | **str** | | [optional] -**cluster_name** | **str** | | [optional] -**namespace_name** | **str** | | [optional] -**namespace_id** | **int** | | [optional] -**format** | **str** | | [optional] -**config_text** | **str** | | [optional] -**operator** | **str** | | [optional] - -## Example - -```python -from apollo_openapi.models.namespace_text_model import NamespaceTextModel - -# TODO update the JSON string below -json = "{}" -# create an instance of NamespaceTextModel from a JSON string -namespace_text_model_instance = NamespaceTextModel.from_json(json) -# print the JSON string representation of the object -print(NamespaceTextModel.to_json()) - -# convert the object into a dict -namespace_text_model_dict = namespace_text_model_instance.to_dict() -# create an instance of NamespaceTextModel from a dict -namespace_text_model_from_dict = NamespaceTextModel.from_dict(namespace_text_model_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenAppDTO.md b/python/docs/OpenAppDTO.md deleted file mode 100644 index fbaea310..00000000 --- a/python/docs/OpenAppDTO.md +++ /dev/null @@ -1,39 +0,0 @@ -# OpenAppDTO - -Apollo应用信息数据传输对象,包含应用的基本信息和元数据 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | **str** | 数据创建者用户名,记录是谁创建了这个应用 | [optional] -**data_change_last_modified_by** | **str** | 数据最后修改者用户名,记录最后一次修改应用信息的用户 | [optional] -**data_change_created_time** | **str** | 数据创建时间,ISO 8601格式的时间戳 | [optional] -**data_change_last_modified_time** | **str** | 数据最后修改时间,ISO 8601格式的时间戳 | [optional] -**name** | **str** | 应用名称,用于显示的友好名称 | [optional] -**app_id** | **str** | 应用唯一标识符,全局唯一的应用ID | [optional] -**org_id** | **str** | 组织ID,应用所属组织的唯一标识 | [optional] -**org_name** | **str** | 组织名称,应用所属组织的显示名称 | [optional] -**owner_name** | **str** | 应用负责人姓名,应用的主要负责人 | [optional] -**owner_email** | **str** | 应用负责人邮箱地址,用于接收应用相关通知 | [optional] - -## Example - -```python -from apollo_openapi.models.open_app_dto import OpenAppDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenAppDTO from a JSON string -open_app_dto_instance = OpenAppDTO.from_json(json) -# print the JSON string representation of the object -print(OpenAppDTO.to_json()) - -# convert the object into a dict -open_app_dto_dict = open_app_dto_instance.to_dict() -# create an instance of OpenAppDTO from a dict -open_app_dto_from_dict = OpenAppDTO.from_dict(open_app_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenAppNamespaceDTO.md b/python/docs/OpenAppNamespaceDTO.md deleted file mode 100644 index 5c84103b..00000000 --- a/python/docs/OpenAppNamespaceDTO.md +++ /dev/null @@ -1,39 +0,0 @@ -# OpenAppNamespaceDTO - -Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | **str** | 命名空间创建者用户名,记录是谁创建了这个应用命名空间 | [optional] -**data_change_last_modified_by** | **str** | 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 | [optional] -**data_change_created_time** | **str** | 命名空间创建时间,ISO 8601格式的时间戳 | [optional] -**data_change_last_modified_time** | **str** | 命名空间最后修改时间,ISO 8601格式的时间戳 | [optional] -**name** | **str** | 命名空间名称,在同一应用内唯一标识一个命名空间 | [optional] -**app_id** | **str** | 所属应用的唯一标识符 | [optional] -**format** | **str** | 命名空间格式类型,如properties、xml、json、yml等 | [optional] -**is_public** | **bool** | 是否为公共命名空间,公共命名空间可以被其他应用关联使用 | [optional] -**append_namespace_prefix** | **bool** | 对于公共命名空间,是否在命名空间名称前添加前缀 | [optional] [default to True] -**comment** | **str** | 命名空间备注说明,描述命名空间的用途和包含的配置类型 | [optional] - -## Example - -```python -from apollo_openapi.models.open_app_namespace_dto import OpenAppNamespaceDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenAppNamespaceDTO from a JSON string -open_app_namespace_dto_instance = OpenAppNamespaceDTO.from_json(json) -# print the JSON string representation of the object -print(OpenAppNamespaceDTO.to_json()) - -# convert the object into a dict -open_app_namespace_dto_dict = open_app_namespace_dto_instance.to_dict() -# create an instance of OpenAppNamespaceDTO from a dict -open_app_namespace_dto_from_dict = OpenAppNamespaceDTO.from_dict(open_app_namespace_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenClusterDTO.md b/python/docs/OpenClusterDTO.md deleted file mode 100644 index 9fe91e0a..00000000 --- a/python/docs/OpenClusterDTO.md +++ /dev/null @@ -1,35 +0,0 @@ -# OpenClusterDTO - -Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | **str** | 集群创建者用户名,记录是谁创建了这个集群 | [optional] -**data_change_last_modified_by** | **str** | 集群最后修改者用户名,记录最后一次修改集群信息的用户 | [optional] -**data_change_created_time** | **str** | 集群创建时间,ISO 8601格式的时间戳 | [optional] -**data_change_last_modified_time** | **str** | 集群最后修改时间,ISO 8601格式的时间戳 | [optional] -**name** | **str** | 集群名称,在同一应用和环境下唯一标识一个集群 | [optional] -**app_id** | **str** | 所属应用的唯一标识符 | [optional] - -## Example - -```python -from apollo_openapi.models.open_cluster_dto import OpenClusterDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenClusterDTO from a JSON string -open_cluster_dto_instance = OpenClusterDTO.from_json(json) -# print the JSON string representation of the object -print(OpenClusterDTO.to_json()) - -# convert the object into a dict -open_cluster_dto_dict = open_cluster_dto_instance.to_dict() -# create an instance of OpenClusterDTO from a dict -open_cluster_dto_from_dict = OpenClusterDTO.from_dict(open_cluster_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenCreateAppDTO.md b/python/docs/OpenCreateAppDTO.md deleted file mode 100644 index 73fe9a45..00000000 --- a/python/docs/OpenCreateAppDTO.md +++ /dev/null @@ -1,32 +0,0 @@ -# OpenCreateAppDTO - -创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**assign_app_role_to_self** | **bool** | 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 | [optional] -**admins** | **List[str]** | 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 | [optional] -**app** | [**OpenAppDTO**](OpenAppDTO.md) | | [optional] - -## Example - -```python -from apollo_openapi.models.open_create_app_dto import OpenCreateAppDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenCreateAppDTO from a JSON string -open_create_app_dto_instance = OpenCreateAppDTO.from_json(json) -# print the JSON string representation of the object -print(OpenCreateAppDTO.to_json()) - -# convert the object into a dict -open_create_app_dto_dict = open_create_app_dto_instance.to_dict() -# create an instance of OpenCreateAppDTO from a dict -open_create_app_dto_from_dict = OpenCreateAppDTO.from_dict(open_create_app_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenEnvClusterDTO.md b/python/docs/OpenEnvClusterDTO.md deleted file mode 100644 index 93fbefee..00000000 --- a/python/docs/OpenEnvClusterDTO.md +++ /dev/null @@ -1,30 +0,0 @@ -# OpenEnvClusterDTO - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**env** | **str** | | [optional] -**clusters** | **List[str]** | | [optional] - -## Example - -```python -from apollo_openapi.models.open_env_cluster_dto import OpenEnvClusterDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenEnvClusterDTO from a JSON string -open_env_cluster_dto_instance = OpenEnvClusterDTO.from_json(json) -# print the JSON string representation of the object -print(OpenEnvClusterDTO.to_json()) - -# convert the object into a dict -open_env_cluster_dto_dict = open_env_cluster_dto_instance.to_dict() -# create an instance of OpenEnvClusterDTO from a dict -open_env_cluster_dto_from_dict = OpenEnvClusterDTO.from_dict(open_env_cluster_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenGrayReleaseRuleDTO.md b/python/docs/OpenGrayReleaseRuleDTO.md deleted file mode 100644 index 7ec7b1c6..00000000 --- a/python/docs/OpenGrayReleaseRuleDTO.md +++ /dev/null @@ -1,38 +0,0 @@ -# OpenGrayReleaseRuleDTO - -Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | **str** | 灰度规则创建者用户名,记录是谁创建了这个灰度发布规则 | [optional] -**data_change_last_modified_by** | **str** | 灰度规则最后修改者用户名,记录最后一次修改规则的用户 | [optional] -**data_change_created_time** | **str** | 灰度规则创建时间,ISO 8601格式的时间戳 | [optional] -**data_change_last_modified_time** | **str** | 灰度规则最后修改时间,ISO 8601格式的时间戳 | [optional] -**app_id** | **str** | 所属应用的唯一标识符 | [optional] -**cluster_name** | **str** | 所属集群的名称 | [optional] -**namespace_name** | **str** | 所属命名空间的名称 | [optional] -**branch_name** | **str** | 灰度分支名称,标识灰度发布的分支 | [optional] -**rule_items** | [**List[OpenGrayReleaseRuleItemDTO]**](OpenGrayReleaseRuleItemDTO.md) | 灰度发布规则项列表,包含具体的灰度规则条件 | [optional] - -## Example - -```python -from apollo_openapi.models.open_gray_release_rule_dto import OpenGrayReleaseRuleDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenGrayReleaseRuleDTO from a JSON string -open_gray_release_rule_dto_instance = OpenGrayReleaseRuleDTO.from_json(json) -# print the JSON string representation of the object -print(OpenGrayReleaseRuleDTO.to_json()) - -# convert the object into a dict -open_gray_release_rule_dto_dict = open_gray_release_rule_dto_instance.to_dict() -# create an instance of OpenGrayReleaseRuleDTO from a dict -open_gray_release_rule_dto_from_dict = OpenGrayReleaseRuleDTO.from_dict(open_gray_release_rule_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenGrayReleaseRuleItemDTO.md b/python/docs/OpenGrayReleaseRuleItemDTO.md deleted file mode 100644 index b56d44b9..00000000 --- a/python/docs/OpenGrayReleaseRuleItemDTO.md +++ /dev/null @@ -1,32 +0,0 @@ -# OpenGrayReleaseRuleItemDTO - -Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client_app_id** | **str** | 客户端应用ID,指定哪个应用可以获取灰度配置 | [optional] -**client_ip_list** | **List[str]** | 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 | [optional] -**client_label_list** | **List[str]** | 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 | [optional] - -## Example - -```python -from apollo_openapi.models.open_gray_release_rule_item_dto import OpenGrayReleaseRuleItemDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenGrayReleaseRuleItemDTO from a JSON string -open_gray_release_rule_item_dto_instance = OpenGrayReleaseRuleItemDTO.from_json(json) -# print the JSON string representation of the object -print(OpenGrayReleaseRuleItemDTO.to_json()) - -# convert the object into a dict -open_gray_release_rule_item_dto_dict = open_gray_release_rule_item_dto_instance.to_dict() -# create an instance of OpenGrayReleaseRuleItemDTO from a dict -open_gray_release_rule_item_dto_from_dict = OpenGrayReleaseRuleItemDTO.from_dict(open_gray_release_rule_item_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenInstanceConfigDTO.md b/python/docs/OpenInstanceConfigDTO.md deleted file mode 100644 index be1326bc..00000000 --- a/python/docs/OpenInstanceConfigDTO.md +++ /dev/null @@ -1,31 +0,0 @@ -# OpenInstanceConfigDTO - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**release** | [**OpenReleaseDTO**](OpenReleaseDTO.md) | | [optional] -**release_delivery_time** | **str** | | [optional] -**data_change_last_modified_time** | **str** | | [optional] - -## Example - -```python -from apollo_openapi.models.open_instance_config_dto import OpenInstanceConfigDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenInstanceConfigDTO from a JSON string -open_instance_config_dto_instance = OpenInstanceConfigDTO.from_json(json) -# print the JSON string representation of the object -print(OpenInstanceConfigDTO.to_json()) - -# convert the object into a dict -open_instance_config_dto_dict = open_instance_config_dto_instance.to_dict() -# create an instance of OpenInstanceConfigDTO from a dict -open_instance_config_dto_from_dict = OpenInstanceConfigDTO.from_dict(open_instance_config_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenInstanceDTO.md b/python/docs/OpenInstanceDTO.md deleted file mode 100644 index fdf9a366..00000000 --- a/python/docs/OpenInstanceDTO.md +++ /dev/null @@ -1,35 +0,0 @@ -# OpenInstanceDTO - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**app_id** | **str** | | [optional] -**cluster_name** | **str** | | [optional] -**data_center** | **str** | | [optional] -**ip** | **str** | | [optional] -**configs** | [**List[OpenInstanceConfigDTO]**](OpenInstanceConfigDTO.md) | | [optional] -**data_change_created_time** | **str** | | [optional] - -## Example - -```python -from apollo_openapi.models.open_instance_dto import OpenInstanceDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenInstanceDTO from a JSON string -open_instance_dto_instance = OpenInstanceDTO.from_json(json) -# print the JSON string representation of the object -print(OpenInstanceDTO.to_json()) - -# convert the object into a dict -open_instance_dto_dict = open_instance_dto_instance.to_dict() -# create an instance of OpenInstanceDTO from a dict -open_instance_dto_from_dict = OpenInstanceDTO.from_dict(open_instance_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenItemDTO.md b/python/docs/OpenItemDTO.md deleted file mode 100644 index 6aac107c..00000000 --- a/python/docs/OpenItemDTO.md +++ /dev/null @@ -1,37 +0,0 @@ -# OpenItemDTO - -Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | **str** | 配置项创建者用户名,记录是谁创建了这个配置项 | [optional] -**data_change_last_modified_by** | **str** | 配置项最后修改者用户名,记录最后一次修改配置的用户 | [optional] -**data_change_created_time** | **str** | 配置项创建时间,ISO 8601格式的时间戳 | [optional] -**data_change_last_modified_time** | **str** | 配置项最后修改时间,ISO 8601格式的时间戳 | [optional] -**key** | **str** | 配置项的键名,在同一命名空间内唯一标识一个配置项 | [optional] -**type** | **int** | 配置项类型,0表示普通配置项,1表示文件类型配置项 | [optional] -**value** | **str** | 配置项的值,可以是字符串、数字、JSON等格式 | [optional] -**comment** | **str** | 配置项的注释说明,用于描述配置项的用途和含义 | [optional] - -## Example - -```python -from apollo_openapi.models.open_item_dto import OpenItemDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenItemDTO from a JSON string -open_item_dto_instance = OpenItemDTO.from_json(json) -# print the JSON string representation of the object -print(OpenItemDTO.to_json()) - -# convert the object into a dict -open_item_dto_dict = open_item_dto_instance.to_dict() -# create an instance of OpenItemDTO from a dict -open_item_dto_from_dict = OpenItemDTO.from_dict(open_item_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenNamespaceDTO.md b/python/docs/OpenNamespaceDTO.md deleted file mode 100644 index cc553cf7..00000000 --- a/python/docs/OpenNamespaceDTO.md +++ /dev/null @@ -1,40 +0,0 @@ -# OpenNamespaceDTO - -Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | **str** | 命名空间创建者用户名,记录是谁创建了这个命名空间 | [optional] -**data_change_last_modified_by** | **str** | 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 | [optional] -**data_change_created_time** | **str** | 命名空间创建时间,ISO 8601格式的时间戳 | [optional] -**data_change_last_modified_time** | **str** | 命名空间最后修改时间,ISO 8601格式的时间戳 | [optional] -**app_id** | **str** | 所属应用的唯一标识符 | [optional] -**cluster_name** | **str** | 所属集群的名称 | [optional] -**namespace_name** | **str** | 命名空间名称,在同一应用和集群下唯一标识一个命名空间 | [optional] -**comment** | **str** | 命名空间备注说明,描述命名空间的用途 | [optional] -**format** | **str** | 命名空间格式类型,如properties、xml、json、yml等 | [optional] -**is_public** | **bool** | 是否为公共命名空间,公共命名空间可以被其他应用关联使用 | [optional] -**items** | [**List[OpenItemDTO]**](OpenItemDTO.md) | 命名空间包含的配置项列表 | [optional] - -## Example - -```python -from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenNamespaceDTO from a JSON string -open_namespace_dto_instance = OpenNamespaceDTO.from_json(json) -# print the JSON string representation of the object -print(OpenNamespaceDTO.to_json()) - -# convert the object into a dict -open_namespace_dto_dict = open_namespace_dto_instance.to_dict() -# create an instance of OpenNamespaceDTO from a dict -open_namespace_dto_from_dict = OpenNamespaceDTO.from_dict(open_namespace_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenNamespaceLockDTO.md b/python/docs/OpenNamespaceLockDTO.md deleted file mode 100644 index 38ec0828..00000000 --- a/python/docs/OpenNamespaceLockDTO.md +++ /dev/null @@ -1,32 +0,0 @@ -# OpenNamespaceLockDTO - -Apollo命名空间锁状态数据传输对象 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**namespace_name** | **str** | 命名空间名称 | [optional] -**is_locked** | **bool** | 是否被锁定 | [optional] -**locked_by** | **str** | 锁定者用户名 | [optional] - -## Example - -```python -from apollo_openapi.models.open_namespace_lock_dto import OpenNamespaceLockDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenNamespaceLockDTO from a JSON string -open_namespace_lock_dto_instance = OpenNamespaceLockDTO.from_json(json) -# print the JSON string representation of the object -print(OpenNamespaceLockDTO.to_json()) - -# convert the object into a dict -open_namespace_lock_dto_dict = open_namespace_lock_dto_instance.to_dict() -# create an instance of OpenNamespaceLockDTO from a dict -open_namespace_lock_dto_from_dict = OpenNamespaceLockDTO.from_dict(open_namespace_lock_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenOrganizationDto.md b/python/docs/OpenOrganizationDto.md deleted file mode 100644 index c8e99915..00000000 --- a/python/docs/OpenOrganizationDto.md +++ /dev/null @@ -1,30 +0,0 @@ -# OpenOrganizationDto - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**org_id** | **str** | | [optional] -**org_name** | **str** | | [optional] - -## Example - -```python -from apollo_openapi.models.open_organization_dto import OpenOrganizationDto - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenOrganizationDto from a JSON string -open_organization_dto_instance = OpenOrganizationDto.from_json(json) -# print the JSON string representation of the object -print(OpenOrganizationDto.to_json()) - -# convert the object into a dict -open_organization_dto_dict = open_organization_dto_instance.to_dict() -# create an instance of OpenOrganizationDto from a dict -open_organization_dto_from_dict = OpenOrganizationDto.from_dict(open_organization_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenPageDTOOpenInstanceDTO.md b/python/docs/OpenPageDTOOpenInstanceDTO.md deleted file mode 100644 index 8008300e..00000000 --- a/python/docs/OpenPageDTOOpenInstanceDTO.md +++ /dev/null @@ -1,33 +0,0 @@ -# OpenPageDTOOpenInstanceDTO - -分页实例数据传输对象,用于返回分页查询的实例列表结果 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**page** | **int** | 当前页码,从0开始计数 | [optional] -**size** | **int** | 每页显示的记录数量 | [optional] -**total** | **int** | 总记录数,符合查询条件的实例总数量 | [optional] -**content** | [**List[OpenInstanceDTO]**](OpenInstanceDTO.md) | 当前页的实例列表,包含具体的实例数据 | [optional] - -## Example - -```python -from apollo_openapi.models.open_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenPageDTOOpenInstanceDTO from a JSON string -open_page_dto_open_instance_dto_instance = OpenPageDTOOpenInstanceDTO.from_json(json) -# print the JSON string representation of the object -print(OpenPageDTOOpenInstanceDTO.to_json()) - -# convert the object into a dict -open_page_dto_open_instance_dto_dict = open_page_dto_open_instance_dto_instance.to_dict() -# create an instance of OpenPageDTOOpenInstanceDTO from a dict -open_page_dto_open_instance_dto_from_dict = OpenPageDTOOpenInstanceDTO.from_dict(open_page_dto_open_instance_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenPageDTOOpenItemDTO.md b/python/docs/OpenPageDTOOpenItemDTO.md deleted file mode 100644 index 07f8488c..00000000 --- a/python/docs/OpenPageDTOOpenItemDTO.md +++ /dev/null @@ -1,33 +0,0 @@ -# OpenPageDTOOpenItemDTO - -分页配置项数据传输对象,用于返回分页查询的配置项列表结果 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**page** | **int** | 当前页码,从0开始计数 | [optional] -**size** | **int** | 每页显示的记录数量 | [optional] -**total** | **int** | 总记录数,符合查询条件的配置项总数量 | [optional] -**content** | [**List[OpenItemDTO]**](OpenItemDTO.md) | 当前页的配置项列表,包含具体的配置项数据 | [optional] - -## Example - -```python -from apollo_openapi.models.open_page_dto_open_item_dto import OpenPageDTOOpenItemDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenPageDTOOpenItemDTO from a JSON string -open_page_dto_open_item_dto_instance = OpenPageDTOOpenItemDTO.from_json(json) -# print the JSON string representation of the object -print(OpenPageDTOOpenItemDTO.to_json()) - -# convert the object into a dict -open_page_dto_open_item_dto_dict = open_page_dto_open_item_dto_instance.to_dict() -# create an instance of OpenPageDTOOpenItemDTO from a dict -open_page_dto_open_item_dto_from_dict = OpenPageDTOOpenItemDTO.from_dict(open_page_dto_open_item_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenReleaseDTO.md b/python/docs/OpenReleaseDTO.md deleted file mode 100644 index a6cd2547..00000000 --- a/python/docs/OpenReleaseDTO.md +++ /dev/null @@ -1,40 +0,0 @@ -# OpenReleaseDTO - -Apollo发布信息数据传输对象,表示一次配置发布的完整信息 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | **str** | 发布创建者用户名,记录是谁创建了这次发布 | [optional] -**data_change_last_modified_by** | **str** | 发布最后修改者用户名,记录最后一次修改发布信息的用户 | [optional] -**data_change_created_time** | **str** | 发布创建时间,ISO 8601格式的时间戳 | [optional] -**data_change_last_modified_time** | **str** | 发布最后修改时间,ISO 8601格式的时间戳 | [optional] -**id** | **int** | 发布记录的唯一标识符,系统自动生成 | [optional] -**app_id** | **str** | 所属应用的唯一标识符 | [optional] -**cluster_name** | **str** | 所属集群的名称 | [optional] -**namespace_name** | **str** | 所属命名空间的名称 | [optional] -**name** | **str** | 发布名称,用于标识这次发布的版本或描述 | [optional] -**configurations** | [**MapString**](MapString.md) | | [optional] -**comment** | **str** | 发布备注,描述本次发布的变更内容和目的 | [optional] - -## Example - -```python -from apollo_openapi.models.open_release_dto import OpenReleaseDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenReleaseDTO from a JSON string -open_release_dto_instance = OpenReleaseDTO.from_json(json) -# print the JSON string representation of the object -print(OpenReleaseDTO.to_json()) - -# convert the object into a dict -open_release_dto_dict = open_release_dto_instance.to_dict() -# create an instance of OpenReleaseDTO from a dict -open_release_dto_from_dict = OpenReleaseDTO.from_dict(open_release_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenapiV1AppsGet401Response.md b/python/docs/OpenapiV1AppsGet401Response.md deleted file mode 100644 index 2be5321c..00000000 --- a/python/docs/OpenapiV1AppsGet401Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# OpenapiV1AppsGet401Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | **str** | | [optional] - -## Example - -```python -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenapiV1AppsGet401Response from a JSON string -openapi_v1_apps_get401_response_instance = OpenapiV1AppsGet401Response.from_json(json) -# print the JSON string representation of the object -print(OpenapiV1AppsGet401Response.to_json()) - -# convert the object into a dict -openapi_v1_apps_get401_response_dict = openapi_v1_apps_get401_response_instance.to_dict() -# create an instance of OpenapiV1AppsGet401Response from a dict -openapi_v1_apps_get401_response_from_dict = OpenapiV1AppsGet401Response.from_dict(openapi_v1_apps_get401_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenapiV1AppsPost400Response.md b/python/docs/OpenapiV1AppsPost400Response.md deleted file mode 100644 index 5f7d27c6..00000000 --- a/python/docs/OpenapiV1AppsPost400Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# OpenapiV1AppsPost400Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | **str** | | [optional] -**exception** | **str** | | [optional] - -## Example - -```python -from apollo_openapi.models.openapi_v1_apps_post400_response import OpenapiV1AppsPost400Response - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenapiV1AppsPost400Response from a JSON string -openapi_v1_apps_post400_response_instance = OpenapiV1AppsPost400Response.from_json(json) -# print the JSON string representation of the object -print(OpenapiV1AppsPost400Response.to_json()) - -# convert the object into a dict -openapi_v1_apps_post400_response_dict = openapi_v1_apps_post400_response_instance.to_dict() -# create an instance of OpenapiV1AppsPost400Response from a dict -openapi_v1_apps_post400_response_from_dict = OpenapiV1AppsPost400Response.from_dict(openapi_v1_apps_post400_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenapiV1AppsPostRequest.md b/python/docs/OpenapiV1AppsPostRequest.md deleted file mode 100644 index 149a5f13..00000000 --- a/python/docs/OpenapiV1AppsPostRequest.md +++ /dev/null @@ -1,32 +0,0 @@ -# OpenapiV1AppsPostRequest - - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**app** | [**OpenAppDTO**](OpenAppDTO.md) | | -**assign_app_role_to_self** | **bool** | 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 | -**admins** | **List[str]** | 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 | - -## Example - -```python -from apollo_openapi.models.openapi_v1_apps_post_request import OpenapiV1AppsPostRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenapiV1AppsPostRequest from a JSON string -openapi_v1_apps_post_request_instance = OpenapiV1AppsPostRequest.from_json(json) -# print the JSON string representation of the object -print(OpenapiV1AppsPostRequest.to_json()) - -# convert the object into a dict -openapi_v1_apps_post_request_dict = openapi_v1_apps_post_request_instance.to_dict() -# create an instance of OpenapiV1AppsPostRequest from a dict -openapi_v1_apps_post_request_from_dict = OpenapiV1AppsPostRequest.from_dict(openapi_v1_apps_post_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md b/python/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md deleted file mode 100644 index 46c211ea..00000000 --- a/python/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**valid** | **bool** | | [optional] -**message** | **str** | | [optional] - -## Example - -```python -from apollo_openapi.models.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response from a JSON string -openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response_instance = OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.from_json(json) -# print the JSON string representation of the object -print(OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.to_json()) - -# convert the object into a dict -openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response_dict = openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response_instance.to_dict() -# create an instance of OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response from a dict -openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response_from_dict = OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.from_dict(openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md b/python/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md deleted file mode 100644 index d3de248a..00000000 --- a/python/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md +++ /dev/null @@ -1,31 +0,0 @@ -# OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**valid** | **bool** | | [optional] -**message** | **str** | | [optional] -**errors** | **List[str]** | | [optional] - -## Example - -```python -from apollo_openapi.models.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response from a JSON string -openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response_instance = OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.from_json(json) -# print the JSON string representation of the object -print(OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.to_json()) - -# convert the object into a dict -openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response_dict = openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response_instance.to_dict() -# create an instance of OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response from a dict -openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response_from_dict = OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.from_dict(openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md b/python/docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md deleted file mode 100644 index 711b774f..00000000 --- a/python/docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# OpenapiV1EnvsEnvReleasesCompareGet200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**changes** | [**List[Change]**](Change.md) | | [optional] - -## Example - -```python -from apollo_openapi.models.openapi_v1_envs_env_releases_compare_get200_response import OpenapiV1EnvsEnvReleasesCompareGet200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenapiV1EnvsEnvReleasesCompareGet200Response from a JSON string -openapi_v1_envs_env_releases_compare_get200_response_instance = OpenapiV1EnvsEnvReleasesCompareGet200Response.from_json(json) -# print the JSON string representation of the object -print(OpenapiV1EnvsEnvReleasesCompareGet200Response.to_json()) - -# convert the object into a dict -openapi_v1_envs_env_releases_compare_get200_response_dict = openapi_v1_envs_env_releases_compare_get200_response_instance.to_dict() -# create an instance of OpenapiV1EnvsEnvReleasesCompareGet200Response from a dict -openapi_v1_envs_env_releases_compare_get200_response_from_dict = OpenapiV1EnvsEnvReleasesCompareGet200Response.from_dict(openapi_v1_envs_env_releases_compare_get200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OrganizationManagementApi.md b/python/docs/OrganizationManagementApi.md deleted file mode 100644 index 4e827384..00000000 --- a/python/docs/OrganizationManagementApi.md +++ /dev/null @@ -1,85 +0,0 @@ -# apollo_openapi.OrganizationManagementApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**openapi_v1_organizations_get**](OrganizationManagementApi.md#openapi_v1_organizations_get) | **GET** /openapi/v1/organizations | 获取所有组织信息 - - -# **openapi_v1_organizations_get** -> List[OpenOrganizationDto] openapi_v1_organizations_get() - -获取所有组织信息 - -GET /openapi/v1/organizations - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_organization_dto import OpenOrganizationDto -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.OrganizationManagementApi(api_client) - - try: - # 获取所有组织信息 - api_response = api_instance.openapi_v1_organizations_get() - print("The response of OrganizationManagementApi->openapi_v1_organizations_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling OrganizationManagementApi->openapi_v1_organizations_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**List[OpenOrganizationDto]**](OpenOrganizationDto.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 成功获取组织列表 | - | -**401** | 未授权访问 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/python/docs/ReleaseDTO.md b/python/docs/ReleaseDTO.md deleted file mode 100644 index 1d491235..00000000 --- a/python/docs/ReleaseDTO.md +++ /dev/null @@ -1,43 +0,0 @@ -# ReleaseDTO - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | **str** | | [optional] -**data_change_last_modified_by** | **str** | | [optional] -**data_change_created_by_display_name** | **str** | | [optional] -**data_change_last_modified_by_display_name** | **str** | | [optional] -**data_change_created_time** | **str** | | [optional] -**data_change_last_modified_time** | **str** | | [optional] -**id** | **int** | | [optional] -**release_key** | **str** | | [optional] -**name** | **str** | | [optional] -**app_id** | **str** | | [optional] -**cluster_name** | **str** | | [optional] -**namespace_name** | **str** | | [optional] -**configurations** | **str** | | [optional] -**comment** | **str** | | [optional] -**is_abandoned** | **bool** | | [optional] - -## Example - -```python -from apollo_openapi.models.release_dto import ReleaseDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of ReleaseDTO from a JSON string -release_dto_instance = ReleaseDTO.from_json(json) -# print the JSON string representation of the object -print(ReleaseDTO.to_json()) - -# convert the object into a dict -release_dto_dict = release_dto_instance.to_dict() -# create an instance of ReleaseDTO from a dict -release_dto_from_dict = ReleaseDTO.from_dict(release_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/ReleaseManagementApi.md b/python/docs/ReleaseManagementApi.md deleted file mode 100644 index 55dc1b65..00000000 --- a/python/docs/ReleaseManagementApi.md +++ /dev/null @@ -1,615 +0,0 @@ -# apollo_openapi.ReleaseManagementApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get**](ReleaseManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active | 获取活跃发布(分页) -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get**](ReleaseManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all | 获取所有发布(分页) -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get**](ReleaseManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest | 获取最新活跃发布 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post**](ReleaseManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases | 创建发布 -[**openapi_v1_envs_env_releases_compare_get**](ReleaseManagementApi.md#openapi_v1_envs_env_releases_compare_get) | **GET** /openapi/v1/envs/{env}/releases/compare | 对比发布 -[**openapi_v1_envs_env_releases_release_id_get**](ReleaseManagementApi.md#openapi_v1_envs_env_releases_release_id_get) | **GET** /openapi/v1/envs/{env}/releases/{releaseId} | 获取发布详情 -[**openapi_v1_envs_env_releases_release_id_rollback_put**](ReleaseManagementApi.md#openapi_v1_envs_env_releases_release_id_rollback_put) | **PUT** /openapi/v1/envs/{env}/releases/{releaseId}/rollback | 回滚发布 - - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get** -> List[OpenReleaseDTO] openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get(app_id, env, cluster_name, namespace_name, page, size) - -获取活跃发布(分页) - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_release_dto import OpenReleaseDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ReleaseManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - page = 0 # int | - size = 5 # int | - - try: - # 获取活跃发布(分页) - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get(app_id, env, cluster_name, namespace_name, page, size) - print("The response of ReleaseManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ReleaseManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **page** | **int**| | - **size** | **int**| | - -### Return type - -[**List[OpenReleaseDTO]**](OpenReleaseDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get** -> List[ListReleaseBO] openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get(app_id, env, cluster_name, namespace_name, page, size) - -获取所有发布(分页) - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.list_release_bo import ListReleaseBO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ReleaseManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - page = 0 # int | - size = 5 # int | - - try: - # 获取所有发布(分页) - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get(app_id, env, cluster_name, namespace_name, page, size) - print("The response of ReleaseManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ReleaseManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **page** | **int**| | - **size** | **int**| | - -### Return type - -[**List[ListReleaseBO]**](ListReleaseBO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get** -> OpenReleaseDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get(app_id, env, cluster_name, namespace_name) - -获取最新活跃发布 - - - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_release_dto import OpenReleaseDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ReleaseManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - - try: - # 获取最新活跃发布 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get(app_id, env, cluster_name, namespace_name) - print("The response of ReleaseManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ReleaseManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - -### Return type - -[**OpenReleaseDTO**](OpenReleaseDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 成功获取最新活跃发布 | - | -**404** | 未找到活跃发布 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post** -> OpenReleaseDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post(app_id, env, cluster_name, namespace_name, namespace_release_dto) - -创建发布 - - - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.namespace_release_dto import NamespaceReleaseDTO -from apollo_openapi.models.open_release_dto import OpenReleaseDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ReleaseManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - namespace_release_dto = apollo_openapi.NamespaceReleaseDTO() # NamespaceReleaseDTO | - - try: - # 创建发布 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post(app_id, env, cluster_name, namespace_name, namespace_release_dto) - print("The response of ReleaseManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ReleaseManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **namespace_release_dto** | [**NamespaceReleaseDTO**](NamespaceReleaseDTO.md)| | - -### Return type - -[**OpenReleaseDTO**](OpenReleaseDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 发布创建成功 | - | -**400** | 发布参数错误 | - | -**403** | 权限不足 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_releases_compare_get** -> OpenapiV1EnvsEnvReleasesCompareGet200Response openapi_v1_envs_env_releases_compare_get(env, base_release_id, to_compare_release_id) - -对比发布 - -GET /openapi/v1/envs/{env}/releases/compare - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.openapi_v1_envs_env_releases_compare_get200_response import OpenapiV1EnvsEnvReleasesCompareGet200Response -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ReleaseManagementApi(api_client) - env = 'env_example' # str | - base_release_id = 56 # int | - to_compare_release_id = 56 # int | - - try: - # 对比发布 - api_response = api_instance.openapi_v1_envs_env_releases_compare_get(env, base_release_id, to_compare_release_id) - print("The response of ReleaseManagementApi->openapi_v1_envs_env_releases_compare_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ReleaseManagementApi->openapi_v1_envs_env_releases_compare_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env** | **str**| | - **base_release_id** | **int**| | - **to_compare_release_id** | **int**| | - -### Return type - -[**OpenapiV1EnvsEnvReleasesCompareGet200Response**](OpenapiV1EnvsEnvReleasesCompareGet200Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_releases_release_id_get** -> OpenReleaseDTO openapi_v1_envs_env_releases_release_id_get(env, release_id) - -获取发布详情 - -GET /openapi/v1/envs/{env}/releases/{releaseId} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_release_dto import OpenReleaseDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ReleaseManagementApi(api_client) - env = 'env_example' # str | - release_id = 56 # int | - - try: - # 获取发布详情 - api_response = api_instance.openapi_v1_envs_env_releases_release_id_get(env, release_id) - print("The response of ReleaseManagementApi->openapi_v1_envs_env_releases_release_id_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ReleaseManagementApi->openapi_v1_envs_env_releases_release_id_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env** | **str**| | - **release_id** | **int**| | - -### Return type - -[**OpenReleaseDTO**](OpenReleaseDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **openapi_v1_envs_env_releases_release_id_rollback_put** -> object openapi_v1_envs_env_releases_release_id_rollback_put(env, release_id, operator) - -回滚发布 - - - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ReleaseManagementApi(api_client) - env = 'env_example' # str | - release_id = 56 # int | - operator = 'operator_example' # str | - - try: - # 回滚发布 - api_response = api_instance.openapi_v1_envs_env_releases_release_id_rollback_put(env, release_id, operator) - print("The response of ReleaseManagementApi->openapi_v1_envs_env_releases_release_id_rollback_put:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ReleaseManagementApi->openapi_v1_envs_env_releases_release_id_rollback_put: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env** | **str**| | - **release_id** | **int**| | - **operator** | **str**| | - -### Return type - -**object** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/python/docs/apis/tags/AppManagementApi.md b/python/docs/apis/tags/AppManagementApi.md new file mode 100644 index 00000000..8dba7b37 --- /dev/null +++ b/python/docs/apis/tags/AppManagementApi.md @@ -0,0 +1,1575 @@ + +# apollo_openapi.apis.tags.app_management_api.AppManagementApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_app**](#create_app) | **post** /openapi/v1/apps | 创建应用 (original openapi) +[**create_app_in_env**](#create_app_in_env) | **post** /openapi/v1/apps/envs/{env} | 在指定环境创建应用(new added) +[**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) +[**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) +[**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) + +创建应用 (original openapi) + +POST /openapi/v1/apps + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import app_management_api +from apollo_openapi.model.exception_response import ExceptionResponse +from apollo_openapi.model.open_create_app_dto import OpenCreateAppDTO +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = app_management_api.AppManagementApi(api_client) + + # example passing only required values which don't have defaults set + body = OpenCreateAppDTO( + assign_app_role_to_self=True, + admins=[ + "admins_example" + ], + app=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", + ), + ) + try: + # 创建应用 (original openapi) + api_response = api_instance.create_app( + body=body, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling AppManagementApi->create_app: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenCreateAppDTO**](../../models/OpenCreateAppDTO.md) | | + + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#create_app.ApiResponseFor200) | 应用创建成功 +400 | [ApiResponseFor400](#create_app.ApiResponseFor400) | 请求参数错误 +403 | [ApiResponseFor403](#create_app.ApiResponseFor403) | 权限不足 + +#### create_app.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +#### create_app.ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor400ResponseBodyApplicationJson + +## 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 +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson + +## 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 + +[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) + +# **create_app_in_env** + +> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} create_app_in_env(envoperatoropen_app_dto) + +在指定环境创建应用(new added) + +POST /openapi/v1/apps/envs/{env} + +### Example + +* Api Key Authentication (ApiKeyAuth): +```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 pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = app_management_api.AppManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'env': "env_example", + } + query_params = { + 'operator': "operator_example", + } + 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", + ) + 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) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenAppDTO**](../../models/OpenAppDTO.md) | | + + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +operator | OperatorSchema | | + + +# OperatorSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### 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](#create_app_in_env.ApiResponseFor200) | 应用在指定环境创建成功 +400 | [ApiResponseFor400](#create_app_in_env.ApiResponseFor400) | 请求参数错误 +403 | [ApiResponseFor403](#create_app_in_env.ApiResponseFor403) | 权限不足 + +#### create_app_in_env.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +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 +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor400ResponseBodyApplicationJson + +## 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 +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson + +## 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 + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **delete_app** + +> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} delete_app(app_idoperator) + +删除应用(new added) + +DELETE /openapi/v1/apps/{appId} + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import app_management_api +from apollo_openapi.model.exception_response import ExceptionResponse +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = app_management_api.AppManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + } + query_params = { + 'operator': "operator_example", + } + 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) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +operator | OperatorSchema | | + + +# OperatorSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#delete_app.ApiResponseFor200) | 应用删除成功 +403 | [ApiResponseFor403](#delete_app.ApiResponseFor403) | 权限不足,需要超级管理员权限 +404 | [ApiResponseFor404](#delete_app.ApiResponseFor404) | 应用不存在 + +#### delete_app.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +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 +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson + +## 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 +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson + +## 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 + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **find_apps** + +> [OpenAppDTO] find_apps() + +查找应用 (original openapi) + +POST /openapi/v1/apps + +### Example + +* Api Key Authentication (ApiKeyAuth): +```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 pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = app_management_api.AppManagementApi(api_client) + + # example passing only optional values + query_params = { + 'appIds': "123", + } + try: + # 查找应用 (original openapi) + api_response = api_instance.find_apps( + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling AppManagementApi->find_apps: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appIds | AppIdsSchema | | optional + + +# AppIdsSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#find_apps.ApiResponseFor200) | 成功获取应用列表 +401 | [ApiResponseFor401](#find_apps.ApiResponseFor401) | 未授权访问 + +#### find_apps.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenAppDTO**]({{complexTypePrefix}}OpenAppDTO.md) | [**OpenAppDTO**]({{complexTypePrefix}}OpenAppDTO.md) | [**OpenAppDTO**]({{complexTypePrefix}}OpenAppDTO.md) | | + +#### find_apps.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) | | + +### Authorization + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **find_apps_authorized** + +> [OpenAppDTO] find_apps_authorized() + +获取当前Consumer授权的应用列表 (original openapi) + +GET /openapi/v1/apps/authorized + +### Example + +* Api Key Authentication (ApiKeyAuth): +```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 pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = app_management_api.AppManagementApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # 获取当前Consumer授权的应用列表 (original openapi) + api_response = api_instance.find_apps_authorized() + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling AppManagementApi->find_apps_authorized: %s\n" % e) +``` +### Parameters +This endpoint does not need any parameter. + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#find_apps_authorized.ApiResponseFor200) | 成功获取授权应用列表 +401 | [ApiResponseFor401](#find_apps_authorized.ApiResponseFor401) | 未授权访问 + +#### find_apps_authorized.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenAppDTO**]({{complexTypePrefix}}OpenAppDTO.md) | [**OpenAppDTO**]({{complexTypePrefix}}OpenAppDTO.md) | [**OpenAppDTO**]({{complexTypePrefix}}OpenAppDTO.md) | | + +#### find_apps_authorized.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) | | + +### Authorization + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **find_miss_envs** + +> MultiResponseEntity find_miss_envs(app_id) + +查找缺失的环境(new added) + +GET /openapi/v1/apps/{appId}/miss_envs + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +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 pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = app_management_api.AppManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + } + try: + # 查找缺失的环境(new added) + api_response = api_instance.find_miss_envs( + path_params=path_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling AppManagementApi->find_miss_envs: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#find_miss_envs.ApiResponseFor200) | 成功获取应用缺失的环境列表 +404 | [ApiResponseFor404](#find_miss_envs.ApiResponseFor404) | 应用不存在 + +#### find_miss_envs.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MultiResponseEntity**](../../models/MultiResponseEntity.md) | | + + +#### find_miss_envs.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson + +## 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 + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_app** + +> OpenAppDTO get_app(app_id) + +获取单个应用信息(new added) + +GET /openapi/v1/apps/{appId} + +### Example + +* Api Key Authentication (ApiKeyAuth): +```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 pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = app_management_api.AppManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + } + try: + # 获取单个应用信息(new added) + api_response = api_instance.get_app( + path_params=path_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling AppManagementApi->get_app: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_app.ApiResponseFor200) | 成功获取应用信息 +404 | [ApiResponseFor404](#get_app.ApiResponseFor404) | 应用不存在 + +#### get_app.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenAppDTO**](../../models/OpenAppDTO.md) | | + + +#### get_app.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson + +## 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 + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_app_nav_tree** + +> MultiResponseEntity get_app_nav_tree(app_id) + +获取应用导航树(new added) + +GET /openapi/v1/apps/{appId}/navtree + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import app_management_api +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. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = app_management_api.AppManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + } + try: + # 获取应用导航树(new added) + api_response = api_instance.get_app_nav_tree( + path_params=path_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling AppManagementApi->get_app_nav_tree: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_app_nav_tree.ApiResponseFor200) | 成功获取应用导航树 + +#### get_app_nav_tree.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**MultiResponseEntity**](../../models/MultiResponseEntity.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_apps_by_self** + +> [OpenAppDTO] get_apps_by_self(pagesize) + +获取当前Consumer的应用列表(分页)(new added) + +GET /openapi/v1/apps/by-self + +### Example + +* Api Key Authentication (ApiKeyAuth): +```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 pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = app_management_api.AppManagementApi(api_client) + + # example passing only required values which don't have defaults set + query_params = { + 'page': 0, + 'size': 0, + } + try: + # 获取当前Consumer的应用列表(分页)(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_apps_by_self: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +page | PageSchema | | +size | SizeSchema | | + + +# PageSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | + +# SizeSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | + +### 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) | 未授权访问 + +#### get_apps_by_self.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**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) | | + +### 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_env_cluster_info** + +> [OpenEnvClusterDTO] get_env_cluster_info(app_id) + +获取应用的环境集群信息 (original openapi) + +GET /openapi/v1/apps/{appId}/envclusters + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import app_management_api +from apollo_openapi.model.open_env_cluster_dto import OpenEnvClusterDTO +from apollo_openapi.model.exception_response import ExceptionResponse +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = app_management_api.AppManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + } + try: + # 获取应用的环境集群信息 (original openapi) + 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_env_cluster_info: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_env_cluster_info.ApiResponseFor200) | 成功获取应用环境集群信息 +404 | [ApiResponseFor404](#get_env_cluster_info.ApiResponseFor404) | 应用不存在 + +#### get_env_cluster_info.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenEnvClusterDTO**]({{complexTypePrefix}}OpenEnvClusterDTO.md) | [**OpenEnvClusterDTO**]({{complexTypePrefix}}OpenEnvClusterDTO.md) | [**OpenEnvClusterDTO**]({{complexTypePrefix}}OpenEnvClusterDTO.md) | | + +#### get_env_cluster_info.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson + +## 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 + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **update_app** + +> OpenAppDTO update_app(app_idoperatoropen_app_dto) + +更新应用(new added) + +PUT /openapi/v1/apps/{appId} + +### Example + +* Api Key Authentication (ApiKeyAuth): +```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 pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = app_management_api.AppManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + } + query_params = { + 'operator': "operator_example", + } + 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", + ) + 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) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenAppDTO**](../../models/OpenAppDTO.md) | | + + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +operator | OperatorSchema | | + + +# OperatorSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#update_app.ApiResponseFor200) | 应用更新成功 +400 | [ApiResponseFor400](#update_app.ApiResponseFor400) | 请求参数错误 +403 | [ApiResponseFor403](#update_app.ApiResponseFor403) | 权限不足 + +#### update_app.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenAppDTO**](../../models/OpenAppDTO.md) | | + + +#### update_app.ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor400ResponseBodyApplicationJson + +## 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 +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson + +## 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 + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) diff --git a/python/docs/apis/tags/ClusterManagementApi.md b/python/docs/apis/tags/ClusterManagementApi.md new file mode 100644 index 00000000..af6f9e6f --- /dev/null +++ b/python/docs/apis/tags/ClusterManagementApi.md @@ -0,0 +1,536 @@ + +# apollo_openapi.apis.tags.cluster_management_api.ClusterManagementApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_cluster**](#create_cluster) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters | 创建集群 (original openapi) +[**delete_cluster**](#delete_cluster) | **delete** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 删除集群 (new added) +[**get_cluster**](#get_cluster) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 获取指定集群信息 (original openapi) + +# **create_cluster** + +> OpenClusterDTO create_cluster(app_idenvopen_cluster_dto) + +创建集群 (original openapi) + +POST /openapi/v1/envs/{env}/apps/{appId}/clusters + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import cluster_management_api +from apollo_openapi.model.open_cluster_dto import OpenClusterDTO +from apollo_openapi.model.exception_response import ExceptionResponse +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cluster_management_api.ClusterManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + } + body = OpenClusterDTO( + 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", + ) + try: + # 创建集群 (original openapi) + api_response = api_instance.create_cluster( + path_params=path_params, + body=body, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling ClusterManagementApi->create_cluster: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenClusterDTO**](../../models/OpenClusterDTO.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# 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](#create_cluster.ApiResponseFor200) | 集群创建成功 +400 | [ApiResponseFor400](#create_cluster.ApiResponseFor400) | 请求参数错误 +403 | [ApiResponseFor403](#create_cluster.ApiResponseFor403) | 权限不足 + +#### create_cluster.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenClusterDTO**](../../models/OpenClusterDTO.md) | | + + +#### create_cluster.ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor400ResponseBodyApplicationJson + +## 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 +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson + +## 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 + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **delete_cluster** + +> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} delete_cluster(envapp_idcluster_nameoperator) + +删除集群 (new added) + +DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import cluster_management_api +from apollo_openapi.model.exception_response import ExceptionResponse +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cluster_management_api.ClusterManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'env': "env_example", + 'appId': "appId_example", + 'clusterName': "clusterName_example", + } + query_params = { + 'operator': "operator_example", + } + try: + # 删除集群 (new added) + api_response = api_instance.delete_cluster( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling ClusterManagementApi->delete_cluster: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +operator | OperatorSchema | | + + +# OperatorSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +env | EnvSchema | | +appId | AppIdSchema | | +clusterName | ClusterNameSchema | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#delete_cluster.ApiResponseFor200) | 集群删除成功 +400 | [ApiResponseFor400](#delete_cluster.ApiResponseFor400) | 删除失败,集群可能包含配置 +403 | [ApiResponseFor403](#delete_cluster.ApiResponseFor403) | 权限不足 +404 | [ApiResponseFor404](#delete_cluster.ApiResponseFor404) | 集群不存在 + +#### delete_cluster.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +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 +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor400ResponseBodyApplicationJson + +## 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 +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson + +## 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 +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson + +## 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 + +[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_cluster** + +> OpenClusterDTO get_cluster(app_idcluster_nameenv) + +获取指定集群信息 (original openapi) + +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import cluster_management_api +from apollo_openapi.model.open_cluster_dto import OpenClusterDTO +from apollo_openapi.model.exception_response import ExceptionResponse +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cluster_management_api.ClusterManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'clusterName': "clusterName_example", + 'env': "env_example", + } + try: + # 获取指定集群信息 (original openapi) + api_response = api_instance.get_cluster( + path_params=path_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling ClusterManagementApi->get_cluster: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +clusterName | ClusterNameSchema | | +env | EnvSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# 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_cluster.ApiResponseFor200) | 成功获取集群信息 +404 | [ApiResponseFor404](#get_cluster.ApiResponseFor404) | 集群不存在 + +#### get_cluster.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenClusterDTO**](../../models/OpenClusterDTO.md) | | + + +#### get_cluster.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson + +## 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 + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) diff --git a/python/docs/apis/tags/InstanceManagementApi.md b/python/docs/apis/tags/InstanceManagementApi.md new file mode 100644 index 00000000..797c1f78 --- /dev/null +++ b/python/docs/apis/tags/InstanceManagementApi.md @@ -0,0 +1,447 @@ + +# apollo_openapi.apis.tags.instance_management_api.InstanceManagementApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_instance_count_by_namespace**](#get_instance_count_by_namespace) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 获取命名空间下的实例数量 (original openapi) +[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get**](#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int | 查询不在指定发布版本中的实例 (new added) +[**openapi_v1_envs_env_releases_release_id_instances_get**](#openapi_v1_envs_env_releases_release_id_instances_get) | **get** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) (new added) + +# **get_instance_count_by_namespace** + +> int get_instance_count_by_namespace(envapp_idcluster_namenamespace_name) + +获取命名空间下的实例数量 (original openapi) + +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import instance_management_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = instance_management_api.InstanceManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'env': "env_example", + 'appId': "appId_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } + try: + # 获取命名空间下的实例数量 (original openapi) + api_response = api_instance.get_instance_count_by_namespace( + path_params=path_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling InstanceManagementApi->get_instance_count_by_namespace: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +env | EnvSchema | | +appId | AppIdSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# 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, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_instance_count_by_namespace.ApiResponseFor200) | 成功返回实例数量 + +#### get_instance_count_by_namespace.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | + +### 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) + +# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get** + +> [OpenInstanceDTO] openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get(envapp_idcluster_namenamespace_name) + +查询不在指定发布版本中的实例 (new added) + +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import instance_management_api +from apollo_openapi.model.open_instance_dto import OpenInstanceDTO +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", + 'appId': "appId_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } + query_params = { + } + try: + # 查询不在指定发布版本中的实例 (new added) + api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling InstanceManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get: %s\n" % e) + + # example passing only optional values + path_params = { + 'env': "env_example", + 'appId': "appId_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } + query_params = { + 'excludeReleases': "excludeReleases_example", + } + try: + # 查询不在指定发布版本中的实例 (new added) + api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling InstanceManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get: %s\n" % e) +``` +### 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 +------------- | ------------- | ------------- | ------------- +excludeReleases | ExcludeReleasesSchema | | optional + + +# ExcludeReleasesSchema + +## 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 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# 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, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get.ApiResponseFor200) | + +#### openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenInstanceDTO**]({{complexTypePrefix}}OpenInstanceDTO.md) | [**OpenInstanceDTO**]({{complexTypePrefix}}OpenInstanceDTO.md) | [**OpenInstanceDTO**]({{complexTypePrefix}}OpenInstanceDTO.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) + +# **openapi_v1_envs_env_releases_release_id_instances_get** + +> OpenPageDTOOpenInstanceDTO openapi_v1_envs_env_releases_release_id_instances_get(envrelease_idpagesize) + +根据发布版本查询实例(支持分页) (new added) + +GET /openapi/v1/envs/{env}/releases/{releaseId}/instances + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import instance_management_api +from apollo_openapi.model.open_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +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", + 'releaseId': 1, + } + query_params = { + 'page': 0, + 'size': 20, + } + try: + # 根据发布版本查询实例(支持分页) (new added) + api_response = api_instance.openapi_v1_envs_env_releases_release_id_instances_get( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling InstanceManagementApi->openapi_v1_envs_env_releases_release_id_instances_get: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +page | PageSchema | | +size | SizeSchema | | + + +# PageSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | + +# SizeSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +env | EnvSchema | | +releaseId | ReleaseIdSchema | | + +# EnvSchema + +## Model Type Info +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 +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#openapi_v1_envs_env_releases_release_id_instances_get.ApiResponseFor200) | + +#### openapi_v1_envs_env_releases_release_id_instances_get.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenPageDTOOpenInstanceDTO**](../../models/OpenPageDTOOpenInstanceDTO.md) | | + + +### Authorization + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) diff --git a/python/docs/apis/tags/ItemManagementApi.md b/python/docs/apis/tags/ItemManagementApi.md new file mode 100644 index 00000000..3f7fdf45 --- /dev/null +++ b/python/docs/apis/tags/ItemManagementApi.md @@ -0,0 +1,2733 @@ + +# apollo_openapi.apis.tags.item_management_api.ItemManagementApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**batch_update_items_by_text**](#batch_update_items_by_text) | **put** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate | 通过文本批量修改配置项 (new added) +[**compare_items**](#compare_items) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare | 对比命名空间配置差异 (new added) +[**create_item**](#create_item) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 创建新的配置项 (original openapi) +[**delete_item**](#delete_item) | **delete** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 删除配置项 (original openapi) +[**delete_item_by_encoded_key**](#delete_item_by_encoded_key) | **delete** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key删除配置项 (original openapi) +[**find_items_by_namespace**](#find_items_by_namespace) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 获取命名空间下的配置项列表 (original openapi) +[**get_branch_items**](#get_branch_items) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items | 获取分支下的配置项 (new added) +[**get_item**](#get_item) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 获取单个配置项 (original openapi) +[**get_item_by_encoded_key**](#get_item_by_encoded_key) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过查询参数获取配置项(支持编码的key) (original openapi) +[**revert_items**](#revert_items) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert | 撤销配置项更改 (new added) +[**sync_items**](#sync_items) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync | 同步配置项到多个命名空间 (new added) +[**update_item**](#update_item) | **put** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 更新配置项 (original openapi) +[**update_item_by_encoded_key**](#update_item_by_encoded_key) | **put** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key更新配置项 (original openapi) +[**validate_items**](#validate_items) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate | 验证配置文本语法 (new added) + +# **batch_update_items_by_text** + +> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} batch_update_items_by_text(app_idenvcluster_namenamespace_nameoperatoropen_namespace_text_model) + +通过文本批量修改配置项 (new added) + +PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate: + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import item_management_api +from apollo_openapi.model.exception_response import ExceptionResponse +from apollo_openapi.model.open_namespace_text_model import OpenNamespaceTextModel +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +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 = item_management_api.ItemManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } + query_params = { + 'operator': "operator_example", + } + body = OpenNamespaceTextModel( + app_id="app_id_example", + env="env_example", + cluster_name="cluster_name_example", + namespace_name="namespace_name_example", + namespace_id=1, + format="format_example", + config_text="config_text_example", + operator="operator_example", + ) + try: + # 通过文本批量修改配置项 (new added) + api_response = api_instance.batch_update_items_by_text( + path_params=path_params, + query_params=query_params, + body=body, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling ItemManagementApi->batch_update_items_by_text: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenNamespaceTextModel**](../../models/OpenNamespaceTextModel.md) | | + + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +operator | OperatorSchema | | + + +# OperatorSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#batch_update_items_by_text.ApiResponseFor200) | 批量更新配置项成功 +403 | [ApiResponseFor403](#batch_update_items_by_text.ApiResponseFor403) | 权限不足 + +#### batch_update_items_by_text.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +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 +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson + +## 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 + +[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) + +# **compare_items** + +> [OpenItemDiffs] compare_items(app_idenvcluster_namenamespace_nameopen_namespace_sync_model) + +对比命名空间配置差异 (new added) + +POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import item_management_api +from apollo_openapi.model.open_item_diffs import OpenItemDiffs +from apollo_openapi.model.open_namespace_sync_model import OpenNamespaceSyncModel +from 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 = item_management_api.ItemManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } + body = OpenNamespaceSyncModel( + sync_to_namespaces=[ + OpenNamespaceIdentifier( + app_id="app_id_example", + env="env_example", + cluster_name="cluster_name_example", + namespace_name="namespace_name_example", + ) + ], + sync_items=[ + OpenItemDTO( + data_change_created_by="data_change_created_by_example", + data_change_last_modified_by="data_change_last_modified_by_example", + data_change_created_time="2025-09-29T12:34:56Z", + data_change_last_modified_time="2025-09-29T12:34:56Z", + key="key_example", + type=1, + value="value_example", + comment="comment_example", + ) + ], + ) + try: + # 对比命名空间配置差异 (new added) + api_response = api_instance.compare_items( + path_params=path_params, + body=body, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling ItemManagementApi->compare_items: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenNamespaceSyncModel**](../../models/OpenNamespaceSyncModel.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#compare_items.ApiResponseFor200) | 成功对比命名空间配置差异 + +#### compare_items.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenItemDiffs**]({{complexTypePrefix}}OpenItemDiffs.md) | [**OpenItemDiffs**]({{complexTypePrefix}}OpenItemDiffs.md) | [**OpenItemDiffs**]({{complexTypePrefix}}OpenItemDiffs.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) + +# **create_item** + +> OpenItemDTO create_item(app_idenvcluster_namenamespace_nameoperatoropen_item_dto) + +创建新的配置项 (original openapi) + +POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import item_management_api +from apollo_openapi.model.open_item_dto import OpenItemDTO +from apollo_openapi.model.exception_response import ExceptionResponse +from 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 = item_management_api.ItemManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } + query_params = { + 'operator': "operator_example", + } + body = OpenItemDTO( + data_change_created_by="data_change_created_by_example", + data_change_last_modified_by="data_change_last_modified_by_example", + data_change_created_time="2025-09-29T12:34:56Z", + data_change_last_modified_time="2025-09-29T12:34:56Z", + key="key_example", + type=1, + value="value_example", + comment="comment_example", + ) + try: + # 创建新的配置项 (original openapi) + api_response = api_instance.create_item( + path_params=path_params, + query_params=query_params, + body=body, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling ItemManagementApi->create_item: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenItemDTO**](../../models/OpenItemDTO.md) | | + + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +operator | OperatorSchema | | + + +# OperatorSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#create_item.ApiResponseFor200) | 配置项创建成功 +400 | [ApiResponseFor400](#create_item.ApiResponseFor400) | 请求参数错误 +403 | [ApiResponseFor403](#create_item.ApiResponseFor403) | 权限不足 + +#### create_item.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenItemDTO**](../../models/OpenItemDTO.md) | | + + +#### create_item.ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor400ResponseBodyApplicationJson + +## 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 +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson + +## 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 + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **delete_item** + +> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} delete_item(app_idenvcluster_namenamespace_namekeyoperator) + +删除配置项 (original openapi) + +DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import item_management_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = item_management_api.ItemManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + 'key': "key_example", + } + query_params = { + 'operator': "operator_example", + } + try: + # 删除配置项 (original openapi) + api_response = api_instance.delete_item( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling ItemManagementApi->delete_item: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +operator | OperatorSchema | | + + +# OperatorSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | +key | KeySchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# KeySchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#delete_item.ApiResponseFor200) | 配置项删除成功 + +#### delete_item.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +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) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **delete_item_by_encoded_key** + +> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} delete_item_by_encoded_key(app_idenvcluster_namenamespace_namekeyoperator) + +通过编码的key删除配置项 (original openapi) + +DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import item_management_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = item_management_api.ItemManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + 'key': "key_example", + } + query_params = { + 'operator': "operator_example", + } + try: + # 通过编码的key删除配置项 (original openapi) + api_response = api_instance.delete_item_by_encoded_key( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling ItemManagementApi->delete_item_by_encoded_key: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +operator | OperatorSchema | | + + +# OperatorSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | +key | KeySchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# KeySchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#delete_item_by_encoded_key.ApiResponseFor200) | + +#### delete_item_by_encoded_key.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +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) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **find_items_by_namespace** + +> OpenPageDTOOpenItemDTO find_items_by_namespace(app_idenvcluster_namenamespace_namepagesize) + +获取命名空间下的配置项列表 (original openapi) + +获取指定命名空间的配置项列表,支持分页 + +### Example + +* Api Key Authentication (ApiKeyAuth): +```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.exception_response import ExceptionResponse +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = item_management_api.ItemManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } + query_params = { + 'page': 0, + 'size': 50, + } + try: + # 获取命名空间下的配置项列表 (original openapi) + api_response = api_instance.find_items_by_namespace( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling ItemManagementApi->find_items_by_namespace: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +page | PageSchema | | +size | SizeSchema | | + + +# PageSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | + +# SizeSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#find_items_by_namespace.ApiResponseFor200) | 成功获取配置项列表 +404 | [ApiResponseFor404](#find_items_by_namespace.ApiResponseFor404) | 命名空间不存在 + +#### find_items_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 +------------- | ------------- | ------------- +[**OpenPageDTOOpenItemDTO**](../../models/OpenPageDTOOpenItemDTO.md) | | + + +#### find_items_by_namespace.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson + +## 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 + +[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_branch_items** + +> [OpenItemDTO] get_branch_items(app_idenvcluster_namenamespace_namebranch_name) + +获取分支下的配置项 (new added) + +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import item_management_api +from apollo_openapi.model.open_item_dto import OpenItemDTO +from apollo_openapi.model.exception_response import ExceptionResponse +from 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 = item_management_api.ItemManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + 'branchName': "branchName_example", + } + try: + # 获取分支下的配置项 (new added) + api_response = api_instance.get_branch_items( + path_params=path_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling ItemManagementApi->get_branch_items: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | +branchName | BranchNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# BranchNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_branch_items.ApiResponseFor200) | 成功获取分支下的配置项列表 +404 | [ApiResponseFor404](#get_branch_items.ApiResponseFor404) | 分支不存在 + +#### get_branch_items.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenItemDTO**]({{complexTypePrefix}}OpenItemDTO.md) | [**OpenItemDTO**]({{complexTypePrefix}}OpenItemDTO.md) | [**OpenItemDTO**]({{complexTypePrefix}}OpenItemDTO.md) | | + +#### get_branch_items.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson + +## 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 + +[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_item** + +> OpenItemDTO get_item(app_idenvcluster_namenamespace_namekey) + +获取单个配置项 (original openapi) + +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import item_management_api +from apollo_openapi.model.open_item_dto import OpenItemDTO +from apollo_openapi.model.exception_response import ExceptionResponse +from 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 = item_management_api.ItemManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + 'key': "key_example", + } + try: + # 获取单个配置项 (original openapi) + api_response = api_instance.get_item( + path_params=path_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling ItemManagementApi->get_item: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | +key | KeySchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# KeySchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_item.ApiResponseFor200) | 成功获取配置项 +404 | [ApiResponseFor404](#get_item.ApiResponseFor404) | 配置项不存在 + +#### get_item.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenItemDTO**](../../models/OpenItemDTO.md) | | + + +#### get_item.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson + +## 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 + +[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_item_by_encoded_key** + +> OpenItemDTO get_item_by_encoded_key(app_idenvcluster_namenamespace_namekey) + +通过查询参数获取配置项(支持编码的key) (original openapi) + +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import item_management_api +from apollo_openapi.model.open_item_dto import OpenItemDTO +from apollo_openapi.model.exception_response import ExceptionResponse +from 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 = item_management_api.ItemManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + 'key': "key_example", + } + try: + # 通过查询参数获取配置项(支持编码的key) (original openapi) + api_response = api_instance.get_item_by_encoded_key( + path_params=path_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling ItemManagementApi->get_item_by_encoded_key: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | +key | KeySchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# KeySchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_item_by_encoded_key.ApiResponseFor200) | 成功获取配置项(支持编码key) +404 | [ApiResponseFor404](#get_item_by_encoded_key.ApiResponseFor404) | 配置项不存在 + +#### get_item_by_encoded_key.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenItemDTO**](../../models/OpenItemDTO.md) | | + + +#### get_item_by_encoded_key.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson + +## 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 + +[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) + +# **revert_items** + +> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} revert_items(app_idenvcluster_namenamespace_nameoperator) + +撤销配置项更改 (new added) + +POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import item_management_api +from apollo_openapi.model.exception_response import ExceptionResponse +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = item_management_api.ItemManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } + query_params = { + 'operator': "operator_example", + } + try: + # 撤销配置项更改 (new added) + api_response = api_instance.revert_items( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling ItemManagementApi->revert_items: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +operator | OperatorSchema | | + + +# OperatorSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#revert_items.ApiResponseFor200) | 配置项更改撤销成功 +400 | [ApiResponseFor400](#revert_items.ApiResponseFor400) | 请求参数错误 +403 | [ApiResponseFor403](#revert_items.ApiResponseFor403) | 权限不足 + +#### revert_items.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +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 +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor400ResponseBodyApplicationJson + +## 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 +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson + +## 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 + +[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) + +# **sync_items** + +> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} sync_items(app_idenvcluster_namenamespace_nameoperatoropen_namespace_sync_model) + +同步配置项到多个命名空间 (new added) + +POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync: + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import item_management_api +from apollo_openapi.model.open_namespace_sync_model import OpenNamespaceSyncModel +from apollo_openapi.model.exception_response import ExceptionResponse +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = item_management_api.ItemManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } + query_params = { + 'operator': "operator_example", + } + body = OpenNamespaceSyncModel( + sync_to_namespaces=[ + OpenNamespaceIdentifier( + app_id="app_id_example", + env="env_example", + cluster_name="cluster_name_example", + namespace_name="namespace_name_example", + ) + ], + sync_items=[ + OpenItemDTO( + data_change_created_by="data_change_created_by_example", + data_change_last_modified_by="data_change_last_modified_by_example", + data_change_created_time="2025-09-29T12:34:56Z", + data_change_last_modified_time="2025-09-29T12:34:56Z", + key="key_example", + type=1, + value="value_example", + comment="comment_example", + ) + ], + ) + try: + # 同步配置项到多个命名空间 (new added) + api_response = api_instance.sync_items( + path_params=path_params, + query_params=query_params, + body=body, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling ItemManagementApi->sync_items: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenNamespaceSyncModel**](../../models/OpenNamespaceSyncModel.md) | | + + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +operator | OperatorSchema | | + + +# OperatorSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#sync_items.ApiResponseFor200) | 配置项同步成功 +400 | [ApiResponseFor400](#sync_items.ApiResponseFor400) | 请求参数错误 +403 | [ApiResponseFor403](#sync_items.ApiResponseFor403) | 权限不足 + +#### sync_items.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +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 +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor400ResponseBodyApplicationJson + +## 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 +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson + +## 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 + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **update_item** + +> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} update_item(app_idenvcluster_namenamespace_namekeyopen_item_dto) + +更新配置项 (original openapi) + +PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import item_management_api +from apollo_openapi.model.open_item_dto import OpenItemDTO +from apollo_openapi.model.exception_response import ExceptionResponse +from 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 = item_management_api.ItemManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + 'key': "key_example", + } + query_params = { + 'createIfNotExists': False, + } + body = OpenItemDTO( + data_change_created_by="data_change_created_by_example", + data_change_last_modified_by="data_change_last_modified_by_example", + data_change_created_time="2025-09-29T12:34:56Z", + data_change_last_modified_time="2025-09-29T12:34:56Z", + key="key_example", + type=1, + value="value_example", + comment="comment_example", + ) + try: + # 更新配置项 (original openapi) + api_response = api_instance.update_item( + path_params=path_params, + query_params=query_params, + body=body, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling ItemManagementApi->update_item: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenItemDTO**](../../models/OpenItemDTO.md) | | + + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +createIfNotExists | CreateIfNotExistsSchema | | + + +# CreateIfNotExistsSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bool, | BoolClass, | | if omitted the server will use the default value of False + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | +key | KeySchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# KeySchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#update_item.ApiResponseFor200) | 配置项更新成功 +400 | [ApiResponseFor400](#update_item.ApiResponseFor400) | 请求参数错误 +403 | [ApiResponseFor403](#update_item.ApiResponseFor403) | 权限不足 +404 | [ApiResponseFor404](#update_item.ApiResponseFor404) | 配置项不存在 + +#### update_item.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +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 +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor400ResponseBodyApplicationJson + +## 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 +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson + +## 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 +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson + +## 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 + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **update_item_by_encoded_key** + +> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} update_item_by_encoded_key(app_idenvcluster_namenamespace_namekeyopen_item_dto) + +通过编码的key更新配置项 (original openapi) + +PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import item_management_api +from apollo_openapi.model.open_item_dto import OpenItemDTO +from apollo_openapi.model.exception_response import ExceptionResponse +from 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 = item_management_api.ItemManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + 'key': "key_example", + } + query_params = { + 'createIfNotExists': False, + } + body = OpenItemDTO( + data_change_created_by="data_change_created_by_example", + data_change_last_modified_by="data_change_last_modified_by_example", + data_change_created_time="2025-09-29T12:34:56Z", + data_change_last_modified_time="2025-09-29T12:34:56Z", + key="key_example", + type=1, + value="value_example", + comment="comment_example", + ) + try: + # 通过编码的key更新配置项 (original openapi) + api_response = api_instance.update_item_by_encoded_key( + path_params=path_params, + query_params=query_params, + body=body, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling ItemManagementApi->update_item_by_encoded_key: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenItemDTO**](../../models/OpenItemDTO.md) | | + + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +createIfNotExists | CreateIfNotExistsSchema | | + + +# CreateIfNotExistsSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bool, | BoolClass, | | if omitted the server will use the default value of False + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | +key | KeySchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# KeySchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#update_item_by_encoded_key.ApiResponseFor200) | 配置项更新成功(编码key) +400 | [ApiResponseFor400](#update_item_by_encoded_key.ApiResponseFor400) | 请求参数错误 +403 | [ApiResponseFor403](#update_item_by_encoded_key.ApiResponseFor403) | 权限不足 +404 | [ApiResponseFor404](#update_item_by_encoded_key.ApiResponseFor404) | 配置项不存在 + +#### update_item_by_encoded_key.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +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 +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor400ResponseBodyApplicationJson + +## 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 +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson + +## 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 +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson + +## 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 + +[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) + +# **validate_items** + +> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} validate_items(app_idenvcluster_namenamespace_nameopen_namespace_text_model) + +验证配置文本语法 (new added) + +POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import item_management_api +from apollo_openapi.model.exception_response import ExceptionResponse +from apollo_openapi.model.open_namespace_text_model import OpenNamespaceTextModel +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +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 = item_management_api.ItemManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } + body = OpenNamespaceTextModel( + app_id="app_id_example", + env="env_example", + cluster_name="cluster_name_example", + namespace_name="namespace_name_example", + namespace_id=1, + format="format_example", + config_text="config_text_example", + operator="operator_example", + ) + try: + # 验证配置文本语法 (new added) + api_response = api_instance.validate_items( + path_params=path_params, + body=body, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling ItemManagementApi->validate_items: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenNamespaceTextModel**](../../models/OpenNamespaceTextModel.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#validate_items.ApiResponseFor200) | 配置文本语法验证通过 +400 | [ApiResponseFor400](#validate_items.ApiResponseFor400) | 配置文本语法错误 + +#### validate_items.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +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 +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor400ResponseBodyApplicationJson + +## 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 + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) diff --git a/python/docs/apis/tags/NamespaceBranchManagementApi.md b/python/docs/apis/tags/NamespaceBranchManagementApi.md new file mode 100644 index 00000000..d211a8dc --- /dev/null +++ b/python/docs/apis/tags/NamespaceBranchManagementApi.md @@ -0,0 +1,999 @@ + +# apollo_openapi.apis.tags.namespace_branch_management_api.NamespaceBranchManagementApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_branch**](#create_branch) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches | 创建命名空间分支 (original openapi) +[**delete_branch**](#delete_branch) | **delete** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 删除命名空间分支 (original openapi) +[**find_branch**](#find_branch) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches | 获取命名空间分支信息 (original openapi) +[**get_branch_gray_rules**](#get_branch_gray_rules) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules | 获取分支灰度发布规则 (original openapi) +[**merge_branch**](#merge_branch) | **patch** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 合并分支到主分支 (new added) +[**update_branch_rules**](#update_branch_rules) | **put** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules | 更新分支灰度发布规则 (original openapi) + +# **create_branch** + +> OpenNamespaceDTO create_branch(app_idenvcluster_namenamespace_nameoperator) + +创建命名空间分支 (original openapi) + +POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import namespace_branch_management_api +from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = namespace_branch_management_api.NamespaceBranchManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } + query_params = { + 'operator': "operator_example", + } + try: + # 创建命名空间分支 (original openapi) + api_response = api_instance.create_branch( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceBranchManagementApi->create_branch: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +operator | OperatorSchema | | + + +# OperatorSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#create_branch.ApiResponseFor200) | 命名空间分支创建成功 + +#### create_branch.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenNamespaceDTO**](../../models/OpenNamespaceDTO.md) | | + + +### Authorization + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **delete_branch** + +> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} delete_branch(envapp_idcluster_namenamespace_namebranch_nameoperator) + +删除命名空间分支 (original openapi) + +DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import namespace_branch_management_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = namespace_branch_management_api.NamespaceBranchManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'env': "env_example", + 'appId': "appId_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + 'branchName': "branchName_example", + } + query_params = { + 'operator': "operator_example", + } + try: + # 删除命名空间分支 (original openapi) + api_response = api_instance.delete_branch( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceBranchManagementApi->delete_branch: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +operator | OperatorSchema | | + + +# OperatorSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +env | EnvSchema | | +appId | AppIdSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | +branchName | BranchNameSchema | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# 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, | | + +# BranchNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#delete_branch.ApiResponseFor200) | 分支删除成功 + +#### delete_branch.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +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) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **find_branch** + +> OpenNamespaceDTO find_branch(app_idenvcluster_namenamespace_name) + +获取命名空间分支信息 (original openapi) + +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import namespace_branch_management_api +from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO +from apollo_openapi.model.exception_response import ExceptionResponse +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = namespace_branch_management_api.NamespaceBranchManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } + try: + # 获取命名空间分支信息 (original openapi) + api_response = api_instance.find_branch( + path_params=path_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceBranchManagementApi->find_branch: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#find_branch.ApiResponseFor200) | 成功获取分支信息 +404 | [ApiResponseFor404](#find_branch.ApiResponseFor404) | 分支不存在 + +#### find_branch.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenNamespaceDTO**](../../models/OpenNamespaceDTO.md) | | + + +#### find_branch.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson + +## 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 + +[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_branch_gray_rules** + +> OpenGrayReleaseRuleDTO get_branch_gray_rules(app_idenvcluster_namenamespace_namebranch_name) + +获取分支灰度发布规则 (original openapi) + +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import namespace_branch_management_api +from apollo_openapi.model.open_gray_release_rule_dto import OpenGrayReleaseRuleDTO +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = namespace_branch_management_api.NamespaceBranchManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + 'branchName': "branchName_example", + } + try: + # 获取分支灰度发布规则 (original openapi) + api_response = api_instance.get_branch_gray_rules( + path_params=path_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceBranchManagementApi->get_branch_gray_rules: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | +branchName | BranchNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# BranchNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_branch_gray_rules.ApiResponseFor200) | 成功获取灰度发布规则 + +#### get_branch_gray_rules.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenGrayReleaseRuleDTO**](../../models/OpenGrayReleaseRuleDTO.md) | | + + +### Authorization + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **merge_branch** + +> OpenReleaseDTO merge_branch(envapp_idcluster_namenamespace_namebranch_namedelete_branchoperatornamespace_release_dto) + +合并分支到主分支 (new added) + +PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import namespace_branch_management_api +from apollo_openapi.model.open_release_dto import OpenReleaseDTO +from apollo_openapi.model.namespace_release_dto import NamespaceReleaseDTO +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = namespace_branch_management_api.NamespaceBranchManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'env': "env_example", + 'appId': "appId_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + 'branchName': "branchName_example", + } + query_params = { + 'deleteBranch': True, + 'operator': "operator_example", + } + body = NamespaceReleaseDTO( + release_title="release_title_example", + release_comment="release_comment_example", + released_by="released_by_example", + is_emergency_publish=True, + ) + try: + # 合并分支到主分支 (new added) + api_response = api_instance.merge_branch( + path_params=path_params, + query_params=query_params, + body=body, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceBranchManagementApi->merge_branch: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**NamespaceReleaseDTO**](../../models/NamespaceReleaseDTO.md) | | + + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +deleteBranch | DeleteBranchSchema | | +operator | OperatorSchema | | + + +# DeleteBranchSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bool, | BoolClass, | | + +# OperatorSchema + +## 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 | | +branchName | BranchNameSchema | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# 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, | | + +# BranchNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#merge_branch.ApiResponseFor200) | 分支合并成功 + +#### merge_branch.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenReleaseDTO**](../../models/OpenReleaseDTO.md) | | + + +### Authorization + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **update_branch_rules** + +> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} update_branch_rules(app_idenvcluster_namenamespace_namebranch_nameoperatoropen_gray_release_rule_dto) + +更新分支灰度发布规则 (original openapi) + +PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import namespace_branch_management_api +from apollo_openapi.model.open_gray_release_rule_dto import OpenGrayReleaseRuleDTO +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = namespace_branch_management_api.NamespaceBranchManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + 'branchName': "branchName_example", + } + query_params = { + 'operator': "operator_example", + } + body = OpenGrayReleaseRuleDTO( + 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", + app_id="app_id_example", + cluster_name="cluster_name_example", + namespace_name="namespace_name_example", + branch_name="branch_name_example", + rule_items=[ + OpenGrayReleaseRuleItemDTO( + client_app_id="client_app_id_example", + client_ip_list=[ + "client_ip_list_example" + ], + client_label_list=[ + "client_label_list_example" + ], + ) + ], + ) + try: + # 更新分支灰度发布规则 (original openapi) + api_response = api_instance.update_branch_rules( + path_params=path_params, + query_params=query_params, + body=body, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceBranchManagementApi->update_branch_rules: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenGrayReleaseRuleDTO**](../../models/OpenGrayReleaseRuleDTO.md) | | + + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +operator | OperatorSchema | | + + +# OperatorSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | +branchName | BranchNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# BranchNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#update_branch_rules.ApiResponseFor200) | 灰度规则更新成功 + +#### update_branch_rules.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +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) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) diff --git a/python/docs/apis/tags/NamespaceManagementApi.md b/python/docs/apis/tags/NamespaceManagementApi.md new file mode 100644 index 00000000..a767b6ea --- /dev/null +++ b/python/docs/apis/tags/NamespaceManagementApi.md @@ -0,0 +1,1722 @@ + +# apollo_openapi.apis.tags.namespace_management_api.NamespaceManagementApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**check_namespace_integrity**](#check_namespace_integrity) | **get** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check | 检查缺失的Namespace (new added) +[**create_namespace**](#create_namespace) | **post** /openapi/v1/apps/{appId}/appnamespaces | 创建AppNamespace (original openapi) +[**delete_app_namespace**](#delete_app_namespace) | **delete** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 删除AppNamespace (new added) +[**delete_namespace_links**](#delete_namespace_links) | **delete** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links | 删除关联的Namespace (new added) +[**find_namespaces**](#find_namespaces) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces | 获取指定集群下的所有Namespace (original openapi) +[**get_app_namespace**](#get_app_namespace) | **get** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 获取指定的AppNamespace (new added) +[**get_app_namespaces**](#get_app_namespaces) | **get** /openapi/v1/appnamespaces | 获取所有公共AppNamespace (new added) +[**get_app_namespaces_by_app**](#get_app_namespaces_by_app) | **get** /openapi/v1/apps/{appId}/appnamespaces | 获取指定应用的AppNamespace (new added) +[**get_namespace_lock**](#get_namespace_lock) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock | 获取Namespace的锁状态 (original openapi) +[**get_namespaces_release_status**](#get_namespaces_release_status) | **get** /openapi/v1/apps/{appId}/namespaces/releases/status | 获取应用下所有Namespace的发布状态 (new added) +[**get_public_app_namespace_instances**](#get_public_app_namespace_instances) | **get** /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances | 获取公共AppNamespace的所有实例 (new added) +[**get_public_namespace_association**](#get_public_namespace_association) | **get** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association | 获取关联的公共Namespace (new added) +[**load_namespace**](#load_namespace) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} | 获取指定的Namespace (original openapi) + +# **check_namespace_integrity** + +> [str] check_namespace_integrity(app_idenvcluster_name) + +检查缺失的Namespace (new added) + +GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import namespace_management_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = namespace_management_api.NamespaceManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + } + try: + # 检查缺失的Namespace (new added) + api_response = api_instance.check_namespace_integrity( + path_params=path_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceManagementApi->check_namespace_integrity: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#check_namespace_integrity.ApiResponseFor200) | 缺失的命名空间名称列表 + +#### check_namespace_integrity.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +### Authorization + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **create_namespace** + +> OpenAppNamespaceDTO create_namespace(app_idopen_app_namespace_dto) + +创建AppNamespace (original openapi) + +POST /openapi/v1/apps/{appId}/appnamespaces + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import namespace_management_api +from apollo_openapi.model.open_app_namespace_dto import OpenAppNamespaceDTO +from apollo_openapi.model.exception_response import ExceptionResponse +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = namespace_management_api.NamespaceManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + } + body = OpenAppNamespaceDTO( + data_change_created_by="data_change_created_by_example", + data_change_last_modified_by="data_change_last_modified_by_example", + data_change_created_time="2025-09-29T12:34:56Z", + data_change_last_modified_time="2025-09-29T12:34:56Z", + name="name_example", + app_id="app_id_example", + format="format_example", + is_public=True, + append_namespace_prefix=True, + comment="comment_example", + ) + try: + # 创建AppNamespace (original openapi) + api_response = api_instance.create_namespace( + path_params=path_params, + body=body, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceManagementApi->create_namespace: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenAppNamespaceDTO**](../../models/OpenAppNamespaceDTO.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#create_namespace.ApiResponseFor200) | AppNamespace创建成功 +400 | [ApiResponseFor400](#create_namespace.ApiResponseFor400) | 请求参数错误 +403 | [ApiResponseFor403](#create_namespace.ApiResponseFor403) | 权限不足 + +#### create_namespace.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenAppNamespaceDTO**](../../models/OpenAppNamespaceDTO.md) | | + + +#### create_namespace.ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor400ResponseBodyApplicationJson + +## 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 +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson + +## 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 + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **delete_app_namespace** + +> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} delete_app_namespace(app_idnamespace_nameoperator) + +删除AppNamespace (new added) + +DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import namespace_management_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = namespace_management_api.NamespaceManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'namespaceName': "namespaceName_example", + } + query_params = { + 'operator': "operator_example", + } + try: + # 删除AppNamespace (new added) + api_response = api_instance.delete_app_namespace( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceManagementApi->delete_app_namespace: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +operator | OperatorSchema | | + + +# OperatorSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +namespaceName | NamespaceNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#delete_app_namespace.ApiResponseFor200) | AppNamespace删除成功 + +#### delete_app_namespace.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## 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 +------------- | ------------- | ------------- | ------------- | ------------- +[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) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **delete_namespace_links** + +> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} delete_namespace_links(app_idenvcluster_namenamespace_nameoperator) + +删除关联的Namespace (new added) + +DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import namespace_management_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = namespace_management_api.NamespaceManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } + query_params = { + 'operator': "operator_example", + } + try: + # 删除关联的Namespace (new added) + api_response = api_instance.delete_namespace_links( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceManagementApi->delete_namespace_links: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +operator | OperatorSchema | | + + +# OperatorSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#delete_namespace_links.ApiResponseFor200) | 解除关联成功 + +#### delete_namespace_links.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +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) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **find_namespaces** + +> [OpenNamespaceDTO] find_namespaces(app_idenvcluster_name) + +获取指定集群下的所有Namespace (original openapi) + +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import namespace_management_api +from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = namespace_management_api.NamespaceManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + } + query_params = { + 'fillItemDetail': True, + } + try: + # 获取指定集群下的所有Namespace (original openapi) + api_response = api_instance.find_namespaces( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceManagementApi->find_namespaces: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +fillItemDetail | FillItemDetailSchema | | + + +# FillItemDetailSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bool, | BoolClass, | | if omitted the server will use the default value of True + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#find_namespaces.ApiResponseFor200) | + +#### find_namespaces.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenNamespaceDTO**]({{complexTypePrefix}}OpenNamespaceDTO.md) | [**OpenNamespaceDTO**]({{complexTypePrefix}}OpenNamespaceDTO.md) | [**OpenNamespaceDTO**]({{complexTypePrefix}}OpenNamespaceDTO.md) | | + +### Authorization + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_app_namespace** + +> OpenAppNamespaceDTO get_app_namespace(app_idnamespace_name) + +获取指定的AppNamespace (new added) + +GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import namespace_management_api +from apollo_openapi.model.open_app_namespace_dto import OpenAppNamespaceDTO +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = namespace_management_api.NamespaceManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'namespaceName': "namespaceName_example", + } + try: + # 获取指定的AppNamespace (new added) + api_response = api_instance.get_app_namespace( + path_params=path_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceManagementApi->get_app_namespace: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +namespaceName | NamespaceNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_app_namespace.ApiResponseFor200) | 成功获取AppNamespace + +#### get_app_namespace.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenAppNamespaceDTO**](../../models/OpenAppNamespaceDTO.md) | | + + +### Authorization + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_app_namespaces** + +> [OpenAppNamespaceDTO] get_app_namespaces(public_only) + +获取所有公共AppNamespace (new added) + +GET /openapi/v1/appnamespaces?public=true + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import namespace_management_api +from apollo_openapi.model.open_app_namespace_dto import OpenAppNamespaceDTO +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = namespace_management_api.NamespaceManagementApi(api_client) + + # example passing only required values which don't have defaults set + query_params = { + 'publicOnly': False, + } + try: + # 获取所有公共AppNamespace (new added) + api_response = api_instance.get_app_namespaces( + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceManagementApi->get_app_namespaces: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +publicOnly | PublicOnlySchema | | + + +# PublicOnlySchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bool, | BoolClass, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_app_namespaces.ApiResponseFor200) | + +#### get_app_namespaces.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenAppNamespaceDTO**]({{complexTypePrefix}}OpenAppNamespaceDTO.md) | [**OpenAppNamespaceDTO**]({{complexTypePrefix}}OpenAppNamespaceDTO.md) | [**OpenAppNamespaceDTO**]({{complexTypePrefix}}OpenAppNamespaceDTO.md) | | + +### Authorization + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_app_namespaces_by_app** + +> [OpenAppNamespaceDTO] get_app_namespaces_by_app(app_id) + +获取指定应用的AppNamespace (new added) + +GET /openapi/v1/apps/{appId}/appnamespaces + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import namespace_management_api +from apollo_openapi.model.open_app_namespace_dto import OpenAppNamespaceDTO +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = namespace_management_api.NamespaceManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + } + try: + # 获取指定应用的AppNamespace (new added) + api_response = api_instance.get_app_namespaces_by_app( + path_params=path_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceManagementApi->get_app_namespaces_by_app: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_app_namespaces_by_app.ApiResponseFor200) | + +#### get_app_namespaces_by_app.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenAppNamespaceDTO**]({{complexTypePrefix}}OpenAppNamespaceDTO.md) | [**OpenAppNamespaceDTO**]({{complexTypePrefix}}OpenAppNamespaceDTO.md) | [**OpenAppNamespaceDTO**]({{complexTypePrefix}}OpenAppNamespaceDTO.md) | | + +### Authorization + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_namespace_lock** + +> OpenNamespaceLockDTO get_namespace_lock(app_idenvcluster_namenamespace_name) + +获取Namespace的锁状态 (original openapi) + +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import namespace_management_api +from apollo_openapi.model.open_namespace_lock_dto import OpenNamespaceLockDTO +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = namespace_management_api.NamespaceManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } + try: + # 获取Namespace的锁状态 (original openapi) + api_response = api_instance.get_namespace_lock( + path_params=path_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceManagementApi->get_namespace_lock: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_namespace_lock.ApiResponseFor200) | + +#### get_namespace_lock.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenNamespaceLockDTO**](../../models/OpenNamespaceLockDTO.md) | | + + +### Authorization + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_namespaces_release_status** + +> StringToStringBoolMap get_namespaces_release_status(app_id) + +获取应用下所有Namespace的发布状态 (new added) + +GET /openapi/v1/apps/{appId}/namespaces/releases/status + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import namespace_management_api +from apollo_openapi.model.string_to_string_bool_map import StringToStringBoolMap +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = namespace_management_api.NamespaceManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + } + try: + # 获取应用下所有Namespace的发布状态 (new added) + api_response = api_instance.get_namespaces_release_status( + path_params=path_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceManagementApi->get_namespaces_release_status: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_namespaces_release_status.ApiResponseFor200) | 成功获取发布状态映射 + +#### get_namespaces_release_status.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**StringToStringBoolMap**](../../models/StringToStringBoolMap.md) | | + + +### Authorization + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_public_app_namespace_instances** + +> [OpenNamespaceDTO] get_public_app_namespace_instances(envpublic_namespace_namepagesize) + +获取公共AppNamespace的所有实例 (new added) + +GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import namespace_management_api +from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = namespace_management_api.NamespaceManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'env': "env_example", + 'publicNamespaceName': "publicNamespaceName_example", + } + query_params = { + 'page': 0, + 'size': 10, + } + try: + # 获取公共AppNamespace的所有实例 (new added) + api_response = api_instance.get_public_app_namespace_instances( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceManagementApi->get_public_app_namespace_instances: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +page | PageSchema | | +size | SizeSchema | | + + +# PageSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | + +# SizeSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +env | EnvSchema | | +publicNamespaceName | PublicNamespaceNameSchema | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# PublicNamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_public_app_namespace_instances.ApiResponseFor200) | 成功获取实例列表 + +#### get_public_app_namespace_instances.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenNamespaceDTO**]({{complexTypePrefix}}OpenNamespaceDTO.md) | [**OpenNamespaceDTO**]({{complexTypePrefix}}OpenNamespaceDTO.md) | [**OpenNamespaceDTO**]({{complexTypePrefix}}OpenNamespaceDTO.md) | | + +### Authorization + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_public_namespace_association** + +> OpenNamespaceDTO get_public_namespace_association(app_idenvcluster_namenamespace_name) + +获取关联的公共Namespace (new added) + +GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import namespace_management_api +from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = namespace_management_api.NamespaceManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } + try: + # 获取关联的公共Namespace (new added) + api_response = api_instance.get_public_namespace_association( + path_params=path_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceManagementApi->get_public_namespace_association: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_public_namespace_association.ApiResponseFor200) | 成功获取关联的公共Namespace + +#### get_public_namespace_association.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenNamespaceDTO**](../../models/OpenNamespaceDTO.md) | | + + +### Authorization + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **load_namespace** + +> OpenNamespaceDTO load_namespace(app_idenvcluster_namenamespace_name) + +获取指定的Namespace (original openapi) + +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import namespace_management_api +from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = namespace_management_api.NamespaceManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } + query_params = { + 'fillItemDetail': True, + } + try: + # 获取指定的Namespace (original openapi) + api_response = api_instance.load_namespace( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceManagementApi->load_namespace: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +fillItemDetail | FillItemDetailSchema | | + + +# FillItemDetailSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bool, | BoolClass, | | if omitted the server will use the default value of True + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#load_namespace.ApiResponseFor200) | + +#### load_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 +------------- | ------------- | ------------- +[**OpenNamespaceDTO**](../../models/OpenNamespaceDTO.md) | | + + +### Authorization + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) diff --git a/python/docs/apis/tags/OrganizationManagementApi.md b/python/docs/apis/tags/OrganizationManagementApi.md new file mode 100644 index 00000000..3dcf7f4c --- /dev/null +++ b/python/docs/apis/tags/OrganizationManagementApi.md @@ -0,0 +1,112 @@ + +# apollo_openapi.apis.tags.organization_management_api.OrganizationManagementApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_organization**](#get_organization) | **get** /openapi/v1/organizations | 获取所有组织信息 (original openapi) + +# **get_organization** + +> [OpenOrganizationDto] get_organization() + +获取所有组织信息 (original openapi) + +GET /openapi/v1/organizations + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import organization_management_api +from apollo_openapi.model.exception_response import ExceptionResponse +from apollo_openapi.model.open_organization_dto import OpenOrganizationDto +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 = organization_management_api.OrganizationManagementApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # 获取所有组织信息 (original openapi) + api_response = api_instance.get_organization() + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling OrganizationManagementApi->get_organization: %s\n" % e) +``` +### Parameters +This endpoint does not need any parameter. + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_organization.ApiResponseFor200) | 成功获取组织列表 +401 | [ApiResponseFor401](#get_organization.ApiResponseFor401) | 未授权访问 + +#### get_organization.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +组织列表 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | 组织列表 | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenOrganizationDto**]({{complexTypePrefix}}OpenOrganizationDto.md) | [**OpenOrganizationDto**]({{complexTypePrefix}}OpenOrganizationDto.md) | [**OpenOrganizationDto**]({{complexTypePrefix}}OpenOrganizationDto.md) | | + +#### get_organization.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) | | + +### Authorization + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) diff --git a/python/docs/apis/tags/ReleaseManagementApi.md b/python/docs/apis/tags/ReleaseManagementApi.md new file mode 100644 index 00000000..998278b3 --- /dev/null +++ b/python/docs/apis/tags/ReleaseManagementApi.md @@ -0,0 +1,1454 @@ + +# apollo_openapi.apis.tags.release_management_api.ReleaseManagementApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_gray_del_release**](#create_gray_del_release) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases | 创建灰度删除发布 (original openapi) +[**create_gray_release**](#create_gray_release) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases | 创建灰度发布 (original openapi) +[**create_release**](#create_release) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases | 创建发布 (original openapi) +[**find_active_releases**](#find_active_releases) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active | 获取活跃发布(分页) (new added) +[**find_all_releases**](#find_all_releases) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all | 获取所有发布(分页) (new added) +[**get_release_by_id**](#get_release_by_id) | **get** /openapi/v1/envs/{env}/releases/{releaseId} | 获取发布详情 (new added) +[**load_latest_active_release**](#load_latest_active_release) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest | 获取最新活跃发布 (original openapi) +[**merge**](#merge) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge | 合并分支 (original openapi) +[**rollback**](#rollback) | **put** /openapi/v1/envs/{env}/releases/{releaseId}/rollback | 回滚发布 (original openapi) + +# **create_gray_del_release** + +> OpenReleaseDTO create_gray_del_release(app_idenvcluster_namenamespace_namebranch_namenamespace_gray_del_release_dto) + +创建灰度删除发布 (original openapi) + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import release_management_api +from apollo_openapi.model.open_release_dto import OpenReleaseDTO +from apollo_openapi.model.namespace_gray_del_release_dto import NamespaceGrayDelReleaseDTO +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = release_management_api.ReleaseManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + 'branchName': "branchName_example", + } + body = NamespaceGrayDelReleaseDTO( + release_title="release_title_example", + release_comment="release_comment_example", + released_by="released_by_example", + is_emergency_publish=True, + gray_del_keys=[ + "gray_del_keys_example" + ], + ) + try: + # 创建灰度删除发布 (original openapi) + api_response = api_instance.create_gray_del_release( + path_params=path_params, + body=body, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling ReleaseManagementApi->create_gray_del_release: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**NamespaceGrayDelReleaseDTO**](../../models/NamespaceGrayDelReleaseDTO.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | +branchName | BranchNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# BranchNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#create_gray_del_release.ApiResponseFor200) | + +#### create_gray_del_release.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenReleaseDTO**](../../models/OpenReleaseDTO.md) | | + + +### 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) + +# **create_gray_release** + +> OpenReleaseDTO create_gray_release(app_idenvcluster_namenamespace_namebranch_namenamespace_release_dto) + +创建灰度发布 (original openapi) + +创建灰度发布 + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import release_management_api +from apollo_openapi.model.open_release_dto import OpenReleaseDTO +from apollo_openapi.model.namespace_release_dto import NamespaceReleaseDTO +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = release_management_api.ReleaseManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + 'branchName': "branchName_example", + } + body = NamespaceReleaseDTO( + release_title="release_title_example", + release_comment="release_comment_example", + released_by="released_by_example", + is_emergency_publish=True, + ) + try: + # 创建灰度发布 (original openapi) + api_response = api_instance.create_gray_release( + path_params=path_params, + body=body, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling ReleaseManagementApi->create_gray_release: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**NamespaceReleaseDTO**](../../models/NamespaceReleaseDTO.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | +branchName | BranchNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# BranchNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#create_gray_release.ApiResponseFor200) | 灰度发布创建成功 + +#### create_gray_release.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenReleaseDTO**](../../models/OpenReleaseDTO.md) | | + + +### 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) + +# **create_release** + +> OpenReleaseDTO create_release(app_idenvcluster_namenamespace_namenamespace_release_dto) + +创建发布 (original openapi) + +创建发布 + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import release_management_api +from apollo_openapi.model.open_release_dto import OpenReleaseDTO +from apollo_openapi.model.namespace_release_dto import NamespaceReleaseDTO +from apollo_openapi.model.exception_response import ExceptionResponse +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = release_management_api.ReleaseManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } + body = NamespaceReleaseDTO( + release_title="release_title_example", + release_comment="release_comment_example", + released_by="released_by_example", + is_emergency_publish=True, + ) + try: + # 创建发布 (original openapi) + api_response = api_instance.create_release( + path_params=path_params, + body=body, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling ReleaseManagementApi->create_release: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**NamespaceReleaseDTO**](../../models/NamespaceReleaseDTO.md) | | + + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#create_release.ApiResponseFor200) | 发布创建成功 +400 | [ApiResponseFor400](#create_release.ApiResponseFor400) | 发布参数错误 +403 | [ApiResponseFor403](#create_release.ApiResponseFor403) | 权限不足 + +#### create_release.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenReleaseDTO**](../../models/OpenReleaseDTO.md) | | + + +#### create_release.ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor400ResponseBodyApplicationJson + +## 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 +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson + +## 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 + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **find_active_releases** + +> [OpenReleaseDTO] find_active_releases(app_idenvcluster_namenamespace_namepagesize) + +获取活跃发布(分页) (new added) + +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import release_management_api +from apollo_openapi.model.open_release_dto import OpenReleaseDTO +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = release_management_api.ReleaseManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } + query_params = { + 'page': 0, + 'size': 5, + } + try: + # 获取活跃发布(分页) (new added) + api_response = api_instance.find_active_releases( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling ReleaseManagementApi->find_active_releases: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +page | PageSchema | | +size | SizeSchema | | + + +# PageSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | + +# SizeSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#find_active_releases.ApiResponseFor200) | 成功获取活跃发布列表 + +#### find_active_releases.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenReleaseDTO**]({{complexTypePrefix}}OpenReleaseDTO.md) | [**OpenReleaseDTO**]({{complexTypePrefix}}OpenReleaseDTO.md) | [**OpenReleaseDTO**]({{complexTypePrefix}}OpenReleaseDTO.md) | | + +### Authorization + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **find_all_releases** + +> [OpenReleaseBO] find_all_releases(app_idenvcluster_namenamespace_namepagesize) + +获取所有发布(分页) (new added) + +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import release_management_api +from apollo_openapi.model.open_release_bo import OpenReleaseBO +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = release_management_api.ReleaseManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } + query_params = { + 'page': 0, + 'size': 5, + } + try: + # 获取所有发布(分页) (new added) + api_response = api_instance.find_all_releases( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling ReleaseManagementApi->find_all_releases: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +page | PageSchema | | +size | SizeSchema | | + + +# PageSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | + +# SizeSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#find_all_releases.ApiResponseFor200) | 成功获取发布列表 + +#### find_all_releases.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenReleaseBO**]({{complexTypePrefix}}OpenReleaseBO.md) | [**OpenReleaseBO**]({{complexTypePrefix}}OpenReleaseBO.md) | [**OpenReleaseBO**]({{complexTypePrefix}}OpenReleaseBO.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_release_by_id** + +> OpenReleaseDTO get_release_by_id(envrelease_id) + +获取发布详情 (new added) + +GET /openapi/v1/envs/{env}/releases/{releaseId} + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import release_management_api +from apollo_openapi.model.open_release_dto import OpenReleaseDTO +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = release_management_api.ReleaseManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'env': "env_example", + 'releaseId': 1, + } + try: + # 获取发布详情 (new added) + api_response = api_instance.get_release_by_id( + path_params=path_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling ReleaseManagementApi->get_release_by_id: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +env | EnvSchema | | +releaseId | ReleaseIdSchema | | + +# EnvSchema + +## Model Type Info +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 +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_release_by_id.ApiResponseFor200) | 成功获取发布详情 + +#### get_release_by_id.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenReleaseDTO**](../../models/OpenReleaseDTO.md) | | + + +### 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) + +# **load_latest_active_release** + +> OpenReleaseDTO load_latest_active_release(app_idenvcluster_namenamespace_name) + +获取最新活跃发布 (original openapi) + +查询命名空间最新活跃发布 + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import release_management_api +from apollo_openapi.model.open_release_dto import OpenReleaseDTO +from apollo_openapi.model.exception_response import ExceptionResponse +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = release_management_api.ReleaseManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } + try: + # 获取最新活跃发布 (original openapi) + api_response = api_instance.load_latest_active_release( + path_params=path_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling ReleaseManagementApi->load_latest_active_release: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#load_latest_active_release.ApiResponseFor200) | 成功获取最新活跃发布 +404 | [ApiResponseFor404](#load_latest_active_release.ApiResponseFor404) | 未找到活跃发布 + +#### load_latest_active_release.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenReleaseDTO**](../../models/OpenReleaseDTO.md) | | + + +#### load_latest_active_release.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson + +## 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 + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **merge** + +> OpenReleaseDTO merge(app_idenvcluster_namenamespace_namebranch_namedelete_branchnamespace_release_dto) + +合并分支 (original openapi) + +合并灰度分支并可选择删除分支 + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import release_management_api +from apollo_openapi.model.open_release_dto import OpenReleaseDTO +from apollo_openapi.model.namespace_release_dto import NamespaceReleaseDTO +from apollo_openapi.model.exception_response import ExceptionResponse +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = release_management_api.ReleaseManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + 'branchName': "branchName_example", + } + query_params = { + 'deleteBranch': True, + } + body = NamespaceReleaseDTO( + release_title="release_title_example", + release_comment="release_comment_example", + released_by="released_by_example", + is_emergency_publish=True, + ) + try: + # 合并分支 (original openapi) + api_response = api_instance.merge( + path_params=path_params, + query_params=query_params, + body=body, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling ReleaseManagementApi->merge: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**NamespaceReleaseDTO**](../../models/NamespaceReleaseDTO.md) | | + + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +deleteBranch | DeleteBranchSchema | | + + +# DeleteBranchSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bool, | BoolClass, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | +branchName | BranchNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# BranchNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#merge.ApiResponseFor200) | 分支合并成功 +400 | [ApiResponseFor400](#merge.ApiResponseFor400) | 合并参数错误 +403 | [ApiResponseFor403](#merge.ApiResponseFor403) | 权限不足 + +#### merge.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenReleaseDTO**](../../models/OpenReleaseDTO.md) | | + + +#### merge.ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor400ResponseBodyApplicationJson + +## 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 +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson + +## 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 + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **rollback** + +> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} rollback(envrelease_idoperator) + +回滚发布 (original openapi) + +回滚到指定的发布版本 + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import release_management_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = release_management_api.ReleaseManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'env': "env_example", + 'releaseId': 1, + } + query_params = { + 'operator': "operator_example", + } + try: + # 回滚发布 (original openapi) + api_response = api_instance.rollback( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling ReleaseManagementApi->rollback: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +operator | OperatorSchema | | + + +# OperatorSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +env | EnvSchema | | +releaseId | ReleaseIdSchema | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ReleaseIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#rollback.ApiResponseFor200) | 发布回滚成功 + +#### rollback.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +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) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) diff --git a/python/docs/models/ExceptionResponse.md b/python/docs/models/ExceptionResponse.md new file mode 100644 index 00000000..f67260ec --- /dev/null +++ b/python/docs/models/ExceptionResponse.md @@ -0,0 +1,15 @@ +# 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) | + +### 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] + +[[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/KVEntity.md b/python/docs/models/KVEntity.md new file mode 100644 index 00000000..fb21c26b --- /dev/null +++ b/python/docs/models/KVEntity.md @@ -0,0 +1,15 @@ +# apollo_openapi.model.kv_entity.KVEntity + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**key** | str, | str, | 键 | [optional] +**value** | 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/MapString.md b/python/docs/models/MapString.md new file mode 100644 index 00000000..7f0a62d8 --- /dev/null +++ b/python/docs/models/MapString.md @@ -0,0 +1,13 @@ +# apollo_openapi.model.map_string.MapString + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**any_string_name** | str, | str, | 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/MultiResponseEntity.md b/python/docs/models/MultiResponseEntity.md new file mode 100644 index 00000000..180cd137 --- /dev/null +++ b/python/docs/models/MultiResponseEntity.md @@ -0,0 +1,31 @@ +# apollo_openapi.model.multi_response_entity.MultiResponseEntity + +A response container holding multiple RichResponseEntity objects + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | A response container holding multiple RichResponseEntity objects | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**code** | decimal.Decimal, int, | decimal.Decimal, | Overall HTTP status code | +**[entities](#entities)** | list, tuple, | tuple, | List of rich response entities | +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# entities + +List of rich response entities + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | List of rich response entities | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**RichResponseEntity**](RichResponseEntity.md) | [**RichResponseEntity**](RichResponseEntity.md) | [**RichResponseEntity**](RichResponseEntity.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/NamespaceGrayDelReleaseDTO.md b/python/docs/models/NamespaceGrayDelReleaseDTO.md new file mode 100644 index 00000000..4783ccd2 --- /dev/null +++ b/python/docs/models/NamespaceGrayDelReleaseDTO.md @@ -0,0 +1,34 @@ +# apollo_openapi.model.namespace_gray_del_release_dto.NamespaceGrayDelReleaseDTO + +命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | 命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布 | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**releaseTitle** | str, | str, | 发布标题,用于标识这次灰度删除发布的名称或版本号 | [optional] +**releaseComment** | str, | str, | 发布备注,详细描述本次灰度删除发布的目的和删除的配置项 | [optional] +**releasedBy** | str, | str, | 发布操作者用户名,记录是谁执行了这次灰度删除发布操作 | [optional] +**isEmergencyPublish** | bool, | BoolClass, | 是否为紧急发布,紧急发布可能会跳过某些审核流程 | [optional] +**[grayDelKeys](#grayDelKeys)** | 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] + +# grayDelKeys + +需要在灰度发布中删除的配置项键名列表 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | 需要在灰度发布中删除的配置项键名列表 | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +[[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/NamespaceReleaseDTO.md b/python/docs/models/NamespaceReleaseDTO.md new file mode 100644 index 00000000..2ed4312c --- /dev/null +++ b/python/docs/models/NamespaceReleaseDTO.md @@ -0,0 +1,19 @@ +# apollo_openapi.model.namespace_release_dto.NamespaceReleaseDTO + +命名空间发布请求数据传输对象,用于创建新的配置发布 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | 命名空间发布请求数据传输对象,用于创建新的配置发布 | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**releaseTitle** | str, | str, | 发布标题,用于标识这次发布的名称或版本号 | [optional] +**releaseComment** | str, | str, | 发布备注,详细描述本次发布的变更内容和目的 | [optional] +**releasedBy** | str, | str, | 发布操作者用户名,记录是谁执行了这次发布操作 | [optional] +**isEmergencyPublish** | bool, | BoolClass, | 是否为紧急发布,紧急发布可能会跳过某些审核流程 | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/OpenAppDTO.md b/python/docs/models/OpenAppDTO.md new file mode 100644 index 00000000..3d231bb8 --- /dev/null +++ b/python/docs/models/OpenAppDTO.md @@ -0,0 +1,25 @@ +# apollo_openapi.model.open_app_dto.OpenAppDTO + +Apollo应用信息数据传输对象,包含应用的基本信息和元数据 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Apollo应用信息数据传输对象,包含应用的基本信息和元数据 | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**dataChangeCreatedBy** | str, | str, | 数据创建者用户名,记录是谁创建了这个应用 | [optional] +**dataChangeLastModifiedBy** | str, | str, | 数据最后修改者用户名,记录最后一次修改应用信息的用户 | [optional] +**dataChangeCreatedTime** | str, | str, | 数据创建时间,ISO 8601格式的时间戳 | [optional] +**dataChangeLastModifiedTime** | str, | str, | 数据最后修改时间,ISO 8601格式的时间戳 | [optional] +**name** | str, | str, | 应用名称,用于显示的友好名称 | [optional] +**appId** | str, | str, | 应用唯一标识符,全局唯一的应用ID | [optional] +**orgId** | str, | str, | 组织ID,应用所属组织的唯一标识 | [optional] +**orgName** | str, | str, | 组织名称,应用所属组织的显示名称 | [optional] +**ownerName** | str, | str, | 应用负责人姓名,应用的主要负责人 | [optional] +**ownerEmail** | 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/OpenAppNamespaceDTO.md b/python/docs/models/OpenAppNamespaceDTO.md new file mode 100644 index 00000000..673f60b4 --- /dev/null +++ b/python/docs/models/OpenAppNamespaceDTO.md @@ -0,0 +1,25 @@ +# apollo_openapi.model.open_app_namespace_dto.OpenAppNamespaceDTO + +Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**dataChangeCreatedBy** | str, | str, | 命名空间创建者用户名,记录是谁创建了这个应用命名空间 | [optional] +**dataChangeLastModifiedBy** | str, | str, | 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 | [optional] +**dataChangeCreatedTime** | str, | str, | 命名空间创建时间,ISO 8601格式的时间戳 | [optional] +**dataChangeLastModifiedTime** | str, | str, | 命名空间最后修改时间,ISO 8601格式的时间戳 | [optional] +**name** | str, | str, | 命名空间名称,在同一应用内唯一标识一个命名空间 | [optional] +**appId** | str, | str, | 所属应用的唯一标识符 | [optional] +**format** | str, | str, | 命名空间格式类型,如properties、xml、json、yml等 | [optional] +**isPublic** | bool, | BoolClass, | 是否为公共命名空间,公共命名空间可以被其他应用关联使用 | [optional] +**appendNamespacePrefix** | bool, | BoolClass, | 对于公共命名空间,是否在命名空间名称前添加前缀 | [optional] if omitted the server will use the default value of True +**comment** | str, | str, | 命名空间备注说明,描述命名空间的用途和包含的配置类型 | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/OpenClusterDTO.md b/python/docs/models/OpenClusterDTO.md new file mode 100644 index 00000000..2f3d9105 --- /dev/null +++ b/python/docs/models/OpenClusterDTO.md @@ -0,0 +1,21 @@ +# apollo_openapi.model.open_cluster_dto.OpenClusterDTO + +Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**dataChangeCreatedBy** | str, | str, | 集群创建者用户名,记录是谁创建了这个集群 | [optional] +**dataChangeLastModifiedBy** | str, | str, | 集群最后修改者用户名,记录最后一次修改集群信息的用户 | [optional] +**dataChangeCreatedTime** | str, | str, | 集群创建时间,ISO 8601格式的时间戳 | [optional] +**dataChangeLastModifiedTime** | str, | str, | 集群最后修改时间,ISO 8601格式的时间戳 | [optional] +**name** | str, | str, | 集群名称,在同一应用和环境下唯一标识一个集群 | [optional] +**appId** | 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/OpenCreateAppDTO.md b/python/docs/models/OpenCreateAppDTO.md new file mode 100644 index 00000000..1d2f8782 --- /dev/null +++ b/python/docs/models/OpenCreateAppDTO.md @@ -0,0 +1,32 @@ +# apollo_openapi.model.open_create_app_dto.OpenCreateAppDTO + +创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**assignAppRoleToSelf** | bool, | BoolClass, | 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 | [optional] +**[admins](#admins)** | list, tuple, | tuple, | 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 | [optional] +**app** | [**OpenAppDTO**](OpenAppDTO.md) | [**OpenAppDTO**](OpenAppDTO.md) | | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# admins + +应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +[[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/OpenEnvClusterDTO.md b/python/docs/models/OpenEnvClusterDTO.md new file mode 100644 index 00000000..63ffebf4 --- /dev/null +++ b/python/docs/models/OpenEnvClusterDTO.md @@ -0,0 +1,29 @@ +# apollo_openapi.model.open_env_cluster_dto.OpenEnvClusterDTO + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**env** | str, | str, | 环境标识,例如 DEV、FAT、UAT、PROD | [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] + +# clusters + +该环境下的集群名称列表 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | 该环境下的集群名称列表 | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +[[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 new file mode 100644 index 00000000..2841e2cd --- /dev/null +++ b/python/docs/models/OpenEnvClusterInfo.md @@ -0,0 +1,29 @@ +# apollo_openapi.model.open_env_cluster_info.OpenEnvClusterInfo + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**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] + +# clusters + +集群信息列表 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | 集群信息列表 | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenClusterDTO**](OpenClusterDTO.md) | [**OpenClusterDTO**](OpenClusterDTO.md) | [**OpenClusterDTO**](OpenClusterDTO.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/OpenGrayReleaseRuleDTO.md b/python/docs/models/OpenGrayReleaseRuleDTO.md new file mode 100644 index 00000000..a34ecfc0 --- /dev/null +++ b/python/docs/models/OpenGrayReleaseRuleDTO.md @@ -0,0 +1,38 @@ +# apollo_openapi.model.open_gray_release_rule_dto.OpenGrayReleaseRuleDTO + +Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**dataChangeCreatedBy** | str, | str, | 灰度规则创建者用户名,记录是谁创建了这个灰度发布规则 | [optional] +**dataChangeLastModifiedBy** | str, | str, | 灰度规则最后修改者用户名,记录最后一次修改规则的用户 | [optional] +**dataChangeCreatedTime** | str, | str, | 灰度规则创建时间,ISO 8601格式的时间戳 | [optional] +**dataChangeLastModifiedTime** | str, | str, | 灰度规则最后修改时间,ISO 8601格式的时间戳 | [optional] +**appId** | str, | str, | 所属应用的唯一标识符 | [optional] +**clusterName** | str, | str, | 所属集群的名称 | [optional] +**namespaceName** | str, | str, | 所属命名空间的名称 | [optional] +**branchName** | str, | str, | 灰度分支名称,标识灰度发布的分支 | [optional] +**[ruleItems](#ruleItems)** | 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] + +# ruleItems + +灰度发布规则项列表,包含具体的灰度规则条件 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | 灰度发布规则项列表,包含具体的灰度规则条件 | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenGrayReleaseRuleItemDTO**](OpenGrayReleaseRuleItemDTO.md) | [**OpenGrayReleaseRuleItemDTO**](OpenGrayReleaseRuleItemDTO.md) | [**OpenGrayReleaseRuleItemDTO**](OpenGrayReleaseRuleItemDTO.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/OpenGrayReleaseRuleItemDTO.md b/python/docs/models/OpenGrayReleaseRuleItemDTO.md new file mode 100644 index 00000000..ef20c62b --- /dev/null +++ b/python/docs/models/OpenGrayReleaseRuleItemDTO.md @@ -0,0 +1,46 @@ +# apollo_openapi.model.open_gray_release_rule_item_dto.OpenGrayReleaseRuleItemDTO + +Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**clientAppId** | str, | str, | 客户端应用ID,指定哪个应用可以获取灰度配置 | [optional] +**[clientIpList](#clientIpList)** | list, tuple, | tuple, | 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 | [optional] +**[clientLabelList](#clientLabelList)** | 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] + +# clientIpList + +客户端IP地址列表,指定哪些IP地址可以获取灰度配置 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +# clientLabelList + +客户端标签列表,通过标签来识别可以获取灰度配置的客户端 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | + +[[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/OpenInstanceConfigDTO.md b/python/docs/models/OpenInstanceConfigDTO.md new file mode 100644 index 00000000..24305c4e --- /dev/null +++ b/python/docs/models/OpenInstanceConfigDTO.md @@ -0,0 +1,16 @@ +# apollo_openapi.model.open_instance_config_dto.OpenInstanceConfigDTO + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**release** | [**OpenReleaseDTO**](OpenReleaseDTO.md) | [**OpenReleaseDTO**](OpenReleaseDTO.md) | | [optional] +**releaseDeliveryTime** | str, | str, | 配置下发时间(ISO 8601) | [optional] +**dataChangeLastModifiedTime** | str, | str, | 最后修改时间(ISO 8601) | [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/OpenInstanceDTO.md b/python/docs/models/OpenInstanceDTO.md new file mode 100644 index 00000000..e0ecf626 --- /dev/null +++ b/python/docs/models/OpenInstanceDTO.md @@ -0,0 +1,34 @@ +# apollo_openapi.model.open_instance_dto.OpenInstanceDTO + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | decimal.Decimal, int, | decimal.Decimal, | 实例ID | [optional] value must be a 64 bit integer +**appId** | str, | str, | 实例所属应用ID | [optional] +**clusterName** | str, | str, | 实例所属集群名称 | [optional] +**dataCenter** | str, | str, | 数据中心/机房标识 | [optional] +**ip** | str, | str, | 实例IP地址 | [optional] +**[configs](#configs)** | list, tuple, | tuple, | 实例当前生效的配置列表 | [optional] +**dataChangeCreatedTime** | str, | str, | 数据创建时间(ISO 8601) | [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] + +# configs + +实例当前生效的配置列表 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | 实例当前生效的配置列表 | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenInstanceConfigDTO**](OpenInstanceConfigDTO.md) | [**OpenInstanceConfigDTO**](OpenInstanceConfigDTO.md) | [**OpenInstanceConfigDTO**](OpenInstanceConfigDTO.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/OpenItemChangeSets.md b/python/docs/models/OpenItemChangeSets.md new file mode 100644 index 00000000..efa594cc --- /dev/null +++ b/python/docs/models/OpenItemChangeSets.md @@ -0,0 +1,64 @@ +# apollo_openapi.model.open_item_change_sets.OpenItemChangeSets + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**dataChangeCreatedBy** | str, | str, | 变更集合创建者用户名 | [optional] +**dataChangeLastModifiedBy** | str, | str, | 变更集合最后修改者用户名 | [optional] +**dataChangeCreatedByDisplayName** | str, | str, | 创建者显示名 | [optional] +**dataChangeLastModifiedByDisplayName** | str, | str, | 最后修改者显示名 | [optional] +**dataChangeCreatedTime** | str, | str, | 变更集合创建时间(ISO 8601) | [optional] +**dataChangeLastModifiedTime** | str, | str, | 变更集合最后修改时间(ISO 8601) | [optional] +**[createItems](#createItems)** | list, tuple, | tuple, | 待创建的配置项列表 | [optional] +**[updateItems](#updateItems)** | list, tuple, | tuple, | 待更新的配置项列表 | [optional] +**[deleteItems](#deleteItems)** | list, tuple, | tuple, | 待删除的配置项列表 | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# createItems + +待创建的配置项列表 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | 待创建的配置项列表 | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenItemDTO**](OpenItemDTO.md) | [**OpenItemDTO**](OpenItemDTO.md) | [**OpenItemDTO**](OpenItemDTO.md) | | + +# updateItems + +待更新的配置项列表 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | 待更新的配置项列表 | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenItemDTO**](OpenItemDTO.md) | [**OpenItemDTO**](OpenItemDTO.md) | [**OpenItemDTO**](OpenItemDTO.md) | | + +# deleteItems + +待删除的配置项列表 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | 待删除的配置项列表 | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenItemDTO**](OpenItemDTO.md) | [**OpenItemDTO**](OpenItemDTO.md) | [**OpenItemDTO**](OpenItemDTO.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/OpenItemDTO.md b/python/docs/models/OpenItemDTO.md new file mode 100644 index 00000000..0291e544 --- /dev/null +++ b/python/docs/models/OpenItemDTO.md @@ -0,0 +1,23 @@ +# apollo_openapi.model.open_item_dto.OpenItemDTO + +Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**dataChangeCreatedBy** | str, | str, | 配置项创建者用户名,记录是谁创建了这个配置项 | [optional] +**dataChangeLastModifiedBy** | str, | str, | 配置项最后修改者用户名,记录最后一次修改配置的用户 | [optional] +**dataChangeCreatedTime** | str, | str, | 配置项创建时间,ISO 8601格式的时间戳 | [optional] +**dataChangeLastModifiedTime** | str, | str, | 配置项最后修改时间,ISO 8601格式的时间戳 | [optional] +**key** | str, | str, | 配置项的键名,在同一命名空间内唯一标识一个配置项 | [optional] +**type** | decimal.Decimal, int, | decimal.Decimal, | 配置项类型,0表示普通配置项,1表示文件类型配置项 | [optional] +**value** | str, | str, | 配置项的值,可以是字符串、数字、JSON等格式 | [optional] +**comment** | str, | str, | 配置项的注释说明,用于描述配置项的用途和含义 | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/OpenItemDiffs.md b/python/docs/models/OpenItemDiffs.md new file mode 100644 index 00000000..de73fe02 --- /dev/null +++ b/python/docs/models/OpenItemDiffs.md @@ -0,0 +1,16 @@ +# apollo_openapi.model.open_item_diffs.OpenItemDiffs + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**namespace** | [**OpenNamespaceIdentifier**](OpenNamespaceIdentifier.md) | [**OpenNamespaceIdentifier**](OpenNamespaceIdentifier.md) | | [optional] +**diffs** | [**OpenItemChangeSets**](OpenItemChangeSets.md) | [**OpenItemChangeSets**](OpenItemChangeSets.md) | | [optional] +**extInfo** | str, | str, | 扩展信息 | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/OpenNamespaceDTO.md b/python/docs/models/OpenNamespaceDTO.md new file mode 100644 index 00000000..7011ad98 --- /dev/null +++ b/python/docs/models/OpenNamespaceDTO.md @@ -0,0 +1,40 @@ +# apollo_openapi.model.open_namespace_dto.OpenNamespaceDTO + +Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**dataChangeCreatedBy** | str, | str, | 命名空间创建者用户名,记录是谁创建了这个命名空间 | [optional] +**dataChangeLastModifiedBy** | str, | str, | 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 | [optional] +**dataChangeCreatedTime** | str, | str, | 命名空间创建时间,ISO 8601格式的时间戳 | [optional] +**dataChangeLastModifiedTime** | str, | str, | 命名空间最后修改时间,ISO 8601格式的时间戳 | [optional] +**appId** | str, | str, | 所属应用的唯一标识符 | [optional] +**clusterName** | str, | str, | 所属集群的名称 | [optional] +**namespaceName** | str, | str, | 命名空间名称,在同一应用和集群下唯一标识一个命名空间 | [optional] +**comment** | str, | str, | 命名空间备注说明,描述命名空间的用途 | [optional] +**format** | str, | str, | 命名空间格式类型,如properties、xml、json、yml等 | [optional] +**isPublic** | bool, | BoolClass, | 是否为公共命名空间,公共命名空间可以被其他应用关联使用 | [optional] +**[items](#items)** | 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] + +# items + +命名空间包含的配置项列表 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | 命名空间包含的配置项列表 | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenItemDTO**](OpenItemDTO.md) | [**OpenItemDTO**](OpenItemDTO.md) | [**OpenItemDTO**](OpenItemDTO.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/OpenNamespaceIdentifier.md b/python/docs/models/OpenNamespaceIdentifier.md new file mode 100644 index 00000000..cb6f565d --- /dev/null +++ b/python/docs/models/OpenNamespaceIdentifier.md @@ -0,0 +1,17 @@ +# apollo_openapi.model.open_namespace_identifier.OpenNamespaceIdentifier + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**appId** | str, | str, | 应用唯一标识 | [optional] +**env** | str, | str, | 环境标识 | [optional] +**clusterName** | str, | str, | 集群名称 | [optional] +**namespaceName** | 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/OpenNamespaceLockDTO.md b/python/docs/models/OpenNamespaceLockDTO.md new file mode 100644 index 00000000..85c53100 --- /dev/null +++ b/python/docs/models/OpenNamespaceLockDTO.md @@ -0,0 +1,18 @@ +# apollo_openapi.model.open_namespace_lock_dto.OpenNamespaceLockDTO + +Apollo命名空间锁状态数据传输对象 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Apollo命名空间锁状态数据传输对象 | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**namespaceName** | str, | str, | 命名空间名称 | [optional] +**isLocked** | bool, | BoolClass, | 是否被锁定 | [optional] +**lockedBy** | 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/OpenNamespaceSyncModel.md b/python/docs/models/OpenNamespaceSyncModel.md new file mode 100644 index 00000000..24d1c5db --- /dev/null +++ b/python/docs/models/OpenNamespaceSyncModel.md @@ -0,0 +1,43 @@ +# apollo_openapi.model.open_namespace_sync_model.OpenNamespaceSyncModel + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**[syncToNamespaces](#syncToNamespaces)** | list, tuple, | tuple, | 目标命名空间标识列表 | [optional] +**[syncItems](#syncItems)** | list, tuple, | tuple, | 需要同步的配置项列表 | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# syncToNamespaces + +目标命名空间标识列表 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | 目标命名空间标识列表 | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenNamespaceIdentifier**](OpenNamespaceIdentifier.md) | [**OpenNamespaceIdentifier**](OpenNamespaceIdentifier.md) | [**OpenNamespaceIdentifier**](OpenNamespaceIdentifier.md) | | + +# syncItems + +需要同步的配置项列表 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | 需要同步的配置项列表 | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenItemDTO**](OpenItemDTO.md) | [**OpenItemDTO**](OpenItemDTO.md) | [**OpenItemDTO**](OpenItemDTO.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/OpenNamespaceTextModel.md b/python/docs/models/OpenNamespaceTextModel.md new file mode 100644 index 00000000..7a40be36 --- /dev/null +++ b/python/docs/models/OpenNamespaceTextModel.md @@ -0,0 +1,21 @@ +# apollo_openapi.model.open_namespace_text_model.OpenNamespaceTextModel + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**appId** | str, | str, | 应用唯一标识 | [optional] +**env** | str, | str, | 环境标识 | [optional] +**clusterName** | str, | str, | 集群名称 | [optional] +**namespaceName** | str, | str, | 命名空间名称 | [optional] +**namespaceId** | decimal.Decimal, int, | decimal.Decimal, | 命名空间ID | [optional] value must be a 64 bit integer +**format** | str, | str, | 命名空间格式类型(properties/xml/json/yml等) | [optional] +**configText** | str, | str, | 配置内容的原始文本 | [optional] +**operator** | 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/OpenOrganizationDto.md b/python/docs/models/OpenOrganizationDto.md new file mode 100644 index 00000000..193aff41 --- /dev/null +++ b/python/docs/models/OpenOrganizationDto.md @@ -0,0 +1,15 @@ +# apollo_openapi.model.open_organization_dto.OpenOrganizationDto + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**orgId** | str, | str, | 组织ID | [optional] +**orgName** | 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/OpenPageDTOOpenInstanceDTO.md b/python/docs/models/OpenPageDTOOpenInstanceDTO.md new file mode 100644 index 00000000..9a37928b --- /dev/null +++ b/python/docs/models/OpenPageDTOOpenInstanceDTO.md @@ -0,0 +1,33 @@ +# apollo_openapi.model.open_page_dto_open_instance_dto.OpenPageDTOOpenInstanceDTO + +分页实例数据传输对象,用于返回分页查询的实例列表结果 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | 分页实例数据传输对象,用于返回分页查询的实例列表结果 | + +### Dictionary Keys +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] +**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 + +当前页的实例列表,包含具体的实例数据 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | 当前页的实例列表,包含具体的实例数据 | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenInstanceDTO**](OpenInstanceDTO.md) | [**OpenInstanceDTO**](OpenInstanceDTO.md) | [**OpenInstanceDTO**](OpenInstanceDTO.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/OpenPageDTOOpenItemDTO.md b/python/docs/models/OpenPageDTOOpenItemDTO.md new file mode 100644 index 00000000..385958c9 --- /dev/null +++ b/python/docs/models/OpenPageDTOOpenItemDTO.md @@ -0,0 +1,33 @@ +# apollo_openapi.model.open_page_dto_open_item_dto.OpenPageDTOOpenItemDTO + +分页配置项数据传输对象,用于返回分页查询的配置项列表结果 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 | + +### Dictionary Keys +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] +**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 + +当前页的配置项列表,包含具体的配置项数据 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | 当前页的配置项列表,包含具体的配置项数据 | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenItemDTO**](OpenItemDTO.md) | [**OpenItemDTO**](OpenItemDTO.md) | [**OpenItemDTO**](OpenItemDTO.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/OpenReleaseBO.md b/python/docs/models/OpenReleaseBO.md new file mode 100644 index 00000000..c9557619 --- /dev/null +++ b/python/docs/models/OpenReleaseBO.md @@ -0,0 +1,27 @@ +# apollo_openapi.model.open_release_bo.OpenReleaseBO + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**baseInfo** | [**OpenReleaseDTO**](OpenReleaseDTO.md) | [**OpenReleaseDTO**](OpenReleaseDTO.md) | | [optional] +**[items](#items)** | 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] + +# items + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**KVEntity**](KVEntity.md) | [**KVEntity**](KVEntity.md) | [**KVEntity**](KVEntity.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/OpenReleaseDTO.md b/python/docs/models/OpenReleaseDTO.md new file mode 100644 index 00000000..17e1a688 --- /dev/null +++ b/python/docs/models/OpenReleaseDTO.md @@ -0,0 +1,26 @@ +# apollo_openapi.model.open_release_dto.OpenReleaseDTO + +Apollo发布信息数据传输对象,表示一次配置发布的完整信息 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Apollo发布信息数据传输对象,表示一次配置发布的完整信息 | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**dataChangeCreatedBy** | str, | str, | 发布创建者用户名,记录是谁创建了这次发布 | [optional] +**dataChangeLastModifiedBy** | str, | str, | 发布最后修改者用户名,记录最后一次修改发布信息的用户 | [optional] +**dataChangeCreatedTime** | str, | str, | 发布创建时间,ISO 8601格式的时间戳 | [optional] +**dataChangeLastModifiedTime** | str, | str, | 发布最后修改时间,ISO 8601格式的时间戳 | [optional] +**id** | decimal.Decimal, int, | decimal.Decimal, | 发布记录的唯一标识符,系统自动生成 | [optional] value must be a 64 bit integer +**appId** | str, | str, | 所属应用的唯一标识符 | [optional] +**clusterName** | str, | str, | 所属集群的名称 | [optional] +**namespaceName** | str, | str, | 所属命名空间的名称 | [optional] +**name** | str, | str, | 发布名称,用于标识这次发布的版本或描述 | [optional] +**configurations** | [**MapString**](MapString.md) | [**MapString**](MapString.md) | | [optional] +**comment** | str, | str, | 发布备注,描述本次发布的变更内容和目的 | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/RichResponseEntity.md b/python/docs/models/RichResponseEntity.md new file mode 100644 index 00000000..0e5fac63 --- /dev/null +++ b/python/docs/models/RichResponseEntity.md @@ -0,0 +1,36 @@ +# apollo_openapi.model.rich_response_entity.RichResponseEntity + +A wrapper for a single response entity with code, message, and body + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | A wrapper for a single response entity with code, message, and body | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**code** | decimal.Decimal, int, | decimal.Decimal, | HTTP status code | +**[message](#message)** | dict, frozendict.frozendict, | frozendict.frozendict, | Response message (can be string or object) | +**[body](#body)** | dict, frozendict.frozendict, | frozendict.frozendict, | Response payload (generic type T) | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# message + +Response message (can be string or object) + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Response message (can be string or object) | + +# body + +Response payload (generic type T) + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Response payload (generic type T) | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/StringToStringBoolMap.md b/python/docs/models/StringToStringBoolMap.md new file mode 100644 index 00000000..5e43fe6d --- /dev/null +++ b/python/docs/models/StringToStringBoolMap.md @@ -0,0 +1,25 @@ +# apollo_openapi.model.string_to_string_bool_map.StringToStringBoolMap + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**[any_string_name](#any_string_name)** | dict, frozendict.frozendict, | frozendict.frozendict, | any string name can be used but the value must be the correct type | [optional] + +# any_string_name + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**any_string_name** | bool, | BoolClass, | 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/git_push.sh b/python/git_push.sh index f53a75d4..18f86b99 100644 --- a/python/git_push.sh +++ b/python/git_push.sh @@ -38,14 +38,14 @@ git add . git commit -m "$release_note" # Sets the new remote -git_remote=$(git remote) +git_remote=`git remote` if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git fi fi diff --git a/python/pyproject.toml b/python/pyproject.toml deleted file mode 100644 index 524fc385..00000000 --- a/python/pyproject.toml +++ /dev/null @@ -1,95 +0,0 @@ -[project] -name = "apollo_openapi" -version = "0.0.1" -description = "Apollo OpenAPI" -authors = [ - {name = "OpenAPI Generator Community",email = "team@openapitools.org"}, -] -readme = "README.md" -keywords = ["OpenAPI", "OpenAPI-Generator", "Apollo OpenAPI"] -requires-python = ">=3.9" - -dependencies = [ - "urllib3 (>=2.1.0,<3.0.0)", - "python-dateutil (>=2.8.2)", - "pydantic (>=2)", - "typing-extensions (>=4.7.1)", - "lazy-imports (>=1,<2)" -] - -[project.urls] -Repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" - -[tool.poetry] -requires-poetry = ">=2.0" - -[tool.poetry.group.dev.dependencies] -pytest = ">= 7.2.1" -pytest-cov = ">= 2.8.1" -tox = ">= 3.9.0" -flake8 = ">= 4.0.0" -types-python-dateutil = ">= 2.8.19.14" -mypy = ">= 1.5" - - -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" - -[tool.mypy] -files = [ - "apollo_openapi", - #"test", # auto-generated tests - "tests", # hand-written tests -] -# TODO: enable "strict" once all these individual checks are passing -# strict = true - -# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options -warn_unused_configs = true -warn_redundant_casts = true -warn_unused_ignores = true - -## Getting these passing should be easy -strict_equality = true -extra_checks = true - -## Strongly recommend enabling this one as soon as you can -check_untyped_defs = true - -## These shouldn't be too much additional work, but may be tricky to -## get passing if you use a lot of untyped libraries -disallow_subclassing_any = true -disallow_untyped_decorators = true -disallow_any_generics = true - -### These next few are various gradations of forcing use of type annotations -#disallow_untyped_calls = true -#disallow_incomplete_defs = true -#disallow_untyped_defs = true -# -### This one isn't too hard to get passing, but return on investment is lower -#no_implicit_reexport = true -# -### This one can be tricky to get passing if you use a lot of untyped libraries -#warn_return_any = true - -[[tool.mypy.overrides]] -module = [ - "apollo_openapi.configuration", -] -warn_unused_ignores = true -strict_equality = true -extra_checks = true -check_untyped_defs = true -disallow_subclassing_any = true -disallow_untyped_decorators = true -disallow_any_generics = true -disallow_untyped_calls = true -disallow_incomplete_defs = true -disallow_untyped_defs = true -no_implicit_reexport = true -warn_return_any = true diff --git a/python/requirements.txt b/python/requirements.txt index 867a4496..3cb66126 100644 --- a/python/requirements.txt +++ b/python/requirements.txt @@ -1,5 +1,6 @@ -urllib3 >= 2.1.0, < 3.0.0 -python_dateutil >= 2.8.2 -pydantic >= 2 -typing-extensions >= 4.7.1 -lazy-imports >= 1, < 2 +certifi >= 14.5.14 +frozendict ~= 2.3.4 +python-dateutil ~= 2.7.0 +setuptools >= 21.0.0 +typing_extensions ~= 4.3.0 +urllib3 ~= 1.26.7 diff --git a/python/setup.py b/python/setup.py index 41901eaf..bb03889b 100644 --- a/python/setup.py +++ b/python/setup.py @@ -3,32 +3,30 @@ """ Apollo OpenAPI - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` +

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 OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - + Generated by: https://openapi-generator.tech +""" from setuptools import setup, find_packages # noqa: H301 +NAME = "apollo-openapi" +VERSION = "0.0.1" # To install the library, run the following # # python setup.py install # # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools -NAME = "apollo-openapi" -VERSION = "0.0.1" -PYTHON_REQUIRES = ">= 3.9" + REQUIRES = [ - "urllib3 >= 2.1.0, < 3.0.0", - "python-dateutil >= 2.8.2", - "pydantic >= 2", - "typing-extensions >= 4.7.1", - "lazy-imports >= 1, < 2", + "certifi >= 14.5.14", + "frozendict ~= 2.3.4", + "python-dateutil ~= 2.7.0", + "setuptools >= 21.0.0", + "typing_extensions ~= 4.3.0", + "urllib3 ~= 1.26.7", ] setup( @@ -39,12 +37,11 @@ author_email="team@openapitools.org", url="", keywords=["OpenAPI", "OpenAPI-Generator", "Apollo OpenAPI"], + python_requires=">=3.7", install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, - long_description_content_type='text/markdown', long_description="""\ - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - """, # noqa: E501 - package_data={"apollo_openapi": ["py.typed"]}, -) \ No newline at end of file + <p>Apollo配置中心OpenAPI接口文档</p> <h2>认证方式</h2> <p>所有 API 接口都需要通过 <code>Authorization</code> header 进行身份验证。</p> <h3>获取 Token 的方式:</h3> <ol> <li><b>Portal 管理界面获取</b>:登录 Portal → 管理员工具 → 开放平台授权管理 → 创建第三方应用,获取 Token。</li> <li><b>Token 格式</b>:<code>Authorization: token_value</code></li> <li><b>Token 权限</b>:按应用/环境/命名空间授予,建议不同用途分别创建。</li> </ol> <h3>使用示例</h3> <pre><code class=\"language-bash\">curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"</code></pre> # noqa: E501 + """ +) diff --git a/python/test-requirements.txt b/python/test-requirements.txt index e98555c1..2d88b034 100644 --- a/python/test-requirements.txt +++ b/python/test-requirements.txt @@ -1,6 +1,3 @@ -pytest >= 7.2.1 -pytest-cov >= 2.8.1 -tox >= 3.9.0 -flake8 >= 4.0.0 -types-python-dateutil >= 2.8.19.14 -mypy >= 1.5 +pytest~=4.6.7 # needed for python 3.4 +pytest-cov>=2.8.1 +pytest-randomly==1.2.3 # needed for python 3.4 diff --git a/python/test/__init__.py b/python/test/__init__.py index e69de29b..8b137891 100644 --- a/python/test/__init__.py +++ b/python/test/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_app_management_api.py b/python/test/test_app_management_api.py deleted file mode 100644 index 86ab8b35..00000000 --- a/python/test/test_app_management_api.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.api.app_management_api import AppManagementApi - - -class TestAppManagementApi(unittest.TestCase): - """AppManagementApi unit test stubs""" - - def setUp(self) -> None: - self.api = AppManagementApi() - - def tearDown(self) -> None: - pass - - def test_openapi_v1_apps_app_id_appnamespaces_namespace_name_delete(self) -> None: - """Test case for openapi_v1_apps_app_id_appnamespaces_namespace_name_delete - - 删除AppNamespace - """ - pass - - def test_openapi_v1_apps_app_id_delete(self) -> None: - """Test case for openapi_v1_apps_app_id_delete - - 删除应用 - """ - pass - - def test_openapi_v1_apps_app_id_env_clusters_get(self) -> None: - """Test case for openapi_v1_apps_app_id_env_clusters_get - - 获取应用的环境集群信息 - """ - pass - - def test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete(self) -> None: - """Test case for openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete - - 删除关联的Namespace - """ - pass - - def test_openapi_v1_apps_app_id_get(self) -> None: - """Test case for openapi_v1_apps_app_id_get - - 获取单个应用信息 - """ - pass - - def test_openapi_v1_apps_app_id_miss_envs_get(self) -> None: - """Test case for openapi_v1_apps_app_id_miss_envs_get - - 查找缺失的环境 - """ - pass - - def test_openapi_v1_apps_app_id_namespaces_releases_status_get(self) -> None: - """Test case for openapi_v1_apps_app_id_namespaces_releases_status_get - - 获取应用下所有Namespace的发布状态 - """ - pass - - def test_openapi_v1_apps_app_id_navtree_get(self) -> None: - """Test case for openapi_v1_apps_app_id_navtree_get - - 获取应用导航树 - """ - pass - - def test_openapi_v1_apps_app_id_put(self) -> None: - """Test case for openapi_v1_apps_app_id_put - - 更新应用 - """ - pass - - def test_openapi_v1_apps_by_self_get(self) -> None: - """Test case for openapi_v1_apps_by_self_get - - 获取当前Consumer的应用列表(分页) - """ - pass - - def test_openapi_v1_apps_envs_env_post(self) -> None: - """Test case for openapi_v1_apps_envs_env_post - - 在指定环境创建应用 - """ - pass - - def test_openapi_v1_apps_get(self) -> None: - """Test case for openapi_v1_apps_get - - 获取当前Consumer授权的应用列表 - """ - pass - - def test_openapi_v1_apps_post(self) -> None: - """Test case for openapi_v1_apps_post - - 创建应用 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_change.py b/python/test/test_change.py deleted file mode 100644 index 6efe5d3d..00000000 --- a/python/test/test_change.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.change import Change - -class TestChange(unittest.TestCase): - """Change unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Change: - """Test Change - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Change` - """ - model = Change() - if include_optional: - return Change( - type = 'ADDED', - entity = apollo_openapi.models.entity_pair_kv_entity.EntityPairKVEntity( - first_entity = apollo_openapi.models.kv_entity.KVEntity( - key = '', - value = '', ), - second_entity = apollo_openapi.models.kv_entity.KVEntity( - key = '', - value = '', ), ) - ) - else: - return Change( - ) - """ - - def testChange(self): - """Test Change""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_cluster_dto.py b/python/test/test_cluster_dto.py deleted file mode 100644 index 63395c98..00000000 --- a/python/test/test_cluster_dto.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.cluster_dto import ClusterDTO - -class TestClusterDTO(unittest.TestCase): - """ClusterDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClusterDTO: - """Test ClusterDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ClusterDTO` - """ - model = ClusterDTO() - if include_optional: - return ClusterDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_by_display_name = '', - data_change_last_modified_by_display_name = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - name = 'zbUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5aw', - app_id = '', - parent_cluster_id = 56, - comment = '' - ) - else: - return ClusterDTO( - name = 'zbUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5aw', - app_id = '', - ) - """ - - def testClusterDTO(self): - """Test ClusterDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_cluster_management_api.py b/python/test/test_cluster_management_api.py deleted file mode 100644 index 7fcff3e4..00000000 --- a/python/test/test_cluster_management_api.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.api.cluster_management_api import ClusterManagementApi - - -class TestClusterManagementApi(unittest.TestCase): - """ClusterManagementApi unit test stubs""" - - def setUp(self) -> None: - self.api = ClusterManagementApi() - - def tearDown(self) -> None: - pass - - def test_openapi_v1_apps_app_id_clusters_cluster_name_get(self) -> None: - """Test case for openapi_v1_apps_app_id_clusters_cluster_name_get - - 获取指定集群信息 - """ - pass - - def test_openapi_v1_apps_app_id_clusters_post(self) -> None: - """Test case for openapi_v1_apps_app_id_clusters_post - - 创建集群 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete - - 删除集群 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get - - 获取命名空间分支信息 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get - - 获取指定的Namespace - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_entity_pair_kv_entity.py b/python/test/test_entity_pair_kv_entity.py deleted file mode 100644 index 8b7d7b59..00000000 --- a/python/test/test_entity_pair_kv_entity.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.entity_pair_kv_entity import EntityPairKVEntity - -class TestEntityPairKVEntity(unittest.TestCase): - """EntityPairKVEntity unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EntityPairKVEntity: - """Test EntityPairKVEntity - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EntityPairKVEntity` - """ - model = EntityPairKVEntity() - if include_optional: - return EntityPairKVEntity( - first_entity = apollo_openapi.models.kv_entity.KVEntity( - key = '', - value = '', ), - second_entity = apollo_openapi.models.kv_entity.KVEntity( - key = '', - value = '', ) - ) - else: - return EntityPairKVEntity( - ) - """ - - def testEntityPairKVEntity(self): - """Test EntityPairKVEntity""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_env_cluster_info.py b/python/test/test_env_cluster_info.py deleted file mode 100644 index 5492c126..00000000 --- a/python/test/test_env_cluster_info.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.env_cluster_info import EnvClusterInfo - -class TestEnvClusterInfo(unittest.TestCase): - """EnvClusterInfo unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EnvClusterInfo: - """Test EnvClusterInfo - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EnvClusterInfo` - """ - model = EnvClusterInfo() - if include_optional: - return EnvClusterInfo( - env = '', - clusters = [ - apollo_openapi.models.cluster_dto.ClusterDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_by_display_name = '', - data_change_last_modified_by_display_name = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - name = 'zbUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5aw', - app_id = '', - parent_cluster_id = 56, - comment = '', ) - ] - ) - else: - return EnvClusterInfo( - ) - """ - - def testEnvClusterInfo(self): - """Test EnvClusterInfo""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_instance_management_api.py b/python/test/test_instance_management_api.py deleted file mode 100644 index bc3cec11..00000000 --- a/python/test/test_instance_management_api.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.api.instance_management_api import InstanceManagementApi - - -class TestInstanceManagementApi(unittest.TestCase): - """InstanceManagementApi unit test stubs""" - - def setUp(self) -> None: - self.api = InstanceManagementApi() - - def tearDown(self) -> None: - pass - - def test_openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get(self) -> None: - """Test case for openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get - - 获取命名空间下的实例数量 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get - - 查询不在指定发布版本中的实例 - """ - pass - - def test_openapi_v1_envs_env_releases_release_id_instances_get(self) -> None: - """Test case for openapi_v1_envs_env_releases_release_id_instances_get - - 根据发布版本查询实例(支持分页) - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_item_change_sets.py b/python/test/test_item_change_sets.py deleted file mode 100644 index c2b703b4..00000000 --- a/python/test/test_item_change_sets.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.item_change_sets import ItemChangeSets - -class TestItemChangeSets(unittest.TestCase): - """ItemChangeSets unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ItemChangeSets: - """Test ItemChangeSets - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ItemChangeSets` - """ - model = ItemChangeSets() - if include_optional: - return ItemChangeSets( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_by_display_name = '', - data_change_last_modified_by_display_name = '', - data_change_created_time = '', - data_change_last_modified_time = '', - create_items = [ - apollo_openapi.models.item_dto.ItemDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_by_display_name = '', - data_change_last_modified_by_display_name = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - namespace_id = 56, - key = '', - type = 56, - value = '', - comment = '', - line_num = 56, ) - ], - update_items = [ - apollo_openapi.models.item_dto.ItemDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_by_display_name = '', - data_change_last_modified_by_display_name = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - namespace_id = 56, - key = '', - type = 56, - value = '', - comment = '', - line_num = 56, ) - ], - delete_items = [ - apollo_openapi.models.item_dto.ItemDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_by_display_name = '', - data_change_last_modified_by_display_name = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - namespace_id = 56, - key = '', - type = 56, - value = '', - comment = '', - line_num = 56, ) - ] - ) - else: - return ItemChangeSets( - ) - """ - - def testItemChangeSets(self): - """Test ItemChangeSets""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_item_dto.py b/python/test/test_item_dto.py deleted file mode 100644 index 5ae77ea4..00000000 --- a/python/test/test_item_dto.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.item_dto import ItemDTO - -class TestItemDTO(unittest.TestCase): - """ItemDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ItemDTO: - """Test ItemDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ItemDTO` - """ - model = ItemDTO() - if include_optional: - return ItemDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_by_display_name = '', - data_change_last_modified_by_display_name = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - namespace_id = 56, - key = '', - type = 56, - value = '', - comment = '', - line_num = 56 - ) - else: - return ItemDTO( - ) - """ - - def testItemDTO(self): - """Test ItemDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_item_management_api.py b/python/test/test_item_management_api.py deleted file mode 100644 index 474e1964..00000000 --- a/python/test/test_item_management_api.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.api.item_management_api import ItemManagementApi - - -class TestItemManagementApi(unittest.TestCase): - """ItemManagementApi unit test stubs""" - - def setUp(self) -> None: - self.api = ItemManagementApi() - - def tearDown(self) -> None: - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete - - 通过编码的key删除配置项 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get - - 通过查询参数获取配置项(支持编码的key) - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put - - 通过编码的key更新配置项 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put - - 通过文本批量修改配置项 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post - - 对比命名空间配置差异 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get - - 获取命名空间下的配置项列表 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete - - 删除配置项 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get - - 获取单个配置项 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put - - 更新配置项 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post - - 创建新的配置项 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post - - 撤销配置项更改 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post - - 同步配置项到多个命名空间 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post - - 验证配置文本语法 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_kv_entity.py b/python/test/test_kv_entity.py deleted file mode 100644 index c600021b..00000000 --- a/python/test/test_kv_entity.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.kv_entity import KVEntity - -class TestKVEntity(unittest.TestCase): - """KVEntity unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> KVEntity: - """Test KVEntity - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `KVEntity` - """ - model = KVEntity() - if include_optional: - return KVEntity( - key = '', - value = '' - ) - else: - return KVEntity( - ) - """ - - def testKVEntity(self): - """Test KVEntity""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_list_item_diffs.py b/python/test/test_list_item_diffs.py deleted file mode 100644 index 3dc8b5bc..00000000 --- a/python/test/test_list_item_diffs.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.list_item_diffs import ListItemDiffs - -class TestListItemDiffs(unittest.TestCase): - """ListItemDiffs unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListItemDiffs: - """Test ListItemDiffs - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ListItemDiffs` - """ - model = ListItemDiffs() - if include_optional: - return ListItemDiffs( - namespace = apollo_openapi.models.namespace_identifier.NamespaceIdentifier( - app_id = '', - env = '', - cluster_name = '', - namespace_name = '', ), - diffs = apollo_openapi.models.item_change_sets.ItemChangeSets( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_by_display_name = '', - data_change_last_modified_by_display_name = '', - data_change_created_time = '', - data_change_last_modified_time = '', - create_items = [ - apollo_openapi.models.item_dto.ItemDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_by_display_name = '', - data_change_last_modified_by_display_name = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - namespace_id = 56, - key = '', - type = 56, - value = '', - comment = '', - line_num = 56, ) - ], - update_items = [ - apollo_openapi.models.item_dto.ItemDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_by_display_name = '', - data_change_last_modified_by_display_name = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - namespace_id = 56, - key = '', - type = 56, - value = '', - comment = '', - line_num = 56, ) - ], - delete_items = [ - - ], ), - ext_info = '' - ) - else: - return ListItemDiffs( - ) - """ - - def testListItemDiffs(self): - """Test ListItemDiffs""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_list_release_bo.py b/python/test/test_list_release_bo.py deleted file mode 100644 index ec02b1d2..00000000 --- a/python/test/test_list_release_bo.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.list_release_bo import ListReleaseBO - -class TestListReleaseBO(unittest.TestCase): - """ListReleaseBO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListReleaseBO: - """Test ListReleaseBO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ListReleaseBO` - """ - model = ListReleaseBO() - if include_optional: - return ListReleaseBO( - base_info = apollo_openapi.models.release_dto.ReleaseDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_by_display_name = '', - data_change_last_modified_by_display_name = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - release_key = '', - name = '', - app_id = '', - cluster_name = '', - namespace_name = '', - configurations = '', - comment = '', - is_abandoned = True, ), - items = [ - apollo_openapi.models.kv_entity.KVEntity( - key = '', - value = '', ) - ] - ) - else: - return ListReleaseBO( - ) - """ - - def testListReleaseBO(self): - """Test ListReleaseBO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_map_string.py b/python/test/test_map_string.py deleted file mode 100644 index a4342e0f..00000000 --- a/python/test/test_map_string.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.map_string import MapString - -class TestMapString(unittest.TestCase): - """MapString unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> MapString: - """Test MapString - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `MapString` - """ - model = MapString() - if include_optional: - return MapString( - key = '' - ) - else: - return MapString( - ) - """ - - def testMapString(self): - """Test MapString""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_models/__init__.py b/python/test/test_models/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_models/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_models/test_exception_response.py b/python/test/test_models/test_exception_response.py new file mode 100644 index 00000000..fd359078 --- /dev/null +++ b/python/test/test_models/test_exception_response.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.exception_response import ExceptionResponse +from apollo_openapi import configuration + + +class TestExceptionResponse(unittest.TestCase): + """ExceptionResponse unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_kv_entity.py b/python/test/test_models/test_kv_entity.py new file mode 100644 index 00000000..6ece88fb --- /dev/null +++ b/python/test/test_models/test_kv_entity.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.kv_entity import KVEntity +from apollo_openapi import configuration + + +class TestKVEntity(unittest.TestCase): + """KVEntity unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_map_string.py b/python/test/test_models/test_map_string.py new file mode 100644 index 00000000..4b94221f --- /dev/null +++ b/python/test/test_models/test_map_string.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.map_string import MapString +from apollo_openapi import configuration + + +class TestMapString(unittest.TestCase): + """MapString unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_multi_response_entity.py b/python/test/test_models/test_multi_response_entity.py new file mode 100644 index 00000000..74f69f16 --- /dev/null +++ b/python/test/test_models/test_multi_response_entity.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.multi_response_entity import MultiResponseEntity +from apollo_openapi import configuration + + +class TestMultiResponseEntity(unittest.TestCase): + """MultiResponseEntity unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_namespace_gray_del_release_dto.py b/python/test/test_models/test_namespace_gray_del_release_dto.py new file mode 100644 index 00000000..145abc78 --- /dev/null +++ b/python/test/test_models/test_namespace_gray_del_release_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.namespace_gray_del_release_dto import NamespaceGrayDelReleaseDTO +from apollo_openapi import configuration + + +class TestNamespaceGrayDelReleaseDTO(unittest.TestCase): + """NamespaceGrayDelReleaseDTO unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_namespace_release_dto.py b/python/test/test_models/test_namespace_release_dto.py new file mode 100644 index 00000000..530b9867 --- /dev/null +++ b/python/test/test_models/test_namespace_release_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.namespace_release_dto import NamespaceReleaseDTO +from apollo_openapi import configuration + + +class TestNamespaceReleaseDTO(unittest.TestCase): + """NamespaceReleaseDTO unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_open_app_dto.py b/python/test/test_models/test_open_app_dto.py new file mode 100644 index 00000000..53d2097f --- /dev/null +++ b/python/test/test_models/test_open_app_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_app_dto import OpenAppDTO +from apollo_openapi import configuration + + +class TestOpenAppDTO(unittest.TestCase): + """OpenAppDTO unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_open_app_namespace_dto.py b/python/test/test_models/test_open_app_namespace_dto.py new file mode 100644 index 00000000..1a53edf5 --- /dev/null +++ b/python/test/test_models/test_open_app_namespace_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_app_namespace_dto import OpenAppNamespaceDTO +from apollo_openapi import configuration + + +class TestOpenAppNamespaceDTO(unittest.TestCase): + """OpenAppNamespaceDTO unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_open_cluster_dto.py b/python/test/test_models/test_open_cluster_dto.py new file mode 100644 index 00000000..93d6bfc5 --- /dev/null +++ b/python/test/test_models/test_open_cluster_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_cluster_dto import OpenClusterDTO +from apollo_openapi import configuration + + +class TestOpenClusterDTO(unittest.TestCase): + """OpenClusterDTO unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_open_create_app_dto.py b/python/test/test_models/test_open_create_app_dto.py new file mode 100644 index 00000000..7e42cfc7 --- /dev/null +++ b/python/test/test_models/test_open_create_app_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_create_app_dto import OpenCreateAppDTO +from apollo_openapi import configuration + + +class TestOpenCreateAppDTO(unittest.TestCase): + """OpenCreateAppDTO unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_open_env_cluster_dto.py b/python/test/test_models/test_open_env_cluster_dto.py new file mode 100644 index 00000000..4252b76a --- /dev/null +++ b/python/test/test_models/test_open_env_cluster_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_env_cluster_dto import OpenEnvClusterDTO +from apollo_openapi import configuration + + +class TestOpenEnvClusterDTO(unittest.TestCase): + """OpenEnvClusterDTO unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_open_env_cluster_info.py b/python/test/test_models/test_open_env_cluster_info.py new file mode 100644 index 00000000..0e528c36 --- /dev/null +++ b/python/test/test_models/test_open_env_cluster_info.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_env_cluster_info import OpenEnvClusterInfo +from apollo_openapi import configuration + + +class TestOpenEnvClusterInfo(unittest.TestCase): + """OpenEnvClusterInfo unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_open_gray_release_rule_dto.py b/python/test/test_models/test_open_gray_release_rule_dto.py new file mode 100644 index 00000000..c8efecf6 --- /dev/null +++ b/python/test/test_models/test_open_gray_release_rule_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_gray_release_rule_dto import OpenGrayReleaseRuleDTO +from apollo_openapi import configuration + + +class TestOpenGrayReleaseRuleDTO(unittest.TestCase): + """OpenGrayReleaseRuleDTO unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_open_gray_release_rule_item_dto.py b/python/test/test_models/test_open_gray_release_rule_item_dto.py new file mode 100644 index 00000000..41843108 --- /dev/null +++ b/python/test/test_models/test_open_gray_release_rule_item_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_gray_release_rule_item_dto import OpenGrayReleaseRuleItemDTO +from apollo_openapi import configuration + + +class TestOpenGrayReleaseRuleItemDTO(unittest.TestCase): + """OpenGrayReleaseRuleItemDTO unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_open_instance_config_dto.py b/python/test/test_models/test_open_instance_config_dto.py new file mode 100644 index 00000000..e68aa8bb --- /dev/null +++ b/python/test/test_models/test_open_instance_config_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_instance_config_dto import OpenInstanceConfigDTO +from apollo_openapi import configuration + + +class TestOpenInstanceConfigDTO(unittest.TestCase): + """OpenInstanceConfigDTO unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_open_instance_dto.py b/python/test/test_models/test_open_instance_dto.py new file mode 100644 index 00000000..28421939 --- /dev/null +++ b/python/test/test_models/test_open_instance_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_instance_dto import OpenInstanceDTO +from apollo_openapi import configuration + + +class TestOpenInstanceDTO(unittest.TestCase): + """OpenInstanceDTO unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_open_item_change_sets.py b/python/test/test_models/test_open_item_change_sets.py new file mode 100644 index 00000000..d9374d93 --- /dev/null +++ b/python/test/test_models/test_open_item_change_sets.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_item_change_sets import OpenItemChangeSets +from apollo_openapi import configuration + + +class TestOpenItemChangeSets(unittest.TestCase): + """OpenItemChangeSets unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_open_item_diffs.py b/python/test/test_models/test_open_item_diffs.py new file mode 100644 index 00000000..bb1959b3 --- /dev/null +++ b/python/test/test_models/test_open_item_diffs.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_item_diffs import OpenItemDiffs +from apollo_openapi import configuration + + +class TestOpenItemDiffs(unittest.TestCase): + """OpenItemDiffs unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_open_item_dto.py b/python/test/test_models/test_open_item_dto.py new file mode 100644 index 00000000..53709405 --- /dev/null +++ b/python/test/test_models/test_open_item_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_item_dto import OpenItemDTO +from apollo_openapi import configuration + + +class TestOpenItemDTO(unittest.TestCase): + """OpenItemDTO unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_open_namespace_dto.py b/python/test/test_models/test_open_namespace_dto.py new file mode 100644 index 00000000..df9bdd20 --- /dev/null +++ b/python/test/test_models/test_open_namespace_dto.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import apollo_openapi +from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO +from apollo_openapi import configuration + + +class TestOpenNamespaceDTO(unittest.TestCase): + """OpenNamespaceDTO unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_open_namespace_identifier.py b/python/test/test_models/test_open_namespace_identifier.py new file mode 100644 index 00000000..1bcd5819 --- /dev/null +++ b/python/test/test_models/test_open_namespace_identifier.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import apollo_openapi +from apollo_openapi.model.open_namespace_identifier import OpenNamespaceIdentifier +from apollo_openapi import configuration + + +class TestOpenNamespaceIdentifier(unittest.TestCase): + """OpenNamespaceIdentifier unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_open_namespace_lock_dto.py b/python/test/test_models/test_open_namespace_lock_dto.py new file mode 100644 index 00000000..ac1042af --- /dev/null +++ b/python/test/test_models/test_open_namespace_lock_dto.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import apollo_openapi +from apollo_openapi.model.open_namespace_lock_dto import OpenNamespaceLockDTO +from apollo_openapi import configuration + + +class TestOpenNamespaceLockDTO(unittest.TestCase): + """OpenNamespaceLockDTO unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_open_namespace_sync_model.py b/python/test/test_models/test_open_namespace_sync_model.py new file mode 100644 index 00000000..d32584d0 --- /dev/null +++ b/python/test/test_models/test_open_namespace_sync_model.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import apollo_openapi +from apollo_openapi.model.open_namespace_sync_model import OpenNamespaceSyncModel +from apollo_openapi import configuration + + +class TestOpenNamespaceSyncModel(unittest.TestCase): + """OpenNamespaceSyncModel unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_open_namespace_text_model.py b/python/test/test_models/test_open_namespace_text_model.py new file mode 100644 index 00000000..76bffcb7 --- /dev/null +++ b/python/test/test_models/test_open_namespace_text_model.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import apollo_openapi +from apollo_openapi.model.open_namespace_text_model import OpenNamespaceTextModel +from apollo_openapi import configuration + + +class TestOpenNamespaceTextModel(unittest.TestCase): + """OpenNamespaceTextModel unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_open_organization_dto.py b/python/test/test_models/test_open_organization_dto.py new file mode 100644 index 00000000..ab731c90 --- /dev/null +++ b/python/test/test_models/test_open_organization_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_organization_dto import OpenOrganizationDto +from apollo_openapi import configuration + + +class TestOpenOrganizationDto(unittest.TestCase): + """OpenOrganizationDto unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_open_page_dto_open_instance_dto.py b/python/test/test_models/test_open_page_dto_open_instance_dto.py new file mode 100644 index 00000000..4af7f17b --- /dev/null +++ b/python/test/test_models/test_open_page_dto_open_instance_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_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO +from apollo_openapi import configuration + + +class TestOpenPageDTOOpenInstanceDTO(unittest.TestCase): + """OpenPageDTOOpenInstanceDTO unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_open_page_dto_open_item_dto.py b/python/test/test_models/test_open_page_dto_open_item_dto.py new file mode 100644 index 00000000..5b483aed --- /dev/null +++ b/python/test/test_models/test_open_page_dto_open_item_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_page_dto_open_item_dto import OpenPageDTOOpenItemDTO +from apollo_openapi import configuration + + +class TestOpenPageDTOOpenItemDTO(unittest.TestCase): + """OpenPageDTOOpenItemDTO unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_open_release_bo.py b/python/test/test_models/test_open_release_bo.py new file mode 100644 index 00000000..b068b013 --- /dev/null +++ b/python/test/test_models/test_open_release_bo.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_release_bo import OpenReleaseBO +from apollo_openapi import configuration + + +class TestOpenReleaseBO(unittest.TestCase): + """OpenReleaseBO unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_open_release_dto.py b/python/test/test_models/test_open_release_dto.py new file mode 100644 index 00000000..17e67d94 --- /dev/null +++ b/python/test/test_models/test_open_release_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_release_dto import OpenReleaseDTO +from apollo_openapi import configuration + + +class TestOpenReleaseDTO(unittest.TestCase): + """OpenReleaseDTO unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_rich_response_entity.py b/python/test/test_models/test_rich_response_entity.py new file mode 100644 index 00000000..a62aa2ba --- /dev/null +++ b/python/test/test_models/test_rich_response_entity.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.rich_response_entity import RichResponseEntity +from apollo_openapi import configuration + + +class TestRichResponseEntity(unittest.TestCase): + """RichResponseEntity unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_string_to_string_bool_map.py b/python/test/test_models/test_string_to_string_bool_map.py new file mode 100644 index 00000000..de73e730 --- /dev/null +++ b/python/test/test_models/test_string_to_string_bool_map.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.string_to_string_bool_map import StringToStringBoolMap +from apollo_openapi import configuration + + +class TestStringToStringBoolMap(unittest.TestCase): + """StringToStringBoolMap unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_namespace_branch_management_api.py b/python/test/test_namespace_branch_management_api.py deleted file mode 100644 index 8fa8d36c..00000000 --- a/python/test/test_namespace_branch_management_api.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.api.namespace_branch_management_api import NamespaceBranchManagementApi - - -class TestNamespaceBranchManagementApi(unittest.TestCase): - """NamespaceBranchManagementApi unit test stubs""" - - def setUp(self) -> None: - self.api = NamespaceBranchManagementApi() - - def tearDown(self) -> None: - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post - - 创建命名空间分支 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete - - 删除命名空间分支 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post - - 创建灰度删除发布 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get - - 获取分支灰度发布规则 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put - - 更新分支灰度发布规则 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get - - 获取分支下的配置项 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post - - 合并分支 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch - - 合并分支到主分支 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post - - 创建灰度发布 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_namespace_gray_del_release_dto.py b/python/test/test_namespace_gray_del_release_dto.py deleted file mode 100644 index d092e115..00000000 --- a/python/test/test_namespace_gray_del_release_dto.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.namespace_gray_del_release_dto import NamespaceGrayDelReleaseDTO - -class TestNamespaceGrayDelReleaseDTO(unittest.TestCase): - """NamespaceGrayDelReleaseDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> NamespaceGrayDelReleaseDTO: - """Test NamespaceGrayDelReleaseDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `NamespaceGrayDelReleaseDTO` - """ - model = NamespaceGrayDelReleaseDTO() - if include_optional: - return NamespaceGrayDelReleaseDTO( - release_title = '', - release_comment = '', - released_by = '', - is_emergency_publish = True, - gray_del_keys = [ - '' - ] - ) - else: - return NamespaceGrayDelReleaseDTO( - ) - """ - - def testNamespaceGrayDelReleaseDTO(self): - """Test NamespaceGrayDelReleaseDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_namespace_identifier.py b/python/test/test_namespace_identifier.py deleted file mode 100644 index 8c0ffd52..00000000 --- a/python/test/test_namespace_identifier.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.namespace_identifier import NamespaceIdentifier - -class TestNamespaceIdentifier(unittest.TestCase): - """NamespaceIdentifier unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> NamespaceIdentifier: - """Test NamespaceIdentifier - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `NamespaceIdentifier` - """ - model = NamespaceIdentifier() - if include_optional: - return NamespaceIdentifier( - app_id = '', - env = '', - cluster_name = '', - namespace_name = '' - ) - else: - return NamespaceIdentifier( - ) - """ - - def testNamespaceIdentifier(self): - """Test NamespaceIdentifier""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_namespace_management_api.py b/python/test/test_namespace_management_api.py deleted file mode 100644 index 3342232f..00000000 --- a/python/test/test_namespace_management_api.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.api.namespace_management_api import NamespaceManagementApi - - -class TestNamespaceManagementApi(unittest.TestCase): - """NamespaceManagementApi unit test stubs""" - - def setUp(self) -> None: - self.api = NamespaceManagementApi() - - def tearDown(self) -> None: - pass - - def test_openapi_v1_appnamespaces_get(self) -> None: - """Test case for openapi_v1_appnamespaces_get - - 获取所有公共AppNamespace - """ - pass - - def test_openapi_v1_apps_app_id_appnamespaces_get(self) -> None: - """Test case for openapi_v1_apps_app_id_appnamespaces_get - - 获取指定应用的AppNamespace - """ - pass - - def test_openapi_v1_apps_app_id_appnamespaces_namespace_name_get(self) -> None: - """Test case for openapi_v1_apps_app_id_appnamespaces_namespace_name_get - - 获取指定的AppNamespace - """ - pass - - def test_openapi_v1_apps_app_id_appnamespaces_post(self) -> None: - """Test case for openapi_v1_apps_app_id_appnamespaces_post - - 创建AppNamespace - """ - pass - - def test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get(self) -> None: - """Test case for openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get - - 检查缺失的Namespace - """ - pass - - def test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get(self) -> None: - """Test case for openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get - - 获取关联的公共Namespace - """ - pass - - def test_openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get(self) -> None: - """Test case for openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get - - 获取公共AppNamespace的所有实例 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get - - 获取指定集群下的所有Namespace - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get - - 获取Namespace的锁状态 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_namespace_release_dto.py b/python/test/test_namespace_release_dto.py deleted file mode 100644 index 99412524..00000000 --- a/python/test/test_namespace_release_dto.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.namespace_release_dto import NamespaceReleaseDTO - -class TestNamespaceReleaseDTO(unittest.TestCase): - """NamespaceReleaseDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> NamespaceReleaseDTO: - """Test NamespaceReleaseDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `NamespaceReleaseDTO` - """ - model = NamespaceReleaseDTO() - if include_optional: - return NamespaceReleaseDTO( - release_title = '', - release_comment = '', - released_by = '', - is_emergency_publish = True - ) - else: - return NamespaceReleaseDTO( - ) - """ - - def testNamespaceReleaseDTO(self): - """Test NamespaceReleaseDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_namespace_sync_model.py b/python/test/test_namespace_sync_model.py deleted file mode 100644 index 06d72003..00000000 --- a/python/test/test_namespace_sync_model.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.namespace_sync_model import NamespaceSyncModel - -class TestNamespaceSyncModel(unittest.TestCase): - """NamespaceSyncModel unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> NamespaceSyncModel: - """Test NamespaceSyncModel - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `NamespaceSyncModel` - """ - model = NamespaceSyncModel() - if include_optional: - return NamespaceSyncModel( - sync_to_namespaces = [ - apollo_openapi.models.namespace_identifier.NamespaceIdentifier( - app_id = '', - env = '', - cluster_name = '', - namespace_name = '', ) - ], - sync_items = [ - apollo_openapi.models.item_dto.ItemDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_by_display_name = '', - data_change_last_modified_by_display_name = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - namespace_id = 56, - key = '', - type = 56, - value = '', - comment = '', - line_num = 56, ) - ] - ) - else: - return NamespaceSyncModel( - ) - """ - - def testNamespaceSyncModel(self): - """Test NamespaceSyncModel""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_namespace_text_model.py b/python/test/test_namespace_text_model.py deleted file mode 100644 index 47507fcd..00000000 --- a/python/test/test_namespace_text_model.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.namespace_text_model import NamespaceTextModel - -class TestNamespaceTextModel(unittest.TestCase): - """NamespaceTextModel unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> NamespaceTextModel: - """Test NamespaceTextModel - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `NamespaceTextModel` - """ - model = NamespaceTextModel() - if include_optional: - return NamespaceTextModel( - app_id = '', - env = '', - cluster_name = '', - namespace_name = '', - namespace_id = 56, - format = '', - config_text = '', - operator = '' - ) - else: - return NamespaceTextModel( - ) - """ - - def testNamespaceTextModel(self): - """Test NamespaceTextModel""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_app_dto.py b/python/test/test_open_app_dto.py deleted file mode 100644 index 008c1913..00000000 --- a/python/test/test_open_app_dto.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_app_dto import OpenAppDTO - -class TestOpenAppDTO(unittest.TestCase): - """OpenAppDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenAppDTO: - """Test OpenAppDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenAppDTO` - """ - model = OpenAppDTO() - if include_optional: - return OpenAppDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - name = '', - app_id = '', - org_id = '', - org_name = '', - owner_name = '', - owner_email = '' - ) - else: - return OpenAppDTO( - ) - """ - - def testOpenAppDTO(self): - """Test OpenAppDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_app_namespace_dto.py b/python/test/test_open_app_namespace_dto.py deleted file mode 100644 index b7cf8485..00000000 --- a/python/test/test_open_app_namespace_dto.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_app_namespace_dto import OpenAppNamespaceDTO - -class TestOpenAppNamespaceDTO(unittest.TestCase): - """OpenAppNamespaceDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenAppNamespaceDTO: - """Test OpenAppNamespaceDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenAppNamespaceDTO` - """ - model = OpenAppNamespaceDTO() - if include_optional: - return OpenAppNamespaceDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - name = '', - app_id = '', - format = '', - is_public = True, - append_namespace_prefix = True, - comment = '' - ) - else: - return OpenAppNamespaceDTO( - ) - """ - - def testOpenAppNamespaceDTO(self): - """Test OpenAppNamespaceDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_cluster_dto.py b/python/test/test_open_cluster_dto.py deleted file mode 100644 index ff4ba36e..00000000 --- a/python/test/test_open_cluster_dto.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_cluster_dto import OpenClusterDTO - -class TestOpenClusterDTO(unittest.TestCase): - """OpenClusterDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenClusterDTO: - """Test OpenClusterDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenClusterDTO` - """ - model = OpenClusterDTO() - if include_optional: - return OpenClusterDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - name = '', - app_id = '' - ) - else: - return OpenClusterDTO( - ) - """ - - def testOpenClusterDTO(self): - """Test OpenClusterDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_create_app_dto.py b/python/test/test_open_create_app_dto.py deleted file mode 100644 index fc64d96c..00000000 --- a/python/test/test_open_create_app_dto.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_create_app_dto import OpenCreateAppDTO - -class TestOpenCreateAppDTO(unittest.TestCase): - """OpenCreateAppDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenCreateAppDTO: - """Test OpenCreateAppDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenCreateAppDTO` - """ - model = OpenCreateAppDTO() - if include_optional: - return OpenCreateAppDTO( - assign_app_role_to_self = True, - admins = [ - '' - ], - app = apollo_openapi.models.open_app_dto.OpenAppDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - name = '', - app_id = '', - org_id = '', - org_name = '', - owner_name = '', - owner_email = '', ) - ) - else: - return OpenCreateAppDTO( - ) - """ - - def testOpenCreateAppDTO(self): - """Test OpenCreateAppDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_env_cluster_dto.py b/python/test/test_open_env_cluster_dto.py deleted file mode 100644 index 5844f370..00000000 --- a/python/test/test_open_env_cluster_dto.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_env_cluster_dto import OpenEnvClusterDTO - -class TestOpenEnvClusterDTO(unittest.TestCase): - """OpenEnvClusterDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenEnvClusterDTO: - """Test OpenEnvClusterDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenEnvClusterDTO` - """ - model = OpenEnvClusterDTO() - if include_optional: - return OpenEnvClusterDTO( - env = '', - clusters = [ - '' - ] - ) - else: - return OpenEnvClusterDTO( - ) - """ - - def testOpenEnvClusterDTO(self): - """Test OpenEnvClusterDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_gray_release_rule_dto.py b/python/test/test_open_gray_release_rule_dto.py deleted file mode 100644 index 2be7d2a3..00000000 --- a/python/test/test_open_gray_release_rule_dto.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_gray_release_rule_dto import OpenGrayReleaseRuleDTO - -class TestOpenGrayReleaseRuleDTO(unittest.TestCase): - """OpenGrayReleaseRuleDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenGrayReleaseRuleDTO: - """Test OpenGrayReleaseRuleDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenGrayReleaseRuleDTO` - """ - model = OpenGrayReleaseRuleDTO() - if include_optional: - return OpenGrayReleaseRuleDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - app_id = '', - cluster_name = '', - namespace_name = '', - branch_name = '', - rule_items = [ - apollo_openapi.models.open_gray_release_rule_item_dto.OpenGrayReleaseRuleItemDTO( - client_app_id = '', - client_ip_list = [ - '' - ], - client_label_list = [ - '' - ], ) - ] - ) - else: - return OpenGrayReleaseRuleDTO( - ) - """ - - def testOpenGrayReleaseRuleDTO(self): - """Test OpenGrayReleaseRuleDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_gray_release_rule_item_dto.py b/python/test/test_open_gray_release_rule_item_dto.py deleted file mode 100644 index 9da9a5de..00000000 --- a/python/test/test_open_gray_release_rule_item_dto.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_gray_release_rule_item_dto import OpenGrayReleaseRuleItemDTO - -class TestOpenGrayReleaseRuleItemDTO(unittest.TestCase): - """OpenGrayReleaseRuleItemDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenGrayReleaseRuleItemDTO: - """Test OpenGrayReleaseRuleItemDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenGrayReleaseRuleItemDTO` - """ - model = OpenGrayReleaseRuleItemDTO() - if include_optional: - return OpenGrayReleaseRuleItemDTO( - client_app_id = '', - client_ip_list = [ - '' - ], - client_label_list = [ - '' - ] - ) - else: - return OpenGrayReleaseRuleItemDTO( - ) - """ - - def testOpenGrayReleaseRuleItemDTO(self): - """Test OpenGrayReleaseRuleItemDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_instance_config_dto.py b/python/test/test_open_instance_config_dto.py deleted file mode 100644 index d9ec1de0..00000000 --- a/python/test/test_open_instance_config_dto.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_instance_config_dto import OpenInstanceConfigDTO - -class TestOpenInstanceConfigDTO(unittest.TestCase): - """OpenInstanceConfigDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenInstanceConfigDTO: - """Test OpenInstanceConfigDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenInstanceConfigDTO` - """ - model = OpenInstanceConfigDTO() - if include_optional: - return OpenInstanceConfigDTO( - release = apollo_openapi.models.open_release_dto.OpenReleaseDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - app_id = '', - cluster_name = '', - namespace_name = '', - name = '', - configurations = apollo_openapi.models.map_string.MapString( - key = '', ), - comment = '', ), - release_delivery_time = '', - data_change_last_modified_time = '' - ) - else: - return OpenInstanceConfigDTO( - ) - """ - - def testOpenInstanceConfigDTO(self): - """Test OpenInstanceConfigDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_instance_dto.py b/python/test/test_open_instance_dto.py deleted file mode 100644 index 02ef2531..00000000 --- a/python/test/test_open_instance_dto.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_instance_dto import OpenInstanceDTO - -class TestOpenInstanceDTO(unittest.TestCase): - """OpenInstanceDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenInstanceDTO: - """Test OpenInstanceDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenInstanceDTO` - """ - model = OpenInstanceDTO() - if include_optional: - return OpenInstanceDTO( - id = 56, - app_id = '', - cluster_name = '', - data_center = '', - ip = '', - configs = [ - apollo_openapi.models.open_instance_config_dto.OpenInstanceConfigDTO( - release = apollo_openapi.models.open_release_dto.OpenReleaseDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - app_id = '', - cluster_name = '', - namespace_name = '', - name = '', - configurations = apollo_openapi.models.map_string.MapString( - key = '', ), - comment = '', ), - release_delivery_time = '', - data_change_last_modified_time = '', ) - ], - data_change_created_time = '' - ) - else: - return OpenInstanceDTO( - ) - """ - - def testOpenInstanceDTO(self): - """Test OpenInstanceDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_item_dto.py b/python/test/test_open_item_dto.py deleted file mode 100644 index da7889ef..00000000 --- a/python/test/test_open_item_dto.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_item_dto import OpenItemDTO - -class TestOpenItemDTO(unittest.TestCase): - """OpenItemDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenItemDTO: - """Test OpenItemDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenItemDTO` - """ - model = OpenItemDTO() - if include_optional: - return OpenItemDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - key = '', - type = 56, - value = '', - comment = '' - ) - else: - return OpenItemDTO( - ) - """ - - def testOpenItemDTO(self): - """Test OpenItemDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_namespace_dto.py b/python/test/test_open_namespace_dto.py deleted file mode 100644 index 66a6d862..00000000 --- a/python/test/test_open_namespace_dto.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO - -class TestOpenNamespaceDTO(unittest.TestCase): - """OpenNamespaceDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenNamespaceDTO: - """Test OpenNamespaceDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenNamespaceDTO` - """ - model = OpenNamespaceDTO() - if include_optional: - return OpenNamespaceDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - app_id = '', - cluster_name = '', - namespace_name = '', - comment = '', - format = '', - is_public = True, - items = [ - apollo_openapi.models.open_item_dto.OpenItemDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - key = '', - type = 56, - value = '', - comment = '', ) - ] - ) - else: - return OpenNamespaceDTO( - ) - """ - - def testOpenNamespaceDTO(self): - """Test OpenNamespaceDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_namespace_lock_dto.py b/python/test/test_open_namespace_lock_dto.py deleted file mode 100644 index efcaca3c..00000000 --- a/python/test/test_open_namespace_lock_dto.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_namespace_lock_dto import OpenNamespaceLockDTO - -class TestOpenNamespaceLockDTO(unittest.TestCase): - """OpenNamespaceLockDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenNamespaceLockDTO: - """Test OpenNamespaceLockDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenNamespaceLockDTO` - """ - model = OpenNamespaceLockDTO() - if include_optional: - return OpenNamespaceLockDTO( - namespace_name = '', - is_locked = True, - locked_by = '' - ) - else: - return OpenNamespaceLockDTO( - ) - """ - - def testOpenNamespaceLockDTO(self): - """Test OpenNamespaceLockDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_organization_dto.py b/python/test/test_open_organization_dto.py deleted file mode 100644 index ce9b8454..00000000 --- a/python/test/test_open_organization_dto.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_organization_dto import OpenOrganizationDto - -class TestOpenOrganizationDto(unittest.TestCase): - """OpenOrganizationDto unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenOrganizationDto: - """Test OpenOrganizationDto - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenOrganizationDto` - """ - model = OpenOrganizationDto() - if include_optional: - return OpenOrganizationDto( - org_id = '', - org_name = '' - ) - else: - return OpenOrganizationDto( - ) - """ - - def testOpenOrganizationDto(self): - """Test OpenOrganizationDto""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_page_dto_open_instance_dto.py b/python/test/test_open_page_dto_open_instance_dto.py deleted file mode 100644 index 91875c7b..00000000 --- a/python/test/test_open_page_dto_open_instance_dto.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO - -class TestOpenPageDTOOpenInstanceDTO(unittest.TestCase): - """OpenPageDTOOpenInstanceDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenPageDTOOpenInstanceDTO: - """Test OpenPageDTOOpenInstanceDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenPageDTOOpenInstanceDTO` - """ - model = OpenPageDTOOpenInstanceDTO() - if include_optional: - return OpenPageDTOOpenInstanceDTO( - page = 56, - size = 56, - total = 56, - content = [ - apollo_openapi.models.open_instance_dto.OpenInstanceDTO( - id = 56, - app_id = '', - cluster_name = '', - data_center = '', - ip = '', - configs = [ - apollo_openapi.models.open_instance_config_dto.OpenInstanceConfigDTO( - release = apollo_openapi.models.open_release_dto.OpenReleaseDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - app_id = '', - cluster_name = '', - namespace_name = '', - name = '', - configurations = apollo_openapi.models.map_string.MapString( - key = '', ), - comment = '', ), - release_delivery_time = '', - data_change_last_modified_time = '', ) - ], - data_change_created_time = '', ) - ] - ) - else: - return OpenPageDTOOpenInstanceDTO( - ) - """ - - def testOpenPageDTOOpenInstanceDTO(self): - """Test OpenPageDTOOpenInstanceDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_page_dto_open_item_dto.py b/python/test/test_open_page_dto_open_item_dto.py deleted file mode 100644 index ffbb3b90..00000000 --- a/python/test/test_open_page_dto_open_item_dto.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_page_dto_open_item_dto import OpenPageDTOOpenItemDTO - -class TestOpenPageDTOOpenItemDTO(unittest.TestCase): - """OpenPageDTOOpenItemDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenPageDTOOpenItemDTO: - """Test OpenPageDTOOpenItemDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenPageDTOOpenItemDTO` - """ - model = OpenPageDTOOpenItemDTO() - if include_optional: - return OpenPageDTOOpenItemDTO( - page = 56, - size = 56, - total = 56, - content = [ - apollo_openapi.models.open_item_dto.OpenItemDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - key = '', - type = 56, - value = '', - comment = '', ) - ] - ) - else: - return OpenPageDTOOpenItemDTO( - ) - """ - - def testOpenPageDTOOpenItemDTO(self): - """Test OpenPageDTOOpenItemDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_release_dto.py b/python/test/test_open_release_dto.py deleted file mode 100644 index 559c3740..00000000 --- a/python/test/test_open_release_dto.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_release_dto import OpenReleaseDTO - -class TestOpenReleaseDTO(unittest.TestCase): - """OpenReleaseDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenReleaseDTO: - """Test OpenReleaseDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenReleaseDTO` - """ - model = OpenReleaseDTO() - if include_optional: - return OpenReleaseDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - app_id = '', - cluster_name = '', - namespace_name = '', - name = '', - configurations = apollo_openapi.models.map_string.MapString( - key = '', ), - comment = '' - ) - else: - return OpenReleaseDTO( - ) - """ - - def testOpenReleaseDTO(self): - """Test OpenReleaseDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_openapi_v1_apps_get401_response.py b/python/test/test_openapi_v1_apps_get401_response.py deleted file mode 100644 index 2c1f427b..00000000 --- a/python/test/test_openapi_v1_apps_get401_response.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response - -class TestOpenapiV1AppsGet401Response(unittest.TestCase): - """OpenapiV1AppsGet401Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenapiV1AppsGet401Response: - """Test OpenapiV1AppsGet401Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenapiV1AppsGet401Response` - """ - model = OpenapiV1AppsGet401Response() - if include_optional: - return OpenapiV1AppsGet401Response( - message = '' - ) - else: - return OpenapiV1AppsGet401Response( - ) - """ - - def testOpenapiV1AppsGet401Response(self): - """Test OpenapiV1AppsGet401Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_openapi_v1_apps_post400_response.py b/python/test/test_openapi_v1_apps_post400_response.py deleted file mode 100644 index 2a253630..00000000 --- a/python/test/test_openapi_v1_apps_post400_response.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.openapi_v1_apps_post400_response import OpenapiV1AppsPost400Response - -class TestOpenapiV1AppsPost400Response(unittest.TestCase): - """OpenapiV1AppsPost400Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenapiV1AppsPost400Response: - """Test OpenapiV1AppsPost400Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenapiV1AppsPost400Response` - """ - model = OpenapiV1AppsPost400Response() - if include_optional: - return OpenapiV1AppsPost400Response( - message = '', - exception = '' - ) - else: - return OpenapiV1AppsPost400Response( - ) - """ - - def testOpenapiV1AppsPost400Response(self): - """Test OpenapiV1AppsPost400Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_openapi_v1_apps_post_request.py b/python/test/test_openapi_v1_apps_post_request.py deleted file mode 100644 index 0188badd..00000000 --- a/python/test/test_openapi_v1_apps_post_request.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.openapi_v1_apps_post_request import OpenapiV1AppsPostRequest - -class TestOpenapiV1AppsPostRequest(unittest.TestCase): - """OpenapiV1AppsPostRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenapiV1AppsPostRequest: - """Test OpenapiV1AppsPostRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenapiV1AppsPostRequest` - """ - model = OpenapiV1AppsPostRequest() - if include_optional: - return OpenapiV1AppsPostRequest( - app = apollo_openapi.models.open_app_dto.OpenAppDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - name = '', - app_id = '', - org_id = '', - org_name = '', - owner_name = '', - owner_email = '', ), - assign_app_role_to_self = True, - admins = [ - '' - ] - ) - else: - return OpenapiV1AppsPostRequest( - app = apollo_openapi.models.open_app_dto.OpenAppDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - name = '', - app_id = '', - org_id = '', - org_name = '', - owner_name = '', - owner_email = '', ), - assign_app_role_to_self = True, - admins = [ - '' - ], - ) - """ - - def testOpenapiV1AppsPostRequest(self): - """Test OpenapiV1AppsPostRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response.py b/python/test/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response.py deleted file mode 100644 index 66e75ab7..00000000 --- a/python/test/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - -class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response(unittest.TestCase): - """OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response: - """Test OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response` - """ - model = OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response() - if include_optional: - return OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response( - valid = True, - message = '' - ) - else: - return OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response( - ) - """ - - def testOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response(self): - """Test OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response.py b/python/test/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response.py deleted file mode 100644 index e6f7ef35..00000000 --- a/python/test/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - -class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response(unittest.TestCase): - """OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response: - """Test OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response` - """ - model = OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response() - if include_optional: - return OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response( - valid = True, - message = '', - errors = [ - '' - ] - ) - else: - return OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response( - ) - """ - - def testOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response(self): - """Test OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_openapi_v1_envs_env_releases_compare_get200_response.py b/python/test/test_openapi_v1_envs_env_releases_compare_get200_response.py deleted file mode 100644 index d1b4b63a..00000000 --- a/python/test/test_openapi_v1_envs_env_releases_compare_get200_response.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.openapi_v1_envs_env_releases_compare_get200_response import OpenapiV1EnvsEnvReleasesCompareGet200Response - -class TestOpenapiV1EnvsEnvReleasesCompareGet200Response(unittest.TestCase): - """OpenapiV1EnvsEnvReleasesCompareGet200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenapiV1EnvsEnvReleasesCompareGet200Response: - """Test OpenapiV1EnvsEnvReleasesCompareGet200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenapiV1EnvsEnvReleasesCompareGet200Response` - """ - model = OpenapiV1EnvsEnvReleasesCompareGet200Response() - if include_optional: - return OpenapiV1EnvsEnvReleasesCompareGet200Response( - changes = [ - apollo_openapi.models.change.Change( - type = 'ADDED', - entity = apollo_openapi.models.entity_pair_kv_entity.EntityPairKVEntity( - first_entity = apollo_openapi.models.kv_entity.KVEntity( - key = '', - value = '', ), - second_entity = apollo_openapi.models.kv_entity.KVEntity( - key = '', - value = '', ), ), ) - ] - ) - else: - return OpenapiV1EnvsEnvReleasesCompareGet200Response( - ) - """ - - def testOpenapiV1EnvsEnvReleasesCompareGet200Response(self): - """Test OpenapiV1EnvsEnvReleasesCompareGet200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_organization_management_api.py b/python/test/test_organization_management_api.py deleted file mode 100644 index 4000efec..00000000 --- a/python/test/test_organization_management_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.api.organization_management_api import OrganizationManagementApi - - -class TestOrganizationManagementApi(unittest.TestCase): - """OrganizationManagementApi unit test stubs""" - - def setUp(self) -> None: - self.api = OrganizationManagementApi() - - def tearDown(self) -> None: - pass - - def test_openapi_v1_organizations_get(self) -> None: - """Test case for openapi_v1_organizations_get - - 获取所有组织信息 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/__init__.py b/python/test/test_paths/__init__.py new file mode 100644 index 00000000..1309632d --- /dev/null +++ b/python/test/test_paths/__init__.py @@ -0,0 +1,68 @@ +import json +import typing + +import urllib3 +from urllib3._collections import HTTPHeaderDict + + +class ApiTestMixin: + json_content_type = 'application/json' + user_agent = 'OpenAPI-Generator/1.0.0/python' + + @classmethod + def assert_pool_manager_request_called_with( + cls, + mock_request, + url: str, + method: str = 'POST', + body: typing.Optional[bytes] = None, + content_type: typing.Optional[str] = None, + accept_content_type: typing.Optional[str] = None, + stream: bool = False, + ): + headers = { + 'User-Agent': cls.user_agent + } + if accept_content_type: + headers['Accept'] = accept_content_type + if content_type: + headers['Content-Type'] = content_type + kwargs = dict( + headers=HTTPHeaderDict(headers), + preload_content=not stream, + timeout=None, + ) + if content_type and method != 'GET': + kwargs['body'] = body + mock_request.assert_called_with( + method, + url, + **kwargs + ) + + @staticmethod + def headers_for_content_type(content_type: str) -> typing.Dict[str, str]: + return {'content-type': content_type} + + @classmethod + def response( + cls, + body: typing.Union[str, bytes], + status: int = 200, + content_type: str = json_content_type, + headers: typing.Optional[typing.Dict[str, str]] = None, + preload_content: bool = True + ) -> urllib3.HTTPResponse: + if headers is None: + headers = {} + headers.update(cls.headers_for_content_type(content_type)) + return urllib3.HTTPResponse( + body, + headers=headers, + status=status, + preload_content=preload_content + ) + + @staticmethod + def json_bytes(in_data: typing.Any) -> bytes: + return json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode('utf-8') diff --git a/python/test/test_paths/test_openapi_v1_appnamespaces/__init__.py b/python/test/test_paths/test_openapi_v1_appnamespaces/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_appnamespaces/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_appnamespaces/test_get.py b/python/test/test_paths/test_openapi_v1_appnamespaces/test_get.py new file mode 100644 index 00000000..99284f91 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_appnamespaces/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_appnamespaces import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1Appnamespaces(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1Appnamespaces unit test stubs + 获取所有公共AppNamespace (new added) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps/__init__.py b/python/test/test_paths/test_openapi_v1_apps/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_apps/test_get.py b/python/test/test_paths/test_openapi_v1_apps/test_get.py new file mode 100644 index 00000000..5463c37e --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_apps import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1Apps(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1Apps unit test stubs + 查找应用 (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps/test_post.py b/python/test/test_paths/test_openapi_v1_apps/test_post.py new file mode 100644 index 00000000..9a4aab84 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps/test_post.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_apps import post # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1Apps(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1Apps unit test stubs + 创建应用 (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_app_id/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id/test_delete.py b/python/test/test_paths/test_openapi_v1_apps_app_id/test_delete.py new file mode 100644 index 00000000..9a11db92 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_app_id/test_delete.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_apps_app_id import delete # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1AppsAppId(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1AppsAppId unit test stubs + 删除应用(new added) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id/test_get.py new file mode 100644 index 00000000..60120fa9 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_app_id/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_apps_app_id import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1AppsAppId(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1AppsAppId 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_apps_app_id/test_put.py b/python/test/test_paths/test_openapi_v1_apps_app_id/test_put.py new file mode 100644 index 00000000..fe013b11 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_app_id/test_put.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_apps_app_id import put # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1AppsAppId(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1AppsAppId unit test stubs + 更新应用(new added) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces/test_get.py new file mode 100644 index 00000000..c3b1a303 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1AppsAppIdAppnamespaces(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1AppsAppIdAppnamespaces unit test stubs + 获取指定应用的AppNamespace (new added) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces/test_post.py b/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces/test_post.py new file mode 100644 index 00000000..b5f8f450 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces/test_post.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces import post # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1AppsAppIdAppnamespaces(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1AppsAppIdAppnamespaces unit test stubs + 创建AppNamespace (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name/test_delete.py b/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name/test_delete.py new file mode 100644 index 00000000..ed2c8c88 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name/test_delete.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces_namespace_name import delete # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1AppsAppIdAppnamespacesNamespaceName(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1AppsAppIdAppnamespacesNamespaceName unit test stubs + 删除AppNamespace (new added) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name/test_get.py new file mode 100644 index 00000000..9ccb594f --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces_namespace_name import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1AppsAppIdAppnamespacesNamespaceName(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1AppsAppIdAppnamespacesNamespaceName unit test stubs + 获取指定的AppNamespace (new added) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envclusters/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envclusters/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_app_id_envclusters/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envclusters/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envclusters/test_get.py new file mode 100644 index 00000000..22f09110 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_app_id_envclusters/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_apps_app_id_envclusters import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1AppsAppIdEnvclusters(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1AppsAppIdEnvclusters unit test stubs + 获取应用的环境集群信息 (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/test_get.py new file mode 100644 index 00000000..d7335235 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheck(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheck unit test stubs + 检查缺失的Namespace (new added) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/test_delete.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/test_delete.py new file mode 100644 index 00000000..def4cdbd --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/test_delete.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links import delete # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinks(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinks unit test stubs + 删除关联的Namespace (new added) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/test_get.py new file mode 100644 index 00000000..1358a2f6 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociation(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociation unit test stubs + 获取关联的公共Namespace (new added) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_miss_envs/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_miss_envs/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_app_id_miss_envs/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_miss_envs/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id_miss_envs/test_get.py new file mode 100644 index 00000000..85665d5d --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_app_id_miss_envs/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_apps_app_id_miss_envs import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1AppsAppIdMissEnvs(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1AppsAppIdMissEnvs 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_apps_app_id_namespaces_releases_status/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_releases_status/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_releases_status/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_releases_status/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_releases_status/test_get.py new file mode 100644 index 00000000..c2ded84a --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_releases_status/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_apps_app_id_namespaces_releases_status import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1AppsAppIdNamespacesReleasesStatus(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1AppsAppIdNamespacesReleasesStatus unit test stubs + 获取应用下所有Namespace的发布状态 (new added) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_navtree/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_navtree/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_app_id_navtree/__init__.py @@ -0,0 +1 @@ + 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_navtree/test_get.py new file mode 100644 index 00000000..1071c95f --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_app_id_navtree/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_apps_app_id_navtree import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1AppsAppIdNavtree(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1AppsAppIdNavtree 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_apps_authorized/__init__.py b/python/test/test_paths/test_openapi_v1_apps_authorized/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_authorized/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_apps_authorized/test_get.py b/python/test/test_paths/test_openapi_v1_apps_authorized/test_get.py new file mode 100644 index 00000000..f54e451a --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_authorized/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_apps_authorized import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1AppsAuthorized(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1AppsAuthorized unit test stubs + 获取当前Consumer授权的应用列表 (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_by_self/__init__.py b/python/test/test_paths/test_openapi_v1_apps_by_self/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_by_self/__init__.py @@ -0,0 +1 @@ + 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 new file mode 100644 index 00000000..e665891b --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_by_self/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_apps_by_self import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1AppsBySelf(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1AppsBySelf unit test stubs + 获取当前Consumer的应用列表(分页)(new added) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_envs_env/__init__.py b/python/test/test_paths/test_openapi_v1_apps_envs_env/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_envs_env/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_apps_envs_env/test_post.py b/python/test/test_paths/test_openapi_v1_apps_envs_env/test_post.py new file mode 100644 index 00000000..2898b271 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_envs_env/test_post.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_apps_envs_env import post # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1AppsEnvsEnv(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1AppsEnvsEnv unit test stubs + 在指定环境创建应用(new added) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/test_get.py new file mode 100644 index 00000000..056069bd --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/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_appnamespaces_public_namespace_name_instances import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstances(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstances unit test stubs + 获取公共AppNamespace的所有实例 (new added) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters/test_post.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters/test_post.py new file mode 100644 index 00000000..d8bcbe3f --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters/test_post.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters import post # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClusters(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClusters unit test stubs + 创建集群 (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name/test_delete.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name/test_delete.py new file mode 100644 index 00000000..788a76a8 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name/test_delete.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name import delete # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterName(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterName unit test stubs + 删除集群 (new added) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name/test_get.py new file mode 100644 index 00000000..3326b47e --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterName(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterName unit test stubs + 获取指定集群信息 (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/test_get.py new file mode 100644 index 00000000..0335e903 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespaces(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespaces unit test stubs + 获取指定集群下的所有Namespace (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/test_get.py new file mode 100644 index 00000000..1051f60e --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceName(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceName unit test stubs + 获取指定的Namespace (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/test_get.py new file mode 100644 index 00000000..d32df6ed --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranches(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranches unit test stubs + 获取命名空间分支信息 (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/test_post.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/test_post.py new file mode 100644 index 00000000..9f2c988a --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/test_post.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches import post # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranches(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranches unit test stubs + 创建命名空间分支 (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/test_delete.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/test_delete.py new file mode 100644 index 00000000..a4257cd8 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/test_delete.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name import delete # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchName(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchName unit test stubs + 删除命名空间分支 (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/test_patch.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/test_patch.py new file mode 100644 index 00000000..51bb8776 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/test_patch.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name import patch # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchName(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchName unit test stubs + 合并分支到主分支 (new added) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = patch.ApiForpatch(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases/test_post.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases/test_post.py new file mode 100644 index 00000000..58658d22 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases/test_post.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases import post # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleases(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleases unit test stubs + 创建灰度删除发布 (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items/test_get.py new file mode 100644 index 00000000..145aefd1 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItems(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItems 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_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge/test_post.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge/test_post.py new file mode 100644 index 00000000..fc36e060 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge/test_post.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge import post # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMerge(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMerge unit test stubs + 合并分支 (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases/test_post.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases/test_post.py new file mode 100644 index 00000000..7efa4ce3 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases/test_post.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases import post # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleases(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleases unit test stubs + 创建灰度发布 (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/test_get.py new file mode 100644 index 00000000..c4f12162 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameRules(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameRules unit test stubs + 获取分支灰度发布规则 (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/test_put.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/test_put.py new file mode 100644 index 00000000..6ba56e3a --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/test_put.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules import put # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameRules(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameRules unit test stubs + 更新分支灰度发布规则 (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/test_delete.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/test_delete.py new file mode 100644 index 00000000..b3e9c574 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/test_delete.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key import delete # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKey(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKey unit test stubs + 通过编码的key删除配置项 (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/test_get.py new file mode 100644 index 00000000..4a700c49 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKey(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKey unit test stubs + 通过查询参数获取配置项(支持编码的key) (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/test_put.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/test_put.py new file mode 100644 index 00000000..394237ad --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/test_put.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key import put # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKey(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKey unit test stubs + 通过编码的key更新配置项 (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/test_get.py new file mode 100644 index 00000000..c9ce280e --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstances(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstances unit test stubs + 获取命名空间下的实例数量 (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/test_get.py new file mode 100644 index 00000000..c1b19009 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotInt(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotInt unit test stubs + 查询不在指定发布版本中的实例 (new added) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/test_get.py new file mode 100644 index 00000000..37c2020b --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItems(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItems unit test stubs + 获取命名空间下的配置项列表 (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/test_post.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/test_post.py new file mode 100644 index 00000000..d6e3a8aa --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/test_post.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items import post # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItems(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItems unit test stubs + 创建新的配置项 (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/test_put.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/test_put.py new file mode 100644 index 00000000..c1670706 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/test_put.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update import put # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdate(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdate unit test stubs + 通过文本批量修改配置项 (new added) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/test_post.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/test_post.py new file mode 100644 index 00000000..9a8afe53 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/test_post.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare import post # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsCompare(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsCompare unit test stubs + 对比命名空间配置差异 (new added) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/test_delete.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/test_delete.py new file mode 100644 index 00000000..51c9a650 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/test_delete.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key import delete # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKey(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKey unit test stubs + 删除配置项 (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/test_get.py new file mode 100644 index 00000000..523e1e6c --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKey(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKey unit test stubs + 获取单个配置项 (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/test_put.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/test_put.py new file mode 100644 index 00000000..227c3694 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/test_put.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key import put # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKey(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKey unit test stubs + 更新配置项 (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/test_post.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/test_post.py new file mode 100644 index 00000000..28f9aadc --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/test_post.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert import post # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevert(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevert unit test stubs + 撤销配置项更改 (new added) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/test_post.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/test_post.py new file mode 100644 index 00000000..8b65517c --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/test_post.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync import post # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSync(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSync unit test stubs + 同步配置项到多个命名空间 (new added) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/test_post.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/test_post.py new file mode 100644 index 00000000..cc1ba746 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/test_post.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate import post # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidate(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidate unit test stubs + 验证配置文本语法 (new added) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/test_get.py new file mode 100644 index 00000000..4715c718 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLock(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLock unit test stubs + 获取Namespace的锁状态 (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/test_post.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/test_post.py new file mode 100644 index 00000000..55b32bf7 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/test_post.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases import post # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleases(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleases unit test stubs + 创建发布 (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active/test_get.py new file mode 100644 index 00000000..e1b3342e --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActive(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActive 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_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all/test_get.py new file mode 100644 index 00000000..4dd19ff6 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAll(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAll 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_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/test_get.py new file mode 100644 index 00000000..e7f99039 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatest(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatest unit test stubs + 获取最新活跃发布 (original openapi) # 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_releases_release_id/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_releases_release_id/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_releases_release_id/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_releases_release_id/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_releases_release_id/test_get.py new file mode 100644 index 00000000..b229feb5 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_releases_release_id/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_releases_release_id import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvReleasesReleaseId(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvReleasesReleaseId 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_releases_release_id_instances/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_releases_release_id_instances/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_releases_release_id_instances/__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_releases_release_id_instances/test_get.py new file mode 100644 index 00000000..74ea0b02 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_releases_release_id_instances/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_releases_release_id_instances import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvReleasesReleaseIdInstances(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvReleasesReleaseIdInstances 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_releases_release_id_rollback/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_releases_release_id_rollback/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_releases_release_id_rollback/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_releases_release_id_rollback/test_put.py b/python/test/test_paths/test_openapi_v1_envs_env_releases_release_id_rollback/test_put.py new file mode 100644 index 00000000..f2a5f0eb --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_releases_release_id_rollback/test_put.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_releases_release_id_rollback import put # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvReleasesReleaseIdRollback(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvReleasesReleaseIdRollback unit test stubs + 回滚发布 (original openapi) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = put.ApiForput(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_organizations/__init__.py b/python/test/test_paths/test_openapi_v1_organizations/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_organizations/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_organizations/test_get.py b/python/test/test_paths/test_openapi_v1_organizations/test_get.py new file mode 100644 index 00000000..4789f9ac --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_organizations/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_organizations import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1Organizations(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1Organizations unit test stubs + 获取所有组织信息 (original openapi) # 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_release_dto.py b/python/test/test_release_dto.py deleted file mode 100644 index 25eb899c..00000000 --- a/python/test/test_release_dto.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.release_dto import ReleaseDTO - -class TestReleaseDTO(unittest.TestCase): - """ReleaseDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ReleaseDTO: - """Test ReleaseDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ReleaseDTO` - """ - model = ReleaseDTO() - if include_optional: - return ReleaseDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_by_display_name = '', - data_change_last_modified_by_display_name = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - release_key = '', - name = '', - app_id = '', - cluster_name = '', - namespace_name = '', - configurations = '', - comment = '', - is_abandoned = True - ) - else: - return ReleaseDTO( - ) - """ - - def testReleaseDTO(self): - """Test ReleaseDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_release_management_api.py b/python/test/test_release_management_api.py deleted file mode 100644 index 04d37315..00000000 --- a/python/test/test_release_management_api.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.api.release_management_api import ReleaseManagementApi - - -class TestReleaseManagementApi(unittest.TestCase): - """ReleaseManagementApi unit test stubs""" - - def setUp(self) -> None: - self.api = ReleaseManagementApi() - - def tearDown(self) -> None: - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get - - 获取活跃发布(分页) - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get - - 获取所有发布(分页) - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get - - 获取最新活跃发布 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post - - 创建发布 - """ - pass - - def test_openapi_v1_envs_env_releases_compare_get(self) -> None: - """Test case for openapi_v1_envs_env_releases_compare_get - - 对比发布 - """ - pass - - def test_openapi_v1_envs_env_releases_release_id_get(self) -> None: - """Test case for openapi_v1_envs_env_releases_release_id_get - - 获取发布详情 - """ - pass - - def test_openapi_v1_envs_env_releases_release_id_rollback_put(self) -> None: - """Test case for openapi_v1_envs_env_releases_release_id_rollback_put - - 回滚发布 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/tox.ini b/python/tox.ini index 6e500b62..730c4005 100644 --- a/python/tox.ini +++ b/python/tox.ini @@ -1,7 +1,8 @@ [tox] -envlist = py3 +envlist = py37 [testenv] +passenv = PYTHON_VERSION deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt diff --git a/rust/.openapi-generator/FILES b/rust/.openapi-generator/FILES index 5907ccc0..1942bd26 100644 --- a/rust/.openapi-generator/FILES +++ b/rust/.openapi-generator/FILES @@ -3,84 +3,64 @@ .travis.yml Cargo.toml README.md -docs/Change.md -docs/ClusterDto.md -docs/EntityPairKvEntity.md -docs/EnvClusterInfo.md -docs/ItemChangeSets.md -docs/ItemDto.md docs/KvEntity.md -docs/ListItemDiffs.md -docs/ListReleaseBo.md -docs/MapString.md +docs/MultiResponseEntity.md docs/NamespaceGrayDelReleaseDto.md -docs/NamespaceIdentifier.md docs/NamespaceReleaseDto.md -docs/NamespaceSyncModel.md -docs/NamespaceTextModel.md docs/OpenAppDto.md docs/OpenAppNamespaceDto.md docs/OpenClusterDto.md docs/OpenCreateAppDto.md docs/OpenEnvClusterDto.md +docs/OpenEnvClusterInfo.md docs/OpenGrayReleaseRuleDto.md docs/OpenGrayReleaseRuleItemDto.md docs/OpenInstanceConfigDto.md docs/OpenInstanceDto.md +docs/OpenItemChangeSets.md +docs/OpenItemDiffs.md docs/OpenItemDto.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/OpenapiV1AppsGet401Response.md -docs/OpenapiV1AppsPost400Response.md -docs/OpenapiV1AppsPostRequest.md -docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md -docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md -docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md -docs/ReleaseDto.md +docs/RichResponseEntity.md git_push.sh src/apis/configuration.rs src/apis/mod.rs src/lib.rs -src/models/_openapi_v1_apps_get_401_response.rs -src/models/_openapi_v1_apps_post_400_response.rs -src/models/_openapi_v1_apps_post_request.rs -src/models/_openapi_v1_envs__env__apps__app_id__clusters__cluster_name__namespaces__namespace_name__items_validate_post_200_response.rs -src/models/_openapi_v1_envs__env__apps__app_id__clusters__cluster_name__namespaces__namespace_name__items_validate_post_400_response.rs -src/models/_openapi_v1_envs__env__releases_compare_get_200_response.rs -src/models/change.rs -src/models/cluster_dto.rs -src/models/entity_pair_kv_entity.rs -src/models/env_cluster_info.rs -src/models/item_change_sets.rs -src/models/item_dto.rs src/models/kv_entity.rs -src/models/list_item_diffs.rs -src/models/list_release_bo.rs -src/models/map_string.rs src/models/mod.rs +src/models/multi_response_entity.rs src/models/namespace_gray_del_release_dto.rs -src/models/namespace_identifier.rs src/models/namespace_release_dto.rs -src/models/namespace_sync_model.rs -src/models/namespace_text_model.rs src/models/open_app_dto.rs src/models/open_app_namespace_dto.rs src/models/open_cluster_dto.rs src/models/open_create_app_dto.rs src/models/open_env_cluster_dto.rs +src/models/open_env_cluster_info.rs src/models/open_gray_release_rule_dto.rs src/models/open_gray_release_rule_item_dto.rs src/models/open_instance_config_dto.rs src/models/open_instance_dto.rs +src/models/open_item_change_sets.rs +src/models/open_item_diffs.rs src/models/open_item_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/release_dto.rs +src/models/rich_response_entity.rs diff --git a/rust/.openapi-generator/VERSION b/rust/.openapi-generator/VERSION index 368fd8fd..826f5ce0 100644 --- a/rust/.openapi-generator/VERSION +++ b/rust/.openapi-generator/VERSION @@ -1 +1 @@ -7.15.0 +6.6.0 diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 9743d4f5..a2985e22 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -2,14 +2,17 @@ name = "apollo-openapi" version = "0.0.1" authors = ["OpenAPI Generator team and contributors"] -description = "Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` " +description = "

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
" # Override this license by providing a License Object in the OpenAPI. license = "Unlicense" -edition = "2021" +edition = "2018" [dependencies] -serde = { version = "^1.0", features = ["derive"] } +serde = "^1.0" +serde_derive = "^1.0" serde_json = "^1.0" -serde_repr = "^0.1" -url = "^2.5" -reqwest = { version = "^0.12", default-features = false, features = ["json", "multipart"] } +url = "^2.2" +uuid = { version = "^1.0", features = ["serde"] } +[dependencies.reqwest] +version = "^0.11" +features = ["json", "multipart"] diff --git a/rust/README.md b/rust/README.md index 471067fe..be1548fb 100644 --- a/rust/README.md +++ b/rust/README.md @@ -1,33 +1,20 @@ # Rust API client for apollo-openapi -Apollo配置中心OpenAPI接口文档 +

Apollo配置中心OpenAPI接口文档

-## 认证方式 +

认证方式

+

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

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

获取 Token 的方式:

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

使用示例

+
curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\
+-H \"Authorization: your_token_here\"
@@ -37,7 +24,6 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: 0.0.1 -- Generator version: 7.15.0 - Build package: `org.openapitools.codegen.languages.RustClientCodegen` ## Installation @@ -58,44 +44,34 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [Change](docs/Change.md) - - [ClusterDto](docs/ClusterDto.md) - - [EntityPairKvEntity](docs/EntityPairKvEntity.md) - - [EnvClusterInfo](docs/EnvClusterInfo.md) - - [ItemChangeSets](docs/ItemChangeSets.md) - - [ItemDto](docs/ItemDto.md) - [KvEntity](docs/KvEntity.md) - - [ListItemDiffs](docs/ListItemDiffs.md) - - [ListReleaseBo](docs/ListReleaseBo.md) - - [MapString](docs/MapString.md) + - [MultiResponseEntity](docs/MultiResponseEntity.md) - [NamespaceGrayDelReleaseDto](docs/NamespaceGrayDelReleaseDto.md) - - [NamespaceIdentifier](docs/NamespaceIdentifier.md) - [NamespaceReleaseDto](docs/NamespaceReleaseDto.md) - - [NamespaceSyncModel](docs/NamespaceSyncModel.md) - - [NamespaceTextModel](docs/NamespaceTextModel.md) - [OpenAppDto](docs/OpenAppDto.md) - [OpenAppNamespaceDto](docs/OpenAppNamespaceDto.md) - [OpenClusterDto](docs/OpenClusterDto.md) - [OpenCreateAppDto](docs/OpenCreateAppDto.md) - [OpenEnvClusterDto](docs/OpenEnvClusterDto.md) + - [OpenEnvClusterInfo](docs/OpenEnvClusterInfo.md) - [OpenGrayReleaseRuleDto](docs/OpenGrayReleaseRuleDto.md) - [OpenGrayReleaseRuleItemDto](docs/OpenGrayReleaseRuleItemDto.md) - [OpenInstanceConfigDto](docs/OpenInstanceConfigDto.md) - [OpenInstanceDto](docs/OpenInstanceDto.md) + - [OpenItemChangeSets](docs/OpenItemChangeSets.md) + - [OpenItemDiffs](docs/OpenItemDiffs.md) - [OpenItemDto](docs/OpenItemDto.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) - - [OpenapiV1AppsGet401Response](docs/OpenapiV1AppsGet401Response.md) - - [OpenapiV1AppsPost400Response](docs/OpenapiV1AppsPost400Response.md) - - [OpenapiV1AppsPostRequest](docs/OpenapiV1AppsPostRequest.md) - - [OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response](docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md) - - [OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response](docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md) - - [OpenapiV1EnvsEnvReleasesCompareGet200Response](docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md) - - [ReleaseDto](docs/ReleaseDto.md) + - [RichResponseEntity](docs/RichResponseEntity.md) To get access to the crate's generated documentation, use: @@ -105,5 +81,3 @@ cargo doc --open ``` ## Author - - diff --git a/rust/docs/ClusterDto.md b/rust/docs/ClusterDto.md deleted file mode 100644 index 6a04f18e..00000000 --- a/rust/docs/ClusterDto.md +++ /dev/null @@ -1,21 +0,0 @@ -# ClusterDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | Option<**String**> | | [optional] -**data_change_last_modified_by** | Option<**String**> | | [optional] -**data_change_created_by_display_name** | Option<**String**> | | [optional] -**data_change_last_modified_by_display_name** | Option<**String**> | | [optional] -**data_change_created_time** | Option<**String**> | | [optional] -**data_change_last_modified_time** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**name** | **String** | | -**app_id** | **String** | | -**parent_cluster_id** | Option<**i64**> | | [optional] -**comment** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/ItemChangeSets.md b/rust/docs/ItemChangeSets.md deleted file mode 100644 index db6d141b..00000000 --- a/rust/docs/ItemChangeSets.md +++ /dev/null @@ -1,19 +0,0 @@ -# ItemChangeSets - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | Option<**String**> | | [optional] -**data_change_last_modified_by** | Option<**String**> | | [optional] -**data_change_created_by_display_name** | Option<**String**> | | [optional] -**data_change_last_modified_by_display_name** | Option<**String**> | | [optional] -**data_change_created_time** | Option<**String**> | | [optional] -**data_change_last_modified_time** | Option<**String**> | | [optional] -**create_items** | Option<[**Vec**](ItemDTO.md)> | | [optional][default to []] -**update_items** | Option<[**Vec**](ItemDTO.md)> | | [optional][default to []] -**delete_items** | Option<[**Vec**](ItemDTO.md)> | | [optional][default to []] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/ItemDto.md b/rust/docs/ItemDto.md deleted file mode 100644 index df54eeac..00000000 --- a/rust/docs/ItemDto.md +++ /dev/null @@ -1,23 +0,0 @@ -# ItemDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | Option<**String**> | | [optional] -**data_change_last_modified_by** | Option<**String**> | | [optional] -**data_change_created_by_display_name** | Option<**String**> | | [optional] -**data_change_last_modified_by_display_name** | Option<**String**> | | [optional] -**data_change_created_time** | Option<**String**> | | [optional] -**data_change_last_modified_time** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**namespace_id** | Option<**i64**> | | [optional] -**key** | Option<**String**> | | [optional] -**r#type** | Option<**i32**> | | [optional] -**value** | Option<**String**> | | [optional] -**comment** | Option<**String**> | | [optional] -**line_num** | Option<**i32**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/KvEntity.md b/rust/docs/KvEntity.md index 087f88e9..9de29ca0 100644 --- a/rust/docs/KvEntity.md +++ b/rust/docs/KvEntity.md @@ -4,9 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**key** | Option<**String**> | | [optional] -**value** | Option<**String**> | | [optional] +**key** | Option<**String**> | 键 | [optional] +**value** | Option<**String**> | 值 | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/ListItemDiffs.md b/rust/docs/ListItemDiffs.md deleted file mode 100644 index 3e318b20..00000000 --- a/rust/docs/ListItemDiffs.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListItemDiffs - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**namespace** | Option<[**models::NamespaceIdentifier**](NamespaceIdentifier.md)> | | [optional] -**diffs** | Option<[**models::ItemChangeSets**](ItemChangeSets.md)> | | [optional] -**ext_info** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/MapString.md b/rust/docs/MapString.md deleted file mode 100644 index 449bcab9..00000000 --- a/rust/docs/MapString.md +++ /dev/null @@ -1,11 +0,0 @@ -# MapString - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/ListReleaseBo.md b/rust/docs/MultiResponseEntity.md similarity index 59% rename from rust/docs/ListReleaseBo.md rename to rust/docs/MultiResponseEntity.md index ce231a65..cefeab59 100644 --- a/rust/docs/ListReleaseBo.md +++ b/rust/docs/MultiResponseEntity.md @@ -1,12 +1,10 @@ -# ListReleaseBo +# MultiResponseEntity ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**base_info** | Option<[**models::ReleaseDto**](ReleaseDTO.md)> | | [optional] -**items** | Option<[**Vec**](KVEntity.md)> | | [optional] +**code** | **i32** | Overall HTTP status code | +**entities** | [**Vec**](RichResponseEntity.md) | List of rich response entities | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/NamespaceGrayDelReleaseDto.md b/rust/docs/NamespaceGrayDelReleaseDto.md index 079e494f..55a68b3d 100644 --- a/rust/docs/NamespaceGrayDelReleaseDto.md +++ b/rust/docs/NamespaceGrayDelReleaseDto.md @@ -11,5 +11,3 @@ Name | Type | Description | Notes **gray_del_keys** | Option<**Vec**> | 需要在灰度发布中删除的配置项键名列表 | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/NamespaceIdentifier.md b/rust/docs/NamespaceIdentifier.md deleted file mode 100644 index 5bf8b4b5..00000000 --- a/rust/docs/NamespaceIdentifier.md +++ /dev/null @@ -1,14 +0,0 @@ -# NamespaceIdentifier - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**app_id** | Option<**String**> | | [optional] -**env** | Option<**String**> | | [optional] -**cluster_name** | Option<**String**> | | [optional] -**namespace_name** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/NamespaceReleaseDto.md b/rust/docs/NamespaceReleaseDto.md index 6a510bc0..b43d059d 100644 --- a/rust/docs/NamespaceReleaseDto.md +++ b/rust/docs/NamespaceReleaseDto.md @@ -10,5 +10,3 @@ Name | Type | Description | Notes **is_emergency_publish** | Option<**bool**> | 是否为紧急发布,紧急发布可能会跳过某些审核流程 | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/NamespaceSyncModel.md b/rust/docs/NamespaceSyncModel.md deleted file mode 100644 index f498b4d6..00000000 --- a/rust/docs/NamespaceSyncModel.md +++ /dev/null @@ -1,12 +0,0 @@ -# NamespaceSyncModel - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sync_to_namespaces** | Option<[**Vec**](NamespaceIdentifier.md)> | | [optional] -**sync_items** | Option<[**Vec**](ItemDTO.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/NamespaceTextModel.md b/rust/docs/NamespaceTextModel.md deleted file mode 100644 index 2df40c3b..00000000 --- a/rust/docs/NamespaceTextModel.md +++ /dev/null @@ -1,18 +0,0 @@ -# NamespaceTextModel - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**app_id** | Option<**String**> | | [optional] -**env** | Option<**String**> | | [optional] -**cluster_name** | Option<**String**> | | [optional] -**namespace_name** | Option<**String**> | | [optional] -**namespace_id** | Option<**i64**> | | [optional] -**format** | Option<**String**> | | [optional] -**config_text** | Option<**String**> | | [optional] -**operator** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenAppDto.md b/rust/docs/OpenAppDto.md index 399b84c4..7397fbbf 100644 --- a/rust/docs/OpenAppDto.md +++ b/rust/docs/OpenAppDto.md @@ -16,5 +16,3 @@ Name | Type | Description | Notes **owner_email** | Option<**String**> | 应用负责人邮箱地址,用于接收应用相关通知 | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenAppNamespaceDto.md b/rust/docs/OpenAppNamespaceDto.md index 2face6b0..3cee8743 100644 --- a/rust/docs/OpenAppNamespaceDto.md +++ b/rust/docs/OpenAppNamespaceDto.md @@ -16,5 +16,3 @@ Name | Type | Description | Notes **comment** | Option<**String**> | 命名空间备注说明,描述命名空间的用途和包含的配置类型 | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenClusterDto.md b/rust/docs/OpenClusterDto.md index d3499600..095dcb41 100644 --- a/rust/docs/OpenClusterDto.md +++ b/rust/docs/OpenClusterDto.md @@ -12,5 +12,3 @@ Name | Type | Description | Notes **app_id** | Option<**String**> | 所属应用的唯一标识符 | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenCreateAppDto.md b/rust/docs/OpenCreateAppDto.md index 47fc6b3d..57646739 100644 --- a/rust/docs/OpenCreateAppDto.md +++ b/rust/docs/OpenCreateAppDto.md @@ -6,8 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **assign_app_role_to_self** | Option<**bool**> | 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 | [optional] **admins** | Option<**Vec**> | 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 | [optional] -**app** | Option<[**models::OpenAppDto**](OpenAppDTO.md)> | | [optional] +**app** | Option<[**crate::models::OpenAppDto**](OpenAppDTO.md)> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenEnvClusterDto.md b/rust/docs/OpenEnvClusterDto.md index f38f0c2f..975c856d 100644 --- a/rust/docs/OpenEnvClusterDto.md +++ b/rust/docs/OpenEnvClusterDto.md @@ -4,9 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**env** | Option<**String**> | | [optional] -**clusters** | Option<**Vec**> | | [optional] +**env** | Option<**String**> | 环境标识,例如 DEV、FAT、UAT、PROD | [optional] +**clusters** | Option<**Vec**> | 该环境下的集群名称列表 | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/EntityPairKvEntity.md b/rust/docs/OpenEnvClusterInfo.md similarity index 58% rename from rust/docs/EntityPairKvEntity.md rename to rust/docs/OpenEnvClusterInfo.md index 6ea662f8..0d6bb81a 100644 --- a/rust/docs/EntityPairKvEntity.md +++ b/rust/docs/OpenEnvClusterInfo.md @@ -1,12 +1,10 @@ -# EntityPairKvEntity +# OpenEnvClusterInfo ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**first_entity** | Option<[**models::KvEntity**](KVEntity.md)> | | [optional] -**second_entity** | Option<[**models::KvEntity**](KVEntity.md)> | | [optional] +**env** | Option<**String**> | 环境标识 | [optional] +**clusters** | Option<[**Vec**](OpenClusterDTO.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/OpenGrayReleaseRuleDto.md b/rust/docs/OpenGrayReleaseRuleDto.md index 8fbf13b4..1f52484b 100644 --- a/rust/docs/OpenGrayReleaseRuleDto.md +++ b/rust/docs/OpenGrayReleaseRuleDto.md @@ -12,8 +12,6 @@ Name | Type | Description | Notes **cluster_name** | Option<**String**> | 所属集群的名称 | [optional] **namespace_name** | Option<**String**> | 所属命名空间的名称 | [optional] **branch_name** | Option<**String**> | 灰度分支名称,标识灰度发布的分支 | [optional] -**rule_items** | Option<[**Vec**](OpenGrayReleaseRuleItemDTO.md)> | 灰度发布规则项列表,包含具体的灰度规则条件 | [optional] +**rule_items** | Option<[**Vec**](OpenGrayReleaseRuleItemDTO.md)> | 灰度发布规则项列表,包含具体的灰度规则条件 | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenGrayReleaseRuleItemDto.md b/rust/docs/OpenGrayReleaseRuleItemDto.md index d0d40117..1db97c8c 100644 --- a/rust/docs/OpenGrayReleaseRuleItemDto.md +++ b/rust/docs/OpenGrayReleaseRuleItemDto.md @@ -9,5 +9,3 @@ Name | Type | Description | Notes **client_label_list** | Option<**Vec**> | 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenInstanceConfigDto.md b/rust/docs/OpenInstanceConfigDto.md index c47e9432..1d9bc8dd 100644 --- a/rust/docs/OpenInstanceConfigDto.md +++ b/rust/docs/OpenInstanceConfigDto.md @@ -4,10 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**release** | Option<[**models::OpenReleaseDto**](OpenReleaseDTO.md)> | | [optional] -**release_delivery_time** | Option<**String**> | | [optional] -**data_change_last_modified_time** | Option<**String**> | | [optional] +**release** | Option<[**crate::models::OpenReleaseDto**](OpenReleaseDTO.md)> | | [optional] +**release_delivery_time** | Option<**String**> | 配置下发时间(ISO 8601) | [optional] +**data_change_last_modified_time** | Option<**String**> | 最后修改时间(ISO 8601) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenInstanceDto.md b/rust/docs/OpenInstanceDto.md index c80879cd..4e4169ea 100644 --- a/rust/docs/OpenInstanceDto.md +++ b/rust/docs/OpenInstanceDto.md @@ -4,14 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | Option<**i64**> | | [optional] -**app_id** | Option<**String**> | | [optional] -**cluster_name** | Option<**String**> | | [optional] -**data_center** | Option<**String**> | | [optional] -**ip** | Option<**String**> | | [optional] -**configs** | Option<[**Vec**](OpenInstanceConfigDTO.md)> | | [optional] -**data_change_created_time** | Option<**String**> | | [optional] +**id** | Option<**i64**> | 实例ID | [optional] +**app_id** | Option<**String**> | 实例所属应用ID | [optional] +**cluster_name** | Option<**String**> | 实例所属集群名称 | [optional] +**data_center** | Option<**String**> | 数据中心/机房标识 | [optional] +**ip** | Option<**String**> | 实例IP地址 | [optional] +**configs** | Option<[**Vec**](OpenInstanceConfigDTO.md)> | 实例当前生效的配置列表 | [optional] +**data_change_created_time** | Option<**String**> | 数据创建时间(ISO 8601) | [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/OpenItemChangeSets.md b/rust/docs/OpenItemChangeSets.md new file mode 100644 index 00000000..eb0b2afa --- /dev/null +++ b/rust/docs/OpenItemChangeSets.md @@ -0,0 +1,17 @@ +# OpenItemChangeSets + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data_change_created_by** | Option<**String**> | 变更集合创建者用户名 | [optional] +**data_change_last_modified_by** | Option<**String**> | 变更集合最后修改者用户名 | [optional] +**data_change_created_by_display_name** | Option<**String**> | 创建者显示名 | [optional] +**data_change_last_modified_by_display_name** | Option<**String**> | 最后修改者显示名 | [optional] +**data_change_created_time** | Option<**String**> | 变更集合创建时间(ISO 8601) | [optional] +**data_change_last_modified_time** | Option<**String**> | 变更集合最后修改时间(ISO 8601) | [optional] +**create_items** | Option<[**Vec**](OpenItemDTO.md)> | 待创建的配置项列表 | [optional][default to []] +**update_items** | Option<[**Vec**](OpenItemDTO.md)> | 待更新的配置项列表 | [optional][default to []] +**delete_items** | Option<[**Vec**](OpenItemDTO.md)> | 待删除的配置项列表 | [optional][default to []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/docs/OpenItemDiffs.md b/rust/docs/OpenItemDiffs.md new file mode 100644 index 00000000..dcd3958f --- /dev/null +++ b/rust/docs/OpenItemDiffs.md @@ -0,0 +1,11 @@ +# OpenItemDiffs + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**namespace** | Option<[**crate::models::OpenNamespaceIdentifier**](OpenNamespaceIdentifier.md)> | | [optional] +**diffs** | Option<[**crate::models::OpenItemChangeSets**](OpenItemChangeSets.md)> | | [optional] +**ext_info** | Option<**String**> | 扩展信息 | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/docs/OpenItemDto.md b/rust/docs/OpenItemDto.md index a9a5cfbb..a866dd09 100644 --- a/rust/docs/OpenItemDto.md +++ b/rust/docs/OpenItemDto.md @@ -14,5 +14,3 @@ Name | Type | Description | Notes **comment** | Option<**String**> | 配置项的注释说明,用于描述配置项的用途和含义 | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenNamespaceDto.md b/rust/docs/OpenNamespaceDto.md index 951c4998..b4a4d70a 100644 --- a/rust/docs/OpenNamespaceDto.md +++ b/rust/docs/OpenNamespaceDto.md @@ -14,8 +14,6 @@ Name | Type | Description | Notes **comment** | Option<**String**> | 命名空间备注说明,描述命名空间的用途 | [optional] **format** | Option<**String**> | 命名空间格式类型,如properties、xml、json、yml等 | [optional] **is_public** | Option<**bool**> | 是否为公共命名空间,公共命名空间可以被其他应用关联使用 | [optional] -**items** | Option<[**Vec**](OpenItemDTO.md)> | 命名空间包含的配置项列表 | [optional] +**items** | Option<[**Vec**](OpenItemDTO.md)> | 命名空间包含的配置项列表 | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenNamespaceIdentifier.md b/rust/docs/OpenNamespaceIdentifier.md new file mode 100644 index 00000000..25cf4624 --- /dev/null +++ b/rust/docs/OpenNamespaceIdentifier.md @@ -0,0 +1,12 @@ +# OpenNamespaceIdentifier + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**app_id** | Option<**String**> | 应用唯一标识 | [optional] +**env** | Option<**String**> | 环境标识 | [optional] +**cluster_name** | Option<**String**> | 集群名称 | [optional] +**namespace_name** | Option<**String**> | 命名空间名称 | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/docs/OpenNamespaceLockDto.md b/rust/docs/OpenNamespaceLockDto.md index 5cb2e296..94154a1c 100644 --- a/rust/docs/OpenNamespaceLockDto.md +++ b/rust/docs/OpenNamespaceLockDto.md @@ -9,5 +9,3 @@ Name | Type | Description | Notes **locked_by** | Option<**String**> | 锁定者用户名 | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenNamespaceSyncModel.md b/rust/docs/OpenNamespaceSyncModel.md new file mode 100644 index 00000000..8270c637 --- /dev/null +++ b/rust/docs/OpenNamespaceSyncModel.md @@ -0,0 +1,10 @@ +# OpenNamespaceSyncModel + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sync_to_namespaces** | Option<[**Vec**](OpenNamespaceIdentifier.md)> | 目标命名空间标识列表 | [optional] +**sync_items** | Option<[**Vec**](OpenItemDTO.md)> | 需要同步的配置项列表 | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/docs/OpenNamespaceTextModel.md b/rust/docs/OpenNamespaceTextModel.md new file mode 100644 index 00000000..7cce6861 --- /dev/null +++ b/rust/docs/OpenNamespaceTextModel.md @@ -0,0 +1,16 @@ +# OpenNamespaceTextModel + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**app_id** | Option<**String**> | 应用唯一标识 | [optional] +**env** | Option<**String**> | 环境标识 | [optional] +**cluster_name** | Option<**String**> | 集群名称 | [optional] +**namespace_name** | Option<**String**> | 命名空间名称 | [optional] +**namespace_id** | Option<**i64**> | 命名空间ID | [optional] +**format** | Option<**String**> | 命名空间格式类型(properties/xml/json/yml等) | [optional] +**config_text** | Option<**String**> | 配置内容的原始文本 | [optional] +**operator** | Option<**String**> | 操作者用户名 | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/docs/OpenOrganizationDto.md b/rust/docs/OpenOrganizationDto.md index 75b29a7e..ebd911d9 100644 --- a/rust/docs/OpenOrganizationDto.md +++ b/rust/docs/OpenOrganizationDto.md @@ -4,9 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**org_id** | Option<**String**> | | [optional] -**org_name** | Option<**String**> | | [optional] +**org_id** | Option<**String**> | 组织ID | [optional] +**org_name** | Option<**String**> | 组织名称 | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenPageDtoOpenInstanceDto.md b/rust/docs/OpenPageDtoOpenInstanceDto.md index e534b024..2d94b0ba 100644 --- a/rust/docs/OpenPageDtoOpenInstanceDto.md +++ b/rust/docs/OpenPageDtoOpenInstanceDto.md @@ -7,8 +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] +**content** | Option<[**Vec**](OpenInstanceDTO.md)> | 当前页的实例列表,包含具体的实例数据 | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenPageDtoOpenItemDto.md b/rust/docs/OpenPageDtoOpenItemDto.md index a98ae6c7..83ea96a1 100644 --- a/rust/docs/OpenPageDtoOpenItemDto.md +++ b/rust/docs/OpenPageDtoOpenItemDto.md @@ -7,8 +7,6 @@ Name | Type | Description | Notes **page** | Option<**i32**> | 当前页码,从0开始计数 | [optional] **size** | Option<**i32**> | 每页显示的记录数量 | [optional] **total** | Option<**i64**> | 总记录数,符合查询条件的配置项总数量 | [optional] -**content** | Option<[**Vec**](OpenItemDTO.md)> | 当前页的配置项列表,包含具体的配置项数据 | [optional] +**content** | Option<[**Vec**](OpenItemDTO.md)> | 当前页的配置项列表,包含具体的配置项数据 | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/EnvClusterInfo.md b/rust/docs/OpenReleaseBo.md similarity index 62% rename from rust/docs/EnvClusterInfo.md rename to rust/docs/OpenReleaseBo.md index 1203b08f..792e6ad2 100644 --- a/rust/docs/EnvClusterInfo.md +++ b/rust/docs/OpenReleaseBo.md @@ -1,12 +1,10 @@ -# EnvClusterInfo +# OpenReleaseBo ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**env** | Option<**String**> | | [optional] -**clusters** | Option<[**Vec**](ClusterDTO.md)> | | [optional] +**base_info** | Option<[**crate::models::OpenReleaseDto**](OpenReleaseDTO.md)> | | [optional] +**items** | Option<[**Vec**](KVEntity.md)> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenReleaseDto.md b/rust/docs/OpenReleaseDto.md index 765f28a7..3b78dbb2 100644 --- a/rust/docs/OpenReleaseDto.md +++ b/rust/docs/OpenReleaseDto.md @@ -13,9 +13,7 @@ Name | Type | Description | Notes **cluster_name** | Option<**String**> | 所属集群的名称 | [optional] **namespace_name** | Option<**String**> | 所属命名空间的名称 | [optional] **name** | Option<**String**> | 发布名称,用于标识这次发布的版本或描述 | [optional] -**configurations** | Option<[**models::MapString**](MapString.md)> | | [optional] +**configurations** | Option<**::std::collections::HashMap**> | | [optional] **comment** | Option<**String**> | 发布备注,描述本次发布的变更内容和目的 | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenapiV1AppsGet401Response.md b/rust/docs/OpenapiV1AppsGet401Response.md deleted file mode 100644 index 868b6e61..00000000 --- a/rust/docs/OpenapiV1AppsGet401Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# OpenapiV1AppsGet401Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenapiV1AppsPost400Response.md b/rust/docs/OpenapiV1AppsPost400Response.md deleted file mode 100644 index 79724c7b..00000000 --- a/rust/docs/OpenapiV1AppsPost400Response.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenapiV1AppsPost400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | Option<**String**> | | [optional] -**exception** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenapiV1AppsPostRequest.md b/rust/docs/OpenapiV1AppsPostRequest.md deleted file mode 100644 index c3347cfd..00000000 --- a/rust/docs/OpenapiV1AppsPostRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# OpenapiV1AppsPostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**app** | [**models::OpenAppDto**](OpenAppDTO.md) | | -**assign_app_role_to_self** | **bool** | 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 | -**admins** | **Vec** | 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md b/rust/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md deleted file mode 100644 index f1d33df6..00000000 --- a/rust/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**valid** | Option<**bool**> | | [optional] -**message** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md b/rust/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md deleted file mode 100644 index 019e0e4e..00000000 --- a/rust/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md +++ /dev/null @@ -1,13 +0,0 @@ -# OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**valid** | Option<**bool**> | | [optional] -**message** | Option<**String**> | | [optional] -**errors** | Option<**Vec**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md b/rust/docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md deleted file mode 100644 index 11155f8d..00000000 --- a/rust/docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# OpenapiV1EnvsEnvReleasesCompareGet200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**changes** | Option<[**Vec**](Change.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/ReleaseDto.md b/rust/docs/ReleaseDto.md deleted file mode 100644 index b0f4617e..00000000 --- a/rust/docs/ReleaseDto.md +++ /dev/null @@ -1,25 +0,0 @@ -# ReleaseDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | Option<**String**> | | [optional] -**data_change_last_modified_by** | Option<**String**> | | [optional] -**data_change_created_by_display_name** | Option<**String**> | | [optional] -**data_change_last_modified_by_display_name** | Option<**String**> | | [optional] -**data_change_created_time** | Option<**String**> | | [optional] -**data_change_last_modified_time** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**release_key** | Option<**String**> | | [optional] -**name** | Option<**String**> | | [optional] -**app_id** | Option<**String**> | | [optional] -**cluster_name** | Option<**String**> | | [optional] -**namespace_name** | Option<**String**> | | [optional] -**configurations** | Option<**String**> | | [optional] -**comment** | Option<**String**> | | [optional] -**is_abandoned** | Option<**bool**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/Change.md b/rust/docs/RichResponseEntity.md similarity index 52% rename from rust/docs/Change.md rename to rust/docs/RichResponseEntity.md index 380871c6..27e2833e 100644 --- a/rust/docs/Change.md +++ b/rust/docs/RichResponseEntity.md @@ -1,12 +1,11 @@ -# Change +# RichResponseEntity ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**r#type** | Option<**String**> | | [optional] -**entity** | Option<[**models::EntityPairKvEntity**](EntityPairKVEntity.md)> | | [optional] +**code** | **i32** | HTTP status code | +**message** | [**serde_json::Value**](.md) | Response message (can be string or object) | +**body** | Option<[**serde_json::Value**](.md)> | Response payload (generic type T) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/src/apis/configuration.rs b/rust/src/apis/configuration.rs index f7fa9f33..7353ef66 100644 --- a/rust/src/apis/configuration.rs +++ b/rust/src/apis/configuration.rs @@ -1,10 +1,10 @@ /* * Apollo OpenAPI * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 */ @@ -19,6 +19,7 @@ pub struct Configuration { pub oauth_access_token: Option, pub bearer_access_token: Option, pub api_key: Option, + // TODO: take an oauth2 token source, similar to the go one } pub type BasicAuth = (String, Option); @@ -46,6 +47,7 @@ impl Default for Configuration { oauth_access_token: None, bearer_access_token: None, api_key: None, + } } } diff --git a/rust/src/apis/mod.rs b/rust/src/apis/mod.rs index 5fb39b83..dccbc940 100644 --- a/rust/src/apis/mod.rs +++ b/rust/src/apis/mod.rs @@ -90,26 +90,5 @@ pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String unimplemented!("Only objects are supported with style=deepObject") } -/// Internal use only -/// A content type supported by this client. -#[allow(dead_code)] -enum ContentType { - Json, - Text, - Unsupported(String) -} - -impl From<&str> for ContentType { - fn from(content_type: &str) -> Self { - if content_type.starts_with("application") && content_type.contains("json") { - return Self::Json; - } else if content_type.starts_with("text/plain") { - return Self::Text; - } else { - return Self::Unsupported(content_type.to_string()); - } - } -} - pub mod configuration; diff --git a/rust/src/lib.rs b/rust/src/lib.rs index e1520628..c1dd666f 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -1,7 +1,6 @@ -#![allow(unused_imports)] -#![allow(clippy::too_many_arguments)] +#[macro_use] +extern crate serde_derive; -extern crate serde_repr; extern crate serde; extern crate serde_json; extern crate url; diff --git a/rust/src/models/_openapi_v1_apps_get_401_response.rs b/rust/src/models/_openapi_v1_apps_get_401_response.rs deleted file mode 100644 index 6a746173..00000000 --- a/rust/src/models/_openapi_v1_apps_get_401_response.rs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenapiV1AppsGet401Response { - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, -} - -impl OpenapiV1AppsGet401Response { - pub fn new() -> OpenapiV1AppsGet401Response { - OpenapiV1AppsGet401Response { - message: None, - } - } -} - diff --git a/rust/src/models/_openapi_v1_apps_post_400_response.rs b/rust/src/models/_openapi_v1_apps_post_400_response.rs deleted file mode 100644 index 009db695..00000000 --- a/rust/src/models/_openapi_v1_apps_post_400_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenapiV1AppsPost400Response { - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - #[serde(rename = "exception", skip_serializing_if = "Option::is_none")] - pub exception: Option, -} - -impl OpenapiV1AppsPost400Response { - pub fn new() -> OpenapiV1AppsPost400Response { - OpenapiV1AppsPost400Response { - message: None, - exception: None, - } - } -} - diff --git a/rust/src/models/_openapi_v1_apps_post_request.rs b/rust/src/models/_openapi_v1_apps_post_request.rs deleted file mode 100644 index a629eb83..00000000 --- a/rust/src/models/_openapi_v1_apps_post_request.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// OpenapiV1AppsPostRequest : -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenapiV1AppsPostRequest { - #[serde(rename = "app")] - pub app: Box, - /// 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 - #[serde(rename = "assignAppRoleToSelf")] - pub assign_app_role_to_self: bool, - /// 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 - #[serde(rename = "admins")] - pub admins: Vec, -} - -impl OpenapiV1AppsPostRequest { - /// - pub fn new(app: models::OpenAppDto, assign_app_role_to_self: bool, admins: Vec) -> OpenapiV1AppsPostRequest { - OpenapiV1AppsPostRequest { - app: Box::new(app), - assign_app_role_to_self, - admins, - } - } -} - diff --git a/rust/src/models/_openapi_v1_envs__env__apps__app_id__clusters__cluster_name__namespaces__namespace_name__items_validate_post_200_response.rs b/rust/src/models/_openapi_v1_envs__env__apps__app_id__clusters__cluster_name__namespaces__namespace_name__items_validate_post_200_response.rs deleted file mode 100644 index 18856554..00000000 --- a/rust/src/models/_openapi_v1_envs__env__apps__app_id__clusters__cluster_name__namespaces__namespace_name__items_validate_post_200_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response { - #[serde(rename = "valid", skip_serializing_if = "Option::is_none")] - pub valid: Option, - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, -} - -impl OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response { - pub fn new() -> OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response { - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response { - valid: None, - message: None, - } - } -} - diff --git a/rust/src/models/_openapi_v1_envs__env__apps__app_id__clusters__cluster_name__namespaces__namespace_name__items_validate_post_400_response.rs b/rust/src/models/_openapi_v1_envs__env__apps__app_id__clusters__cluster_name__namespaces__namespace_name__items_validate_post_400_response.rs deleted file mode 100644 index c6032943..00000000 --- a/rust/src/models/_openapi_v1_envs__env__apps__app_id__clusters__cluster_name__namespaces__namespace_name__items_validate_post_400_response.rs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response { - #[serde(rename = "valid", skip_serializing_if = "Option::is_none")] - pub valid: Option, - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - #[serde(rename = "errors", skip_serializing_if = "Option::is_none")] - pub errors: Option>, -} - -impl OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response { - pub fn new() -> OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response { - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response { - valid: None, - message: None, - errors: None, - } - } -} - diff --git a/rust/src/models/_openapi_v1_envs__env__releases_compare_get_200_response.rs b/rust/src/models/_openapi_v1_envs__env__releases_compare_get_200_response.rs deleted file mode 100644 index 696f066e..00000000 --- a/rust/src/models/_openapi_v1_envs__env__releases_compare_get_200_response.rs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenapiV1EnvsEnvReleasesCompareGet200Response { - #[serde(rename = "changes", skip_serializing_if = "Option::is_none")] - pub changes: Option>, -} - -impl OpenapiV1EnvsEnvReleasesCompareGet200Response { - pub fn new() -> OpenapiV1EnvsEnvReleasesCompareGet200Response { - OpenapiV1EnvsEnvReleasesCompareGet200Response { - changes: None, - } - } -} - diff --git a/rust/src/models/change.rs b/rust/src/models/change.rs deleted file mode 100644 index b8f91110..00000000 --- a/rust/src/models/change.rs +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Change { - /// - #[serde(rename = "type", skip_serializing_if = "Option::is_none")] - pub r#type: Option, - #[serde(rename = "entity", skip_serializing_if = "Option::is_none")] - pub entity: Option>, -} - -impl Change { - pub fn new() -> Change { - Change { - r#type: None, - entity: None, - } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "ADDED")] - Added, - #[serde(rename = "MODIFIED")] - Modified, - #[serde(rename = "DELETED")] - Deleted, -} - -impl Default for Type { - fn default() -> Type { - Self::Added - } -} - diff --git a/rust/src/models/cluster_dto.rs b/rust/src/models/cluster_dto.rs deleted file mode 100644 index 863ecbc6..00000000 --- a/rust/src/models/cluster_dto.rs +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ClusterDto { - /// - #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] - pub data_change_created_by: Option, - /// - #[serde(rename = "dataChangeLastModifiedBy", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_by: Option, - /// - #[serde(rename = "dataChangeCreatedByDisplayName", skip_serializing_if = "Option::is_none")] - pub data_change_created_by_display_name: Option, - /// - #[serde(rename = "dataChangeLastModifiedByDisplayName", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_by_display_name: Option, - /// - #[serde(rename = "dataChangeCreatedTime", skip_serializing_if = "Option::is_none")] - pub data_change_created_time: Option, - /// - #[serde(rename = "dataChangeLastModifiedTime", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_time: Option, - /// - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - /// - #[serde(rename = "name")] - pub name: String, - /// - #[serde(rename = "appId")] - pub app_id: String, - /// - #[serde(rename = "parentClusterId", skip_serializing_if = "Option::is_none")] - pub parent_cluster_id: Option, - /// - #[serde(rename = "comment", skip_serializing_if = "Option::is_none")] - pub comment: Option, -} - -impl ClusterDto { - pub fn new(name: String, app_id: String) -> ClusterDto { - ClusterDto { - data_change_created_by: None, - data_change_last_modified_by: None, - data_change_created_by_display_name: None, - data_change_last_modified_by_display_name: None, - data_change_created_time: None, - data_change_last_modified_time: None, - id: None, - name, - app_id, - parent_cluster_id: None, - comment: None, - } - } -} - diff --git a/rust/src/models/entity_pair_kv_entity.rs b/rust/src/models/entity_pair_kv_entity.rs deleted file mode 100644 index a64edfb9..00000000 --- a/rust/src/models/entity_pair_kv_entity.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EntityPairKvEntity { - #[serde(rename = "firstEntity", skip_serializing_if = "Option::is_none")] - pub first_entity: Option>, - #[serde(rename = "secondEntity", skip_serializing_if = "Option::is_none")] - pub second_entity: Option>, -} - -impl EntityPairKvEntity { - pub fn new() -> EntityPairKvEntity { - EntityPairKvEntity { - first_entity: None, - second_entity: None, - } - } -} - diff --git a/rust/src/models/env_cluster_info.rs b/rust/src/models/env_cluster_info.rs deleted file mode 100644 index 257c5818..00000000 --- a/rust/src/models/env_cluster_info.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EnvClusterInfo { - /// - #[serde(rename = "env", skip_serializing_if = "Option::is_none")] - pub env: Option, - /// - #[serde(rename = "clusters", skip_serializing_if = "Option::is_none")] - pub clusters: Option>, -} - -impl EnvClusterInfo { - pub fn new() -> EnvClusterInfo { - EnvClusterInfo { - env: None, - clusters: None, - } - } -} - diff --git a/rust/src/models/item_dto.rs b/rust/src/models/item_dto.rs deleted file mode 100644 index 309be2a3..00000000 --- a/rust/src/models/item_dto.rs +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ItemDto { - /// - #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] - pub data_change_created_by: Option, - /// - #[serde(rename = "dataChangeLastModifiedBy", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_by: Option, - /// - #[serde(rename = "dataChangeCreatedByDisplayName", skip_serializing_if = "Option::is_none")] - pub data_change_created_by_display_name: Option, - /// - #[serde(rename = "dataChangeLastModifiedByDisplayName", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_by_display_name: Option, - /// - #[serde(rename = "dataChangeCreatedTime", skip_serializing_if = "Option::is_none")] - pub data_change_created_time: Option, - /// - #[serde(rename = "dataChangeLastModifiedTime", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_time: Option, - /// - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - /// - #[serde(rename = "namespaceId", skip_serializing_if = "Option::is_none")] - pub namespace_id: Option, - /// - #[serde(rename = "key", skip_serializing_if = "Option::is_none")] - pub key: Option, - /// - #[serde(rename = "type", skip_serializing_if = "Option::is_none")] - pub r#type: Option, - /// - #[serde(rename = "value", skip_serializing_if = "Option::is_none")] - pub value: Option, - /// - #[serde(rename = "comment", skip_serializing_if = "Option::is_none")] - pub comment: Option, - /// - #[serde(rename = "lineNum", skip_serializing_if = "Option::is_none")] - pub line_num: Option, -} - -impl ItemDto { - pub fn new() -> ItemDto { - ItemDto { - data_change_created_by: None, - data_change_last_modified_by: None, - data_change_created_by_display_name: None, - data_change_last_modified_by_display_name: None, - data_change_created_time: None, - data_change_last_modified_time: None, - id: None, - namespace_id: None, - key: None, - r#type: None, - value: None, - comment: None, - line_num: None, - } - } -} - diff --git a/rust/src/models/kv_entity.rs b/rust/src/models/kv_entity.rs index fd3cb3ff..f85e7075 100644 --- a/rust/src/models/kv_entity.rs +++ b/rust/src/models/kv_entity.rs @@ -1,22 +1,22 @@ /* * Apollo OpenAPI * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 */ -use crate::models; -use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct KvEntity { - /// + /// 键 #[serde(rename = "key", skip_serializing_if = "Option::is_none")] pub key: Option, - /// + /// 值 #[serde(rename = "value", skip_serializing_if = "Option::is_none")] pub value: Option, } @@ -29,4 +29,3 @@ impl KvEntity { } } } - diff --git a/rust/src/models/list_item_diffs.rs b/rust/src/models/list_item_diffs.rs deleted file mode 100644 index ffd7531a..00000000 --- a/rust/src/models/list_item_diffs.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ListItemDiffs { - #[serde(rename = "namespace", skip_serializing_if = "Option::is_none")] - pub namespace: Option>, - #[serde(rename = "diffs", skip_serializing_if = "Option::is_none")] - pub diffs: Option>, - /// - #[serde(rename = "extInfo", skip_serializing_if = "Option::is_none")] - pub ext_info: Option, -} - -impl ListItemDiffs { - pub fn new() -> ListItemDiffs { - ListItemDiffs { - namespace: None, - diffs: None, - ext_info: None, - } - } -} - diff --git a/rust/src/models/list_release_bo.rs b/rust/src/models/list_release_bo.rs deleted file mode 100644 index 16a3dde9..00000000 --- a/rust/src/models/list_release_bo.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ListReleaseBo { - #[serde(rename = "baseInfo", skip_serializing_if = "Option::is_none")] - pub base_info: Option>, - /// - #[serde(rename = "items", skip_serializing_if = "Option::is_none")] - pub items: Option>, -} - -impl ListReleaseBo { - pub fn new() -> ListReleaseBo { - ListReleaseBo { - base_info: None, - items: None, - } - } -} - diff --git a/rust/src/models/map_string.rs b/rust/src/models/map_string.rs deleted file mode 100644 index d11ac38a..00000000 --- a/rust/src/models/map_string.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// MapString : 字符串映射对象,用于表示键值对的配置数据结构 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct MapString { - #[serde(rename = "key", skip_serializing_if = "Option::is_none")] - pub key: Option, -} - -impl MapString { - /// 字符串映射对象,用于表示键值对的配置数据结构 - pub fn new() -> MapString { - MapString { - key: None, - } - } -} - diff --git a/rust/src/models/mod.rs b/rust/src/models/mod.rs index 9d5f7f6c..403e6174 100644 --- a/rust/src/models/mod.rs +++ b/rust/src/models/mod.rs @@ -1,33 +1,11 @@ -pub mod change; -pub use self::change::Change; -pub mod cluster_dto; -pub use self::cluster_dto::ClusterDto; -pub mod entity_pair_kv_entity; -pub use self::entity_pair_kv_entity::EntityPairKvEntity; -pub mod env_cluster_info; -pub use self::env_cluster_info::EnvClusterInfo; -pub mod item_change_sets; -pub use self::item_change_sets::ItemChangeSets; -pub mod item_dto; -pub use self::item_dto::ItemDto; pub mod kv_entity; pub use self::kv_entity::KvEntity; -pub mod list_item_diffs; -pub use self::list_item_diffs::ListItemDiffs; -pub mod list_release_bo; -pub use self::list_release_bo::ListReleaseBo; -pub mod map_string; -pub use self::map_string::MapString; +pub mod multi_response_entity; +pub use self::multi_response_entity::MultiResponseEntity; pub mod namespace_gray_del_release_dto; pub use self::namespace_gray_del_release_dto::NamespaceGrayDelReleaseDto; -pub mod namespace_identifier; -pub use self::namespace_identifier::NamespaceIdentifier; pub mod namespace_release_dto; pub use self::namespace_release_dto::NamespaceReleaseDto; -pub mod namespace_sync_model; -pub use self::namespace_sync_model::NamespaceSyncModel; -pub mod namespace_text_model; -pub use self::namespace_text_model::NamespaceTextModel; pub mod open_app_dto; pub use self::open_app_dto::OpenAppDto; pub mod open_app_namespace_dto; @@ -38,6 +16,8 @@ pub mod open_create_app_dto; pub use self::open_create_app_dto::OpenCreateAppDto; pub mod open_env_cluster_dto; pub use self::open_env_cluster_dto::OpenEnvClusterDto; +pub mod open_env_cluster_info; +pub use self::open_env_cluster_info::OpenEnvClusterInfo; pub mod open_gray_release_rule_dto; pub use self::open_gray_release_rule_dto::OpenGrayReleaseRuleDto; pub mod open_gray_release_rule_item_dto; @@ -46,31 +26,31 @@ pub mod open_instance_config_dto; pub use self::open_instance_config_dto::OpenInstanceConfigDto; pub mod open_instance_dto; pub use self::open_instance_dto::OpenInstanceDto; +pub mod open_item_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_namespace_dto; pub use self::open_namespace_dto::OpenNamespaceDto; +pub mod open_namespace_identifier; +pub use self::open_namespace_identifier::OpenNamespaceIdentifier; pub mod open_namespace_lock_dto; pub use self::open_namespace_lock_dto::OpenNamespaceLockDto; +pub mod open_namespace_sync_model; +pub use self::open_namespace_sync_model::OpenNamespaceSyncModel; +pub mod open_namespace_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; pub use self::open_release_dto::OpenReleaseDto; -pub mod _openapi_v1_apps_get_401_response; -pub use self::_openapi_v1_apps_get_401_response::OpenapiV1AppsGet401Response; -pub mod _openapi_v1_apps_post_400_response; -pub use self::_openapi_v1_apps_post_400_response::OpenapiV1AppsPost400Response; -pub mod _openapi_v1_apps_post_request; -pub use self::_openapi_v1_apps_post_request::OpenapiV1AppsPostRequest; -pub mod _openapi_v1_envs__env__apps__app_id__clusters__cluster_name__namespaces__namespace_name__items_validate_post_200_response; -pub use self::_openapi_v1_envs__env__apps__app_id__clusters__cluster_name__namespaces__namespace_name__items_validate_post_200_response::OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response; -pub mod _openapi_v1_envs__env__apps__app_id__clusters__cluster_name__namespaces__namespace_name__items_validate_post_400_response; -pub use self::_openapi_v1_envs__env__apps__app_id__clusters__cluster_name__namespaces__namespace_name__items_validate_post_400_response::OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response; -pub mod _openapi_v1_envs__env__releases_compare_get_200_response; -pub use self::_openapi_v1_envs__env__releases_compare_get_200_response::OpenapiV1EnvsEnvReleasesCompareGet200Response; -pub mod release_dto; -pub use self::release_dto::ReleaseDto; +pub mod rich_response_entity; +pub use self::rich_response_entity::RichResponseEntity; diff --git a/rust/src/models/multi_response_entity.rs b/rust/src/models/multi_response_entity.rs new file mode 100644 index 00000000..433e1135 --- /dev/null +++ b/rust/src/models/multi_response_entity.rs @@ -0,0 +1,33 @@ +/* + * Apollo OpenAPI + * + *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
+ * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +/// MultiResponseEntity : A response container holding multiple RichResponseEntity objects + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct MultiResponseEntity { + /// Overall HTTP status code + #[serde(rename = "code")] + pub code: i32, + /// List of rich response entities + #[serde(rename = "entities")] + pub entities: Vec, +} + +impl MultiResponseEntity { + /// A response container holding multiple RichResponseEntity objects + pub fn new(code: i32, entities: Vec) -> MultiResponseEntity { + MultiResponseEntity { + code, + entities, + } + } +} diff --git a/rust/src/models/namespace_gray_del_release_dto.rs b/rust/src/models/namespace_gray_del_release_dto.rs index 0d77c5e5..75ea2e1a 100644 --- a/rust/src/models/namespace_gray_del_release_dto.rs +++ b/rust/src/models/namespace_gray_del_release_dto.rs @@ -1,18 +1,18 @@ /* * Apollo OpenAPI * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 */ -use crate::models; -use serde::{Deserialize, Serialize}; - /// NamespaceGrayDelReleaseDto : 命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct NamespaceGrayDelReleaseDto { /// 发布标题,用于标识这次灰度删除发布的名称或版本号 #[serde(rename = "releaseTitle", skip_serializing_if = "Option::is_none")] @@ -43,4 +43,3 @@ impl NamespaceGrayDelReleaseDto { } } } - diff --git a/rust/src/models/namespace_identifier.rs b/rust/src/models/namespace_identifier.rs deleted file mode 100644 index c8b8d080..00000000 --- a/rust/src/models/namespace_identifier.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct NamespaceIdentifier { - /// - #[serde(rename = "appId", skip_serializing_if = "Option::is_none")] - pub app_id: Option, - /// - #[serde(rename = "env", skip_serializing_if = "Option::is_none")] - pub env: Option, - /// - #[serde(rename = "clusterName", skip_serializing_if = "Option::is_none")] - pub cluster_name: Option, - /// - #[serde(rename = "namespaceName", skip_serializing_if = "Option::is_none")] - pub namespace_name: Option, -} - -impl NamespaceIdentifier { - pub fn new() -> NamespaceIdentifier { - NamespaceIdentifier { - app_id: None, - env: None, - cluster_name: None, - namespace_name: None, - } - } -} - diff --git a/rust/src/models/namespace_release_dto.rs b/rust/src/models/namespace_release_dto.rs index bed00a50..e8e1a025 100644 --- a/rust/src/models/namespace_release_dto.rs +++ b/rust/src/models/namespace_release_dto.rs @@ -1,18 +1,18 @@ /* * Apollo OpenAPI * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 */ -use crate::models; -use serde::{Deserialize, Serialize}; - /// NamespaceReleaseDto : 命名空间发布请求数据传输对象,用于创建新的配置发布 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct NamespaceReleaseDto { /// 发布标题,用于标识这次发布的名称或版本号 #[serde(rename = "releaseTitle", skip_serializing_if = "Option::is_none")] @@ -39,4 +39,3 @@ impl NamespaceReleaseDto { } } } - diff --git a/rust/src/models/namespace_sync_model.rs b/rust/src/models/namespace_sync_model.rs deleted file mode 100644 index 23585bf1..00000000 --- a/rust/src/models/namespace_sync_model.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct NamespaceSyncModel { - /// - #[serde(rename = "syncToNamespaces", skip_serializing_if = "Option::is_none")] - pub sync_to_namespaces: Option>, - /// - #[serde(rename = "syncItems", skip_serializing_if = "Option::is_none")] - pub sync_items: Option>, -} - -impl NamespaceSyncModel { - pub fn new() -> NamespaceSyncModel { - NamespaceSyncModel { - sync_to_namespaces: None, - sync_items: None, - } - } -} - diff --git a/rust/src/models/open_app_dto.rs b/rust/src/models/open_app_dto.rs index 6a85608e..37b11778 100644 --- a/rust/src/models/open_app_dto.rs +++ b/rust/src/models/open_app_dto.rs @@ -1,18 +1,18 @@ /* * Apollo OpenAPI * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 */ -use crate::models; -use serde::{Deserialize, Serialize}; - /// OpenAppDto : Apollo应用信息数据传输对象,包含应用的基本信息和元数据 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct OpenAppDto { /// 数据创建者用户名,记录是谁创建了这个应用 #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] @@ -63,4 +63,3 @@ impl OpenAppDto { } } } - diff --git a/rust/src/models/open_app_namespace_dto.rs b/rust/src/models/open_app_namespace_dto.rs index 629a3b36..28c9c22f 100644 --- a/rust/src/models/open_app_namespace_dto.rs +++ b/rust/src/models/open_app_namespace_dto.rs @@ -1,18 +1,18 @@ /* * Apollo OpenAPI * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 */ -use crate::models; -use serde::{Deserialize, Serialize}; - /// OpenAppNamespaceDto : Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct OpenAppNamespaceDto { /// 命名空间创建者用户名,记录是谁创建了这个应用命名空间 #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] @@ -63,4 +63,3 @@ impl OpenAppNamespaceDto { } } } - diff --git a/rust/src/models/open_cluster_dto.rs b/rust/src/models/open_cluster_dto.rs index 2bfa39fd..460c46cc 100644 --- a/rust/src/models/open_cluster_dto.rs +++ b/rust/src/models/open_cluster_dto.rs @@ -1,18 +1,18 @@ /* * Apollo OpenAPI * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 */ -use crate::models; -use serde::{Deserialize, Serialize}; - /// OpenClusterDto : Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct OpenClusterDto { /// 集群创建者用户名,记录是谁创建了这个集群 #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] @@ -47,4 +47,3 @@ impl OpenClusterDto { } } } - diff --git a/rust/src/models/open_create_app_dto.rs b/rust/src/models/open_create_app_dto.rs index 8e0403c2..d69635eb 100644 --- a/rust/src/models/open_create_app_dto.rs +++ b/rust/src/models/open_create_app_dto.rs @@ -1,18 +1,18 @@ /* * Apollo OpenAPI * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 */ -use crate::models; -use serde::{Deserialize, Serialize}; - /// OpenCreateAppDto : 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct OpenCreateAppDto { /// 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 #[serde(rename = "assignAppRoleToSelf", skip_serializing_if = "Option::is_none")] @@ -21,7 +21,7 @@ pub struct OpenCreateAppDto { #[serde(rename = "admins", skip_serializing_if = "Option::is_none")] pub admins: Option>, #[serde(rename = "app", skip_serializing_if = "Option::is_none")] - pub app: Option>, + pub app: Option>, } impl OpenCreateAppDto { @@ -34,4 +34,3 @@ impl OpenCreateAppDto { } } } - diff --git a/rust/src/models/open_env_cluster_dto.rs b/rust/src/models/open_env_cluster_dto.rs index 432de153..c290a733 100644 --- a/rust/src/models/open_env_cluster_dto.rs +++ b/rust/src/models/open_env_cluster_dto.rs @@ -1,22 +1,22 @@ /* * Apollo OpenAPI * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 */ -use crate::models; -use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct OpenEnvClusterDto { - /// + /// 环境标识,例如 DEV、FAT、UAT、PROD #[serde(rename = "env", skip_serializing_if = "Option::is_none")] pub env: Option, - /// + /// 该环境下的集群名称列表 #[serde(rename = "clusters", skip_serializing_if = "Option::is_none")] pub clusters: Option>, } @@ -29,4 +29,3 @@ impl OpenEnvClusterDto { } } } - diff --git a/rust/src/models/open_env_cluster_info.rs b/rust/src/models/open_env_cluster_info.rs new file mode 100644 index 00000000..3139b52b --- /dev/null +++ b/rust/src/models/open_env_cluster_info.rs @@ -0,0 +1,31 @@ +/* + * 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 OpenEnvClusterInfo { + /// 环境标识 + #[serde(rename = "env", skip_serializing_if = "Option::is_none")] + pub env: Option, + /// 集群信息列表 + #[serde(rename = "clusters", skip_serializing_if = "Option::is_none")] + pub clusters: Option>, +} + +impl OpenEnvClusterInfo { + pub fn new() -> OpenEnvClusterInfo { + OpenEnvClusterInfo { + env: None, + clusters: None, + } + } +} diff --git a/rust/src/models/open_gray_release_rule_dto.rs b/rust/src/models/open_gray_release_rule_dto.rs index c4ec5c7e..2b698e74 100644 --- a/rust/src/models/open_gray_release_rule_dto.rs +++ b/rust/src/models/open_gray_release_rule_dto.rs @@ -1,18 +1,18 @@ /* * Apollo OpenAPI * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 */ -use crate::models; -use serde::{Deserialize, Serialize}; - /// OpenGrayReleaseRuleDto : Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct OpenGrayReleaseRuleDto { /// 灰度规则创建者用户名,记录是谁创建了这个灰度发布规则 #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] @@ -40,7 +40,7 @@ pub struct OpenGrayReleaseRuleDto { pub branch_name: Option, /// 灰度发布规则项列表,包含具体的灰度规则条件 #[serde(rename = "ruleItems", skip_serializing_if = "Option::is_none")] - pub rule_items: Option>, + pub rule_items: Option>, } impl OpenGrayReleaseRuleDto { @@ -59,4 +59,3 @@ impl OpenGrayReleaseRuleDto { } } } - diff --git a/rust/src/models/open_gray_release_rule_item_dto.rs b/rust/src/models/open_gray_release_rule_item_dto.rs index 11a823a8..8a5a2c8d 100644 --- a/rust/src/models/open_gray_release_rule_item_dto.rs +++ b/rust/src/models/open_gray_release_rule_item_dto.rs @@ -1,18 +1,18 @@ /* * Apollo OpenAPI * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 */ -use crate::models; -use serde::{Deserialize, Serialize}; - /// OpenGrayReleaseRuleItemDto : Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct OpenGrayReleaseRuleItemDto { /// 客户端应用ID,指定哪个应用可以获取灰度配置 #[serde(rename = "clientAppId", skip_serializing_if = "Option::is_none")] @@ -35,4 +35,3 @@ impl OpenGrayReleaseRuleItemDto { } } } - diff --git a/rust/src/models/open_instance_config_dto.rs b/rust/src/models/open_instance_config_dto.rs index 4c5f5ee0..1fa284a2 100644 --- a/rust/src/models/open_instance_config_dto.rs +++ b/rust/src/models/open_instance_config_dto.rs @@ -1,24 +1,24 @@ /* * Apollo OpenAPI * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 */ -use crate::models; -use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct OpenInstanceConfigDto { #[serde(rename = "release", skip_serializing_if = "Option::is_none")] - pub release: Option>, - /// + pub release: Option>, + /// 配置下发时间(ISO 8601) #[serde(rename = "releaseDeliveryTime", skip_serializing_if = "Option::is_none")] pub release_delivery_time: Option, - /// + /// 最后修改时间(ISO 8601) #[serde(rename = "dataChangeLastModifiedTime", skip_serializing_if = "Option::is_none")] pub data_change_last_modified_time: Option, } @@ -32,4 +32,3 @@ impl OpenInstanceConfigDto { } } } - diff --git a/rust/src/models/open_instance_dto.rs b/rust/src/models/open_instance_dto.rs index 485f1e48..55a3c0de 100644 --- a/rust/src/models/open_instance_dto.rs +++ b/rust/src/models/open_instance_dto.rs @@ -1,37 +1,37 @@ /* * Apollo OpenAPI * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 */ -use crate::models; -use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct OpenInstanceDto { - /// + /// 实例ID #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, - /// + /// 实例所属应用ID #[serde(rename = "appId", skip_serializing_if = "Option::is_none")] pub app_id: Option, - /// + /// 实例所属集群名称 #[serde(rename = "clusterName", skip_serializing_if = "Option::is_none")] pub cluster_name: Option, - /// + /// 数据中心/机房标识 #[serde(rename = "dataCenter", skip_serializing_if = "Option::is_none")] pub data_center: Option, - /// + /// 实例IP地址 #[serde(rename = "ip", skip_serializing_if = "Option::is_none")] pub ip: Option, - /// + /// 实例当前生效的配置列表 #[serde(rename = "configs", skip_serializing_if = "Option::is_none")] - pub configs: Option>, - /// + pub configs: Option>, + /// 数据创建时间(ISO 8601) #[serde(rename = "dataChangeCreatedTime", skip_serializing_if = "Option::is_none")] pub data_change_created_time: Option, } @@ -49,4 +49,3 @@ impl OpenInstanceDto { } } } - diff --git a/rust/src/models/item_change_sets.rs b/rust/src/models/open_item_change_sets.rs similarity index 53% rename from rust/src/models/item_change_sets.rs rename to rust/src/models/open_item_change_sets.rs index 57fe3228..52b16e6c 100644 --- a/rust/src/models/item_change_sets.rs +++ b/rust/src/models/open_item_change_sets.rs @@ -1,50 +1,50 @@ /* * Apollo OpenAPI * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 */ -use crate::models; -use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ItemChangeSets { - /// + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct OpenItemChangeSets { + /// 变更集合创建者用户名 #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] pub data_change_created_by: Option, - /// + /// 变更集合最后修改者用户名 #[serde(rename = "dataChangeLastModifiedBy", skip_serializing_if = "Option::is_none")] pub data_change_last_modified_by: Option, - /// + /// 创建者显示名 #[serde(rename = "dataChangeCreatedByDisplayName", skip_serializing_if = "Option::is_none")] pub data_change_created_by_display_name: Option, - /// + /// 最后修改者显示名 #[serde(rename = "dataChangeLastModifiedByDisplayName", skip_serializing_if = "Option::is_none")] pub data_change_last_modified_by_display_name: Option, - /// + /// 变更集合创建时间(ISO 8601) #[serde(rename = "dataChangeCreatedTime", skip_serializing_if = "Option::is_none")] pub data_change_created_time: Option, - /// + /// 变更集合最后修改时间(ISO 8601) #[serde(rename = "dataChangeLastModifiedTime", skip_serializing_if = "Option::is_none")] pub data_change_last_modified_time: Option, - /// + /// 待创建的配置项列表 #[serde(rename = "createItems", skip_serializing_if = "Option::is_none")] - pub create_items: Option>, - /// + pub create_items: Option>, + /// 待更新的配置项列表 #[serde(rename = "updateItems", skip_serializing_if = "Option::is_none")] - pub update_items: Option>, - /// + pub update_items: Option>, + /// 待删除的配置项列表 #[serde(rename = "deleteItems", skip_serializing_if = "Option::is_none")] - pub delete_items: Option>, + pub delete_items: Option>, } -impl ItemChangeSets { - pub fn new() -> ItemChangeSets { - ItemChangeSets { +impl OpenItemChangeSets { + pub fn new() -> OpenItemChangeSets { + OpenItemChangeSets { data_change_created_by: None, data_change_last_modified_by: None, data_change_created_by_display_name: None, @@ -57,4 +57,3 @@ impl ItemChangeSets { } } } - diff --git a/rust/src/models/open_item_diffs.rs b/rust/src/models/open_item_diffs.rs new file mode 100644 index 00000000..cef8e8d2 --- /dev/null +++ b/rust/src/models/open_item_diffs.rs @@ -0,0 +1,33 @@ +/* + * 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 OpenItemDiffs { + #[serde(rename = "namespace", skip_serializing_if = "Option::is_none")] + pub namespace: Option>, + #[serde(rename = "diffs", skip_serializing_if = "Option::is_none")] + pub diffs: Option>, + /// 扩展信息 + #[serde(rename = "extInfo", skip_serializing_if = "Option::is_none")] + pub ext_info: Option, +} + +impl OpenItemDiffs { + pub fn new() -> OpenItemDiffs { + OpenItemDiffs { + namespace: None, + diffs: None, + ext_info: None, + } + } +} diff --git a/rust/src/models/open_item_dto.rs b/rust/src/models/open_item_dto.rs index f104f24c..180eae63 100644 --- a/rust/src/models/open_item_dto.rs +++ b/rust/src/models/open_item_dto.rs @@ -1,18 +1,18 @@ /* * Apollo OpenAPI * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 */ -use crate::models; -use serde::{Deserialize, Serialize}; - /// OpenItemDto : Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct OpenItemDto { /// 配置项创建者用户名,记录是谁创建了这个配置项 #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] @@ -55,4 +55,3 @@ impl OpenItemDto { } } } - diff --git a/rust/src/models/open_namespace_dto.rs b/rust/src/models/open_namespace_dto.rs index 0606b01f..6b9bd6c0 100644 --- a/rust/src/models/open_namespace_dto.rs +++ b/rust/src/models/open_namespace_dto.rs @@ -1,18 +1,18 @@ /* * Apollo OpenAPI * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 */ -use crate::models; -use serde::{Deserialize, Serialize}; - /// OpenNamespaceDto : Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct OpenNamespaceDto { /// 命名空间创建者用户名,记录是谁创建了这个命名空间 #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] @@ -46,7 +46,7 @@ pub struct OpenNamespaceDto { pub is_public: Option, /// 命名空间包含的配置项列表 #[serde(rename = "items", skip_serializing_if = "Option::is_none")] - pub items: Option>, + pub items: Option>, } impl OpenNamespaceDto { @@ -67,4 +67,3 @@ impl OpenNamespaceDto { } } } - diff --git a/rust/src/models/open_namespace_identifier.rs b/rust/src/models/open_namespace_identifier.rs new file mode 100644 index 00000000..4d3578e0 --- /dev/null +++ b/rust/src/models/open_namespace_identifier.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 OpenNamespaceIdentifier { + /// 应用唯一标识 + #[serde(rename = "appId", skip_serializing_if = "Option::is_none")] + pub app_id: Option, + /// 环境标识 + #[serde(rename = "env", skip_serializing_if = "Option::is_none")] + pub env: Option, + /// 集群名称 + #[serde(rename = "clusterName", skip_serializing_if = "Option::is_none")] + pub cluster_name: Option, + /// 命名空间名称 + #[serde(rename = "namespaceName", skip_serializing_if = "Option::is_none")] + pub namespace_name: Option, +} + +impl OpenNamespaceIdentifier { + pub fn new() -> OpenNamespaceIdentifier { + OpenNamespaceIdentifier { + app_id: None, + env: None, + cluster_name: None, + namespace_name: None, + } + } +} diff --git a/rust/src/models/open_namespace_lock_dto.rs b/rust/src/models/open_namespace_lock_dto.rs index fb48ebbf..92eca8dc 100644 --- a/rust/src/models/open_namespace_lock_dto.rs +++ b/rust/src/models/open_namespace_lock_dto.rs @@ -1,18 +1,18 @@ /* * Apollo OpenAPI * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 */ -use crate::models; -use serde::{Deserialize, Serialize}; - /// OpenNamespaceLockDto : Apollo命名空间锁状态数据传输对象 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct OpenNamespaceLockDto { /// 命名空间名称 #[serde(rename = "namespaceName", skip_serializing_if = "Option::is_none")] @@ -35,4 +35,3 @@ impl OpenNamespaceLockDto { } } } - diff --git a/rust/src/models/open_namespace_sync_model.rs b/rust/src/models/open_namespace_sync_model.rs new file mode 100644 index 00000000..f822b6af --- /dev/null +++ b/rust/src/models/open_namespace_sync_model.rs @@ -0,0 +1,31 @@ +/* + * 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 OpenNamespaceSyncModel { + /// 目标命名空间标识列表 + #[serde(rename = "syncToNamespaces", skip_serializing_if = "Option::is_none")] + pub sync_to_namespaces: Option>, + /// 需要同步的配置项列表 + #[serde(rename = "syncItems", skip_serializing_if = "Option::is_none")] + pub sync_items: Option>, +} + +impl OpenNamespaceSyncModel { + pub fn new() -> OpenNamespaceSyncModel { + OpenNamespaceSyncModel { + sync_to_namespaces: None, + sync_items: None, + } + } +} diff --git a/rust/src/models/namespace_text_model.rs b/rust/src/models/open_namespace_text_model.rs similarity index 51% rename from rust/src/models/namespace_text_model.rs rename to rust/src/models/open_namespace_text_model.rs index 423db9c8..29bbcfc3 100644 --- a/rust/src/models/namespace_text_model.rs +++ b/rust/src/models/open_namespace_text_model.rs @@ -1,47 +1,47 @@ /* * Apollo OpenAPI * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 */ -use crate::models; -use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct NamespaceTextModel { - /// + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct OpenNamespaceTextModel { + /// 应用唯一标识 #[serde(rename = "appId", skip_serializing_if = "Option::is_none")] pub app_id: Option, - /// + /// 环境标识 #[serde(rename = "env", skip_serializing_if = "Option::is_none")] pub env: Option, - /// + /// 集群名称 #[serde(rename = "clusterName", skip_serializing_if = "Option::is_none")] pub cluster_name: Option, - /// + /// 命名空间名称 #[serde(rename = "namespaceName", skip_serializing_if = "Option::is_none")] pub namespace_name: Option, - /// + /// 命名空间ID #[serde(rename = "namespaceId", skip_serializing_if = "Option::is_none")] pub namespace_id: Option, - /// + /// 命名空间格式类型(properties/xml/json/yml等) #[serde(rename = "format", skip_serializing_if = "Option::is_none")] pub format: Option, - /// + /// 配置内容的原始文本 #[serde(rename = "configText", skip_serializing_if = "Option::is_none")] pub config_text: Option, - /// + /// 操作者用户名 #[serde(rename = "operator", skip_serializing_if = "Option::is_none")] pub operator: Option, } -impl NamespaceTextModel { - pub fn new() -> NamespaceTextModel { - NamespaceTextModel { +impl OpenNamespaceTextModel { + pub fn new() -> OpenNamespaceTextModel { + OpenNamespaceTextModel { app_id: None, env: None, cluster_name: None, @@ -53,4 +53,3 @@ impl NamespaceTextModel { } } } - diff --git a/rust/src/models/open_organization_dto.rs b/rust/src/models/open_organization_dto.rs index bba5d4d6..9fb19b6f 100644 --- a/rust/src/models/open_organization_dto.rs +++ b/rust/src/models/open_organization_dto.rs @@ -1,22 +1,22 @@ /* * Apollo OpenAPI * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 */ -use crate::models; -use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct OpenOrganizationDto { - /// + /// 组织ID #[serde(rename = "orgId", skip_serializing_if = "Option::is_none")] pub org_id: Option, - /// + /// 组织名称 #[serde(rename = "orgName", skip_serializing_if = "Option::is_none")] pub org_name: Option, } @@ -29,4 +29,3 @@ impl OpenOrganizationDto { } } } - diff --git a/rust/src/models/open_page_dto_open_instance_dto.rs b/rust/src/models/open_page_dto_open_instance_dto.rs index 55a03f42..816ece7d 100644 --- a/rust/src/models/open_page_dto_open_instance_dto.rs +++ b/rust/src/models/open_page_dto_open_instance_dto.rs @@ -1,18 +1,18 @@ /* * Apollo OpenAPI * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 */ -use crate::models; -use serde::{Deserialize, Serialize}; - /// OpenPageDtoOpenInstanceDto : 分页实例数据传输对象,用于返回分页查询的实例列表结果 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct OpenPageDtoOpenInstanceDto { /// 当前页码,从0开始计数 #[serde(rename = "page", skip_serializing_if = "Option::is_none")] @@ -25,7 +25,7 @@ pub struct OpenPageDtoOpenInstanceDto { pub total: Option, /// 当前页的实例列表,包含具体的实例数据 #[serde(rename = "content", skip_serializing_if = "Option::is_none")] - pub content: Option>, + pub content: Option>, } impl OpenPageDtoOpenInstanceDto { @@ -39,4 +39,3 @@ impl OpenPageDtoOpenInstanceDto { } } } - diff --git a/rust/src/models/open_page_dto_open_item_dto.rs b/rust/src/models/open_page_dto_open_item_dto.rs index 75c82c6b..556e71d9 100644 --- a/rust/src/models/open_page_dto_open_item_dto.rs +++ b/rust/src/models/open_page_dto_open_item_dto.rs @@ -1,18 +1,18 @@ /* * Apollo OpenAPI * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 */ -use crate::models; -use serde::{Deserialize, Serialize}; - /// OpenPageDtoOpenItemDto : 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct OpenPageDtoOpenItemDto { /// 当前页码,从0开始计数 #[serde(rename = "page", skip_serializing_if = "Option::is_none")] @@ -25,7 +25,7 @@ pub struct OpenPageDtoOpenItemDto { pub total: Option, /// 当前页的配置项列表,包含具体的配置项数据 #[serde(rename = "content", skip_serializing_if = "Option::is_none")] - pub content: Option>, + pub content: Option>, } impl OpenPageDtoOpenItemDto { @@ -39,4 +39,3 @@ impl OpenPageDtoOpenItemDto { } } } - diff --git a/rust/src/models/open_release_bo.rs b/rust/src/models/open_release_bo.rs new file mode 100644 index 00000000..cf062bc8 --- /dev/null +++ b/rust/src/models/open_release_bo.rs @@ -0,0 +1,29 @@ +/* + * 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 OpenReleaseBo { + #[serde(rename = "baseInfo", skip_serializing_if = "Option::is_none")] + pub base_info: Option>, + #[serde(rename = "items", skip_serializing_if = "Option::is_none")] + pub items: Option>, +} + +impl OpenReleaseBo { + pub fn new() -> OpenReleaseBo { + OpenReleaseBo { + base_info: None, + items: None, + } + } +} diff --git a/rust/src/models/open_release_dto.rs b/rust/src/models/open_release_dto.rs index b7dd4f60..8211b014 100644 --- a/rust/src/models/open_release_dto.rs +++ b/rust/src/models/open_release_dto.rs @@ -1,18 +1,18 @@ /* * Apollo OpenAPI * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 */ -use crate::models; -use serde::{Deserialize, Serialize}; - /// OpenReleaseDto : Apollo发布信息数据传输对象,表示一次配置发布的完整信息 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct OpenReleaseDto { /// 发布创建者用户名,记录是谁创建了这次发布 #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] @@ -42,7 +42,7 @@ pub struct OpenReleaseDto { #[serde(rename = "name", skip_serializing_if = "Option::is_none")] pub name: Option, #[serde(rename = "configurations", skip_serializing_if = "Option::is_none")] - pub configurations: Option>, + pub configurations: Option<::std::collections::HashMap>, /// 发布备注,描述本次发布的变更内容和目的 #[serde(rename = "comment", skip_serializing_if = "Option::is_none")] pub comment: Option, @@ -66,4 +66,3 @@ impl OpenReleaseDto { } } } - diff --git a/rust/src/models/release_dto.rs b/rust/src/models/release_dto.rs deleted file mode 100644 index 939ec6b3..00000000 --- a/rust/src/models/release_dto.rs +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ReleaseDto { - /// - #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] - pub data_change_created_by: Option, - /// - #[serde(rename = "dataChangeLastModifiedBy", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_by: Option, - /// - #[serde(rename = "dataChangeCreatedByDisplayName", skip_serializing_if = "Option::is_none")] - pub data_change_created_by_display_name: Option, - /// - #[serde(rename = "dataChangeLastModifiedByDisplayName", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_by_display_name: Option, - /// - #[serde(rename = "dataChangeCreatedTime", skip_serializing_if = "Option::is_none")] - pub data_change_created_time: Option, - /// - #[serde(rename = "dataChangeLastModifiedTime", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_time: Option, - /// - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - /// - #[serde(rename = "releaseKey", skip_serializing_if = "Option::is_none")] - pub release_key: Option, - /// - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - /// - #[serde(rename = "appId", skip_serializing_if = "Option::is_none")] - pub app_id: Option, - /// - #[serde(rename = "clusterName", skip_serializing_if = "Option::is_none")] - pub cluster_name: Option, - /// - #[serde(rename = "namespaceName", skip_serializing_if = "Option::is_none")] - pub namespace_name: Option, - /// - #[serde(rename = "configurations", skip_serializing_if = "Option::is_none")] - pub configurations: Option, - /// - #[serde(rename = "comment", skip_serializing_if = "Option::is_none")] - pub comment: Option, - /// - #[serde(rename = "isAbandoned", skip_serializing_if = "Option::is_none")] - pub is_abandoned: Option, -} - -impl ReleaseDto { - pub fn new() -> ReleaseDto { - ReleaseDto { - data_change_created_by: None, - data_change_last_modified_by: None, - data_change_created_by_display_name: None, - data_change_last_modified_by_display_name: None, - data_change_created_time: None, - data_change_last_modified_time: None, - id: None, - release_key: None, - name: None, - app_id: None, - cluster_name: None, - namespace_name: None, - configurations: None, - comment: None, - is_abandoned: None, - } - } -} - diff --git a/rust/src/models/rich_response_entity.rs b/rust/src/models/rich_response_entity.rs new file mode 100644 index 00000000..a5c2b66a --- /dev/null +++ b/rust/src/models/rich_response_entity.rs @@ -0,0 +1,37 @@ +/* + * 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 + */ + +/// RichResponseEntity : A wrapper for a single response entity with code, message, and body + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct RichResponseEntity { + /// HTTP status code + #[serde(rename = "code")] + pub code: i32, + /// Response message (can be string or object) + #[serde(rename = "message")] + pub message: serde_json::Value, + /// Response payload (generic type T) + #[serde(rename = "body", skip_serializing_if = "Option::is_none")] + pub body: Option, +} + +impl RichResponseEntity { + /// A wrapper for a single response entity with code, message, and body + pub fn new(code: i32, message: serde_json::Value) -> RichResponseEntity { + RichResponseEntity { + code, + message, + body: None, + } + } +} diff --git a/spring-boot2/.openapi-generator/FILES b/spring-boot2/.openapi-generator/FILES index 4d3297e3..46c06f31 100644 --- a/spring-boot2/.openapi-generator/FILES +++ b/spring-boot2/.openapi-generator/FILES @@ -30,44 +30,34 @@ src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiController.java src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiDelegate.java src/main/java/com/apollo/openapi/server/config/HomeController.java src/main/java/com/apollo/openapi/server/config/SpringDocConfiguration.java -src/main/java/com/apollo/openapi/server/model/Change.java -src/main/java/com/apollo/openapi/server/model/ClusterDTO.java -src/main/java/com/apollo/openapi/server/model/EntityPairKVEntity.java -src/main/java/com/apollo/openapi/server/model/EnvClusterInfo.java -src/main/java/com/apollo/openapi/server/model/ItemChangeSets.java -src/main/java/com/apollo/openapi/server/model/ItemDTO.java src/main/java/com/apollo/openapi/server/model/KVEntity.java -src/main/java/com/apollo/openapi/server/model/ListItemDiffs.java -src/main/java/com/apollo/openapi/server/model/ListReleaseBO.java -src/main/java/com/apollo/openapi/server/model/MapString.java +src/main/java/com/apollo/openapi/server/model/MultiResponseEntity.java src/main/java/com/apollo/openapi/server/model/NamespaceGrayDelReleaseDTO.java -src/main/java/com/apollo/openapi/server/model/NamespaceIdentifier.java src/main/java/com/apollo/openapi/server/model/NamespaceReleaseDTO.java -src/main/java/com/apollo/openapi/server/model/NamespaceSyncModel.java -src/main/java/com/apollo/openapi/server/model/NamespaceTextModel.java src/main/java/com/apollo/openapi/server/model/OpenAppDTO.java src/main/java/com/apollo/openapi/server/model/OpenAppNamespaceDTO.java src/main/java/com/apollo/openapi/server/model/OpenClusterDTO.java src/main/java/com/apollo/openapi/server/model/OpenCreateAppDTO.java src/main/java/com/apollo/openapi/server/model/OpenEnvClusterDTO.java +src/main/java/com/apollo/openapi/server/model/OpenEnvClusterInfo.java src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleDTO.java src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleItemDTO.java src/main/java/com/apollo/openapi/server/model/OpenInstanceConfigDTO.java src/main/java/com/apollo/openapi/server/model/OpenInstanceDTO.java +src/main/java/com/apollo/openapi/server/model/OpenItemChangeSets.java src/main/java/com/apollo/openapi/server/model/OpenItemDTO.java +src/main/java/com/apollo/openapi/server/model/OpenItemDiffs.java src/main/java/com/apollo/openapi/server/model/OpenNamespaceDTO.java +src/main/java/com/apollo/openapi/server/model/OpenNamespaceIdentifier.java src/main/java/com/apollo/openapi/server/model/OpenNamespaceLockDTO.java +src/main/java/com/apollo/openapi/server/model/OpenNamespaceSyncModel.java +src/main/java/com/apollo/openapi/server/model/OpenNamespaceTextModel.java src/main/java/com/apollo/openapi/server/model/OpenOrganizationDto.java src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenInstanceDTO.java src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenItemDTO.java +src/main/java/com/apollo/openapi/server/model/OpenReleaseBO.java src/main/java/com/apollo/openapi/server/model/OpenReleaseDTO.java -src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsGet401Response.java -src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsPost400Response.java -src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsPostRequest.java -src/main/java/com/apollo/openapi/server/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.java -src/main/java/com/apollo/openapi/server/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.java -src/main/java/com/apollo/openapi/server/model/OpenapiV1EnvsEnvReleasesCompareGet200Response.java -src/main/java/com/apollo/openapi/server/model/ReleaseDTO.java +src/main/java/com/apollo/openapi/server/model/RichResponseEntity.java src/main/resources/application.properties src/main/resources/openapi.yaml src/test/java/com/apollo/openapi/server/OpenApiGeneratorApplicationTests.java diff --git a/spring-boot2/.openapi-generator/VERSION b/spring-boot2/.openapi-generator/VERSION index 368fd8fd..826f5ce0 100644 --- a/spring-boot2/.openapi-generator/VERSION +++ b/spring-boot2/.openapi-generator/VERSION @@ -1 +1 @@ -7.15.0 +6.6.0 diff --git a/spring-boot2/README.md b/spring-boot2/README.md index 5cd22b60..d43a1de3 100644 --- a/spring-boot2/README.md +++ b/spring-boot2/README.md @@ -1,21 +1,27 @@ -# OpenAPI generated server -Spring Boot Server +# OpenAPI generated API stub -## Overview -This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. -By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. -This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. +Spring Framework stub -The underlying library integrating OpenAPI to Spring Boot is [springdoc](https://springdoc.org). -Springdoc will generate an OpenAPI v3 specification based on the generated Controller and Model classes. -The specification is available to download using the following url: -http://localhost:8080/v3/api-docs/ +## Overview +This code was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an API stub. +This is an example of building API stub interfaces in Java using the Spring framework. -Start your server as a simple java application +The stubs generated can be used in your existing Spring-MVC or Spring-Boot application to create controller endpoints +by adding ```@Controller``` classes that implement the interface. Eg: +```java +@Controller +public class PetController implements PetApi { +// implement all PetApi methods +} +``` -You can view the api documentation in swagger-ui by pointing to -http://localhost:8080/swagger-ui.html +You can also use the interface to create [Spring-Cloud Feign clients](http://projects.spring.io/spring-cloud/spring-cloud.html#spring-cloud-feign-inheritance).Eg: +```java +@FeignClient(name="pet", url="http://petstore.swagger.io/v2") +public interface PetClient extends PetApi { -Change default port value in application.properties \ No newline at end of file +} +``` diff --git a/spring-boot2/pom.xml b/spring-boot2/pom.xml index dff1d9ca..8b470b65 100644 --- a/spring-boot2/pom.xml +++ b/spring-boot2/pom.xml @@ -11,24 +11,16 @@ ${java.version} UTF-8 1.6.14 - 5.3.1 + 4.15.5 org.springframework.boot spring-boot-starter-parent - 2.7.15 + 2.7.6 src/main/java - - - org.springframework.boot - spring-boot-maven-plugin - - - - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/OpenApiGeneratorApplication.java b/spring-boot2/src/main/java/com/apollo/openapi/server/OpenApiGeneratorApplication.java index b9eb8164..644633a0 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/OpenApiGeneratorApplication.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/OpenApiGeneratorApplication.java @@ -27,4 +27,4 @@ public Module jsonNullableModule() { return new JsonNullableModule(); } -} \ No newline at end of file +} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/RFC3339DateFormat.java b/spring-boot2/src/main/java/com/apollo/openapi/server/RFC3339DateFormat.java index 09cf8573..53fb8010 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/RFC3339DateFormat.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/RFC3339DateFormat.java @@ -35,4 +35,4 @@ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fie public Object clone() { return this; } -} \ No newline at end of file +} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApi.java index fed95106..1b1f7b9a 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 @@ -1,17 +1,15 @@ -/* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.15.0). +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.6.0). * https://openapi-generator.tech * Do not edit the class manually. */ package com.apollo.openapi.server.api; -import com.apollo.openapi.server.model.EnvClusterInfo; import java.util.Map; +import com.apollo.openapi.server.model.MultiResponseEntity; 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.OpenapiV1AppsGet401Response; -import com.apollo.openapi.server.model.OpenapiV1AppsPost400Response; -import com.apollo.openapi.server.model.OpenapiV1AppsPostRequest; import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -23,8 +21,6 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; -import io.swagger.v3.oas.annotations.media.ExampleObject; -import org.springframework.lang.Nullable; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -36,7 +32,7 @@ import java.util.Map; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") @Validated @Tag(name = "App Management", description = "应用管理相关接口,包括应用的创建、查询、更新、删除等操作") public interface AppManagementApi { @@ -45,23 +41,29 @@ default AppManagementApiDelegate getDelegate() { return new AppManagementApiDelegate() {}; } - public static final String PATH_OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_NAMESPACE_NAME_DELETE = "/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}"; /** - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} : 删除AppNamespace - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * POST /openapi/v1/apps : 创建应用 (original openapi) + * POST /openapi/v1/apps * - * @param appId (required) - * @param namespaceName (required) - * @return (status code 200) + * @param openCreateAppDTO (required) + * @return 应用创建成功 (status code 200) + * or 请求参数错误 (status code 400) + * or 权限不足 (status code 403) */ @Operation( - operationId = "openapiV1AppsAppIdAppnamespacesNamespaceNameDelete", - summary = "删除AppNamespace", - description = "DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}", + operationId = "createApp", + summary = "创建应用 (original openapi)", + description = "POST /openapi/v1/apps", tags = { "App Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { + @ApiResponse(responseCode = "200", description = "应用创建成功", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) + }), + @ApiResponse(responseCode = "400", description = "请求参数错误", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + }), + @ApiResponse(responseCode = "403", description = "权限不足", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }) }, security = { @@ -69,43 +71,43 @@ default AppManagementApiDelegate getDelegate() { } ) @RequestMapping( - method = RequestMethod.DELETE, - value = AppManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_NAMESPACE_NAME_DELETE, - produces = { "application/json" } + method = RequestMethod.POST, + value = "/openapi/v1/apps", + produces = { "application/json" }, + consumes = { "application/json" } ) - - default ResponseEntity openapiV1AppsAppIdAppnamespacesNamespaceNameDelete( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName + default ResponseEntity createApp( + @Parameter(name = "OpenCreateAppDTO", description = "", required = true) @Valid @RequestBody OpenCreateAppDTO openCreateAppDTO ) { - return getDelegate().openapiV1AppsAppIdAppnamespacesNamespaceNameDelete(appId, namespaceName); + return getDelegate().createApp(openCreateAppDTO); } - public static final String PATH_OPENAPI_V1_APPS_APP_ID_DELETE = "/openapi/v1/apps/{appId}"; /** - * DELETE /openapi/v1/apps/{appId} : 删除应用 - * DELETE /openapi/v1/apps/{appId} + * POST /openapi/v1/apps/envs/{env} : 在指定环境创建应用(new added) + * POST /openapi/v1/apps/envs/{env} * - * @param appId (required) - * @return 应用删除成功 (status code 200) - * or 权限不足,需要超级管理员权限 (status code 403) - * or 应用不存在 (status code 404) + * @param env 环境标识,例如 DEV、FAT、UAT、PROD (required) + * @param operator 操作人用户名 (required) + * @param openAppDTO (required) + * @return 应用在指定环境创建成功 (status code 200) + * or 请求参数错误 (status code 400) + * or 权限不足 (status code 403) */ @Operation( - operationId = "openapiV1AppsAppIdDelete", - summary = "删除应用", - description = "DELETE /openapi/v1/apps/{appId}", + operationId = "createAppInEnv", + summary = "在指定环境创建应用(new added)", + description = "POST /openapi/v1/apps/envs/{env}", tags = { "App Management" }, responses = { - @ApiResponse(responseCode = "200", description = "应用删除成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @ApiResponse(responseCode = "200", description = "应用在指定环境创建成功", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }), - @ApiResponse(responseCode = "403", description = "权限不足,需要超级管理员权限", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @ApiResponse(responseCode = "400", description = "请求参数错误", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }), - @ApiResponse(responseCode = "404", description = "应用不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @ApiResponse(responseCode = "403", description = "权限不足", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }) }, security = { @@ -113,38 +115,44 @@ default ResponseEntity openapiV1AppsAppIdAppnamespacesNamespaceNameDelet } ) @RequestMapping( - method = RequestMethod.DELETE, - value = AppManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_DELETE, - produces = { "application/json" } + method = RequestMethod.POST, + value = "/openapi/v1/apps/envs/{env}", + produces = { "application/json" }, + consumes = { "application/json" } ) - - default ResponseEntity openapiV1AppsAppIdDelete( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId + 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 ) { - return getDelegate().openapiV1AppsAppIdDelete(appId); + return getDelegate().createAppInEnv(env, operator, openAppDTO); } - public static final String PATH_OPENAPI_V1_APPS_APP_ID_ENV_CLUSTERS_GET = "/openapi/v1/apps/{appId}/env-clusters"; /** - * GET /openapi/v1/apps/{appId}/env-clusters : 获取应用的环境集群信息 - * GET /openapi/v1/apps/{appId}/env-clusters + * DELETE /openapi/v1/apps/{appId} : 删除应用(new added) + * DELETE /openapi/v1/apps/{appId} * - * @param appId (required) - * @return 成功获取应用环境集群信息 (status code 200) + * @param appId 应用ID (required) + * @param operator 操作人用户名 (required) + * @return 应用删除成功 (status code 200) + * or 权限不足,需要超级管理员权限 (status code 403) * or 应用不存在 (status code 404) */ @Operation( - operationId = "openapiV1AppsAppIdEnvClustersGet", - summary = "获取应用的环境集群信息", - description = "GET /openapi/v1/apps/{appId}/env-clusters", + operationId = "deleteApp", + summary = "删除应用(new added)", + description = "DELETE /openapi/v1/apps/{appId}", tags = { "App Management" }, responses = { - @ApiResponse(responseCode = "200", description = "成功获取应用环境集群信息", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenEnvClusterDTO.class))) + @ApiResponse(responseCode = "200", description = "应用删除成功", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) + }), + @ApiResponse(responseCode = "403", description = "权限不足,需要超级管理员权限", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }), @ApiResponse(responseCode = "404", description = "应用不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }) }, security = { @@ -152,37 +160,37 @@ default ResponseEntity openapiV1AppsAppIdDelete( } ) @RequestMapping( - method = RequestMethod.GET, - value = AppManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_ENV_CLUSTERS_GET, + method = RequestMethod.DELETE, + value = "/openapi/v1/apps/{appId}", produces = { "application/json" } ) - - default ResponseEntity> openapiV1AppsAppIdEnvClustersGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId + 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 ) { - return getDelegate().openapiV1AppsAppIdEnvClustersGet(appId); + return getDelegate().deleteApp(appId, operator); } - public static final String PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_LINKS_DELETE = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links"; /** - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links : 删除关联的Namespace - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links + * GET /openapi/v1/apps : 查找应用 (original openapi) + * POST /openapi/v1/apps * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return (status code 200) + * @param appIds 查找应用 (optional) + * @return 成功获取应用列表 (status code 200) + * or 未授权访问 (status code 401) */ @Operation( - operationId = "openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete", - summary = "删除关联的Namespace", - description = "DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links", + operationId = "findApps", + summary = "查找应用 (original openapi)", + description = "POST /openapi/v1/apps", tags = { "App Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) + @ApiResponse(responseCode = "200", description = "成功获取应用列表", content = { + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenAppDTO.class))) + }), + @ApiResponse(responseCode = "401", description = "未授权访问", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }) }, security = { @@ -190,41 +198,35 @@ default ResponseEntity> openapiV1AppsAppIdEnvClustersGet } ) @RequestMapping( - method = RequestMethod.DELETE, - value = AppManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_LINKS_DELETE, + method = RequestMethod.GET, + value = "/openapi/v1/apps", produces = { "application/json" } ) - - default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName + default ResponseEntity> findApps( + @Parameter(name = "appIds", description = "查找应用", in = ParameterIn.QUERY) @Valid @RequestParam(value = "appIds", required = false) String appIds ) { - return getDelegate().openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete(appId, env, clusterName, namespaceName); + return getDelegate().findApps(appIds); } - public static final String PATH_OPENAPI_V1_APPS_APP_ID_GET = "/openapi/v1/apps/{appId}"; /** - * GET /openapi/v1/apps/{appId} : 获取单个应用信息 - * GET /openapi/v1/apps/{appId} + * GET /openapi/v1/apps/authorized : 获取当前Consumer授权的应用列表 (original openapi) + * GET /openapi/v1/apps/authorized * - * @param appId (required) - * @return 成功获取应用信息 (status code 200) - * or 应用不存在 (status code 404) + * @return 成功获取授权应用列表 (status code 200) + * or 未授权访问 (status code 401) */ @Operation( - operationId = "openapiV1AppsAppIdGet", - summary = "获取单个应用信息", - description = "GET /openapi/v1/apps/{appId}", + operationId = "findAppsAuthorized", + summary = "获取当前Consumer授权的应用列表 (original openapi)", + description = "GET /openapi/v1/apps/authorized", tags = { "App Management" }, responses = { - @ApiResponse(responseCode = "200", description = "成功获取应用信息", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenAppDTO.class)) + @ApiResponse(responseCode = "200", description = "成功获取授权应用列表", content = { + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenAppDTO.class))) }), - @ApiResponse(responseCode = "404", description = "应用不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @ApiResponse(responseCode = "401", description = "未授权访问", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }) }, security = { @@ -233,37 +235,35 @@ default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNames ) @RequestMapping( method = RequestMethod.GET, - value = AppManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_GET, + value = "/openapi/v1/apps/authorized", produces = { "application/json" } ) - - default ResponseEntity openapiV1AppsAppIdGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId + default ResponseEntity> findAppsAuthorized( + ) { - return getDelegate().openapiV1AppsAppIdGet(appId); + return getDelegate().findAppsAuthorized(); } - public static final String PATH_OPENAPI_V1_APPS_APP_ID_MISS_ENVS_GET = "/openapi/v1/apps/{appId}/miss_envs"; /** - * 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 (required) + * @param appId 应用ID (required) * @return 成功获取应用缺失的环境列表 (status code 200) * or 应用不存在 (status code 404) */ @Operation( - operationId = "openapiV1AppsAppIdMissEnvsGet", - summary = "查找缺失的环境", + operationId = "findMissEnvs", + summary = "查找缺失的环境(new added)", description = "GET /openapi/v1/apps/{appId}/miss_envs", tags = { "App Management" }, responses = { @ApiResponse(responseCode = "200", description = "成功获取应用缺失的环境列表", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = String.class))) + @Content(mediaType = "application/json", schema = @Schema(implementation = MultiResponseEntity.class)) }), @ApiResponse(responseCode = "404", description = "应用不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }) }, security = { @@ -272,32 +272,36 @@ default ResponseEntity openapiV1AppsAppIdGet( ) @RequestMapping( method = RequestMethod.GET, - value = AppManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_MISS_ENVS_GET, + value = "/openapi/v1/apps/{appId}/miss_envs", produces = { "application/json" } ) - - default ResponseEntity> openapiV1AppsAppIdMissEnvsGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId + default ResponseEntity findMissEnvs( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId ) { - return getDelegate().openapiV1AppsAppIdMissEnvsGet(appId); + return getDelegate().findMissEnvs(appId); } - public static final String PATH_OPENAPI_V1_APPS_APP_ID_NAMESPACES_RELEASES_STATUS_GET = "/openapi/v1/apps/{appId}/namespaces/releases/status"; /** - * GET /openapi/v1/apps/{appId}/namespaces/releases/status : 获取应用下所有Namespace的发布状态 - * GET /openapi/v1/apps/{appId}/namespaces/releases/status + * GET /openapi/v1/apps/{appId} : 获取单个应用信息(new added) + * GET /openapi/v1/apps/{appId} * * @param appId (required) - * @return (status code 200) + * @return 成功获取应用信息 (status code 200) + * or 应用不存在 (status code 404) */ @Operation( - operationId = "openapiV1AppsAppIdNamespacesReleasesStatusGet", - summary = "获取应用下所有Namespace的发布状态", - description = "GET /openapi/v1/apps/{appId}/namespaces/releases/status", + operationId = "getApp", + summary = "获取单个应用信息(new added)", + description = "GET /openapi/v1/apps/{appId}", tags = { "App Management" }, responses = { - @ApiResponse(responseCode = "200", description = "") + @ApiResponse(responseCode = "200", description = "成功获取应用信息", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenAppDTO.class)) + }), + @ApiResponse(responseCode = "404", description = "应用不存在", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + }) }, security = { @SecurityRequirement(name = "ApiKeyAuth") @@ -305,33 +309,31 @@ default ResponseEntity> openapiV1AppsAppIdMissEnvsGet( ) @RequestMapping( method = RequestMethod.GET, - value = AppManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_NAMESPACES_RELEASES_STATUS_GET, + value = "/openapi/v1/apps/{appId}", produces = { "application/json" } ) - - default ResponseEntity>> openapiV1AppsAppIdNamespacesReleasesStatusGet( + default ResponseEntity getApp( @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId ) { - return getDelegate().openapiV1AppsAppIdNamespacesReleasesStatusGet(appId); + return getDelegate().getApp(appId); } - public static final String PATH_OPENAPI_V1_APPS_APP_ID_NAVTREE_GET = "/openapi/v1/apps/{appId}/navtree"; /** - * GET /openapi/v1/apps/{appId}/navtree : 获取应用导航树 + * GET /openapi/v1/apps/{appId}/navtree : 获取应用导航树(new added) * GET /openapi/v1/apps/{appId}/navtree * - * @param appId (required) + * @param appId 应用ID (required) * @return 成功获取应用导航树 (status code 200) */ @Operation( - operationId = "openapiV1AppsAppIdNavtreeGet", - summary = "获取应用导航树", + operationId = "getAppNavTree", + summary = "获取应用导航树(new added)", description = "GET /openapi/v1/apps/{appId}/navtree", tags = { "App Management" }, responses = { @ApiResponse(responseCode = "200", description = "成功获取应用导航树", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = EnvClusterInfo.class))) + @Content(mediaType = "application/json", schema = @Schema(implementation = MultiResponseEntity.class)) }) }, security = { @@ -340,74 +342,28 @@ default ResponseEntity>> openapiV1AppsAppIdName ) @RequestMapping( method = RequestMethod.GET, - value = AppManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_NAVTREE_GET, + value = "/openapi/v1/apps/{appId}/navtree", produces = { "application/json" } ) - - default ResponseEntity> openapiV1AppsAppIdNavtreeGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId + default ResponseEntity getAppNavTree( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId ) { - return getDelegate().openapiV1AppsAppIdNavtreeGet(appId); + return getDelegate().getAppNavTree(appId); } - public static final String PATH_OPENAPI_V1_APPS_APP_ID_PUT = "/openapi/v1/apps/{appId}"; /** - * PUT /openapi/v1/apps/{appId} : 更新应用 - * PUT /openapi/v1/apps/{appId} - * - * @param appId (required) - * @param openAppDTO (required) - * @return (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - */ - @Operation( - operationId = "openapiV1AppsAppIdPut", - summary = "更新应用", - description = "PUT /openapi/v1/apps/{appId}", - tags = { "App Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenAppDTO.class)) - }), - @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) - }), - @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.PUT, - value = AppManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_PUT, - produces = { "application/json" }, - consumes = { "application/json" } - ) - - default ResponseEntity openapiV1AppsAppIdPut( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "OpenAppDTO", description = "", required = true) @Valid @RequestBody OpenAppDTO openAppDTO - ) { - return getDelegate().openapiV1AppsAppIdPut(appId, openAppDTO); - } - - - public static final String PATH_OPENAPI_V1_APPS_BY_SELF_GET = "/openapi/v1/apps/by-self"; - /** - * GET /openapi/v1/apps/by-self : 获取当前Consumer的应用列表(分页) + * GET /openapi/v1/apps/by-self : 获取当前Consumer的应用列表(分页)(new added) * GET /openapi/v1/apps/by-self * + * @param page 页数 (required) + * @param size 页大小 (required) * @return 成功获取Consumer的应用列表 (status code 200) * or 未授权访问 (status code 401) */ @Operation( - operationId = "openapiV1AppsBySelfGet", - summary = "获取当前Consumer的应用列表(分页)", + operationId = "getAppsBySelf", + summary = "获取当前Consumer的应用列表(分页)(new added)", description = "GET /openapi/v1/apps/by-self", tags = { "App Management" }, responses = { @@ -415,7 +371,7 @@ default ResponseEntity openapiV1AppsAppIdPut( @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenAppDTO.class))) }), @ApiResponse(responseCode = "401", description = "未授权访问", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }) }, security = { @@ -424,83 +380,36 @@ default ResponseEntity openapiV1AppsAppIdPut( ) @RequestMapping( method = RequestMethod.GET, - value = AppManagementApi.PATH_OPENAPI_V1_APPS_BY_SELF_GET, + value = "/openapi/v1/apps/by-self", produces = { "application/json" } ) - - default ResponseEntity> openapiV1AppsBySelfGet( - - ) { - return getDelegate().openapiV1AppsBySelfGet(); - } - - - public static final String PATH_OPENAPI_V1_APPS_ENVS_ENV_POST = "/openapi/v1/apps/envs/{env}"; - /** - * POST /openapi/v1/apps/envs/{env} : 在指定环境创建应用 - * POST /openapi/v1/apps/envs/{env} - * - * @param env (required) - * @param openAppDTO (required) - * @return 应用在指定环境创建成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - */ - @Operation( - operationId = "openapiV1AppsEnvsEnvPost", - summary = "在指定环境创建应用", - description = "POST /openapi/v1/apps/envs/{env}", - tags = { "App Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "应用在指定环境创建成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) - }), - @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) - }), - @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = AppManagementApi.PATH_OPENAPI_V1_APPS_ENVS_ENV_POST, - produces = { "application/json" }, - consumes = { "application/json" } - ) - - default ResponseEntity openapiV1AppsEnvsEnvPost( - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "OpenAppDTO", description = "", required = true) @Valid @RequestBody OpenAppDTO openAppDTO + 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().openapiV1AppsEnvsEnvPost(env, openAppDTO); + return getDelegate().getAppsBySelf(page, size); } - public static final String PATH_OPENAPI_V1_APPS_GET = "/openapi/v1/apps"; /** - * GET /openapi/v1/apps : 获取当前Consumer授权的应用列表 - * GET /openapi/v1/apps?authorized=true + * GET /openapi/v1/apps/{appId}/envclusters : 获取应用的环境集群信息 (original openapi) + * GET /openapi/v1/apps/{appId}/envclusters * - * @param authorized 是否只返回授权的应用 (optional) - * @return 成功获取授权应用列表 (status code 200) - * or 未授权访问 (status code 401) + * @param appId 应用ID (required) + * @return 成功获取应用环境集群信息 (status code 200) + * or 应用不存在 (status code 404) */ @Operation( - operationId = "openapiV1AppsGet", - summary = "获取当前Consumer授权的应用列表", - description = "GET /openapi/v1/apps?authorized=true", + operationId = "getEnvClusterInfo", + summary = "获取应用的环境集群信息 (original openapi)", + 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 = OpenAppDTO.class))) + @ApiResponse(responseCode = "200", description = "成功获取应用环境集群信息", content = { + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenEnvClusterDTO.class))) }), - @ApiResponse(responseCode = "401", description = "未授权访问", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @ApiResponse(responseCode = "404", description = "应用不存在", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }) }, security = { @@ -509,41 +418,41 @@ default ResponseEntity openapiV1AppsEnvsEnvPost( ) @RequestMapping( method = RequestMethod.GET, - value = AppManagementApi.PATH_OPENAPI_V1_APPS_GET, + value = "/openapi/v1/apps/{appId}/envclusters", produces = { "application/json" } ) - - default ResponseEntity> openapiV1AppsGet( - @Parameter(name = "authorized", description = "是否只返回授权的应用", in = ParameterIn.QUERY) @Valid @RequestParam(value = "authorized", required = false) @Nullable String authorized + default ResponseEntity> getEnvClusterInfo( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId ) { - return getDelegate().openapiV1AppsGet(authorized); + return getDelegate().getEnvClusterInfo(appId); } - public static final String PATH_OPENAPI_V1_APPS_POST = "/openapi/v1/apps"; /** - * POST /openapi/v1/apps : 创建应用 - * POST /openapi/v1/apps + * PUT /openapi/v1/apps/{appId} : 更新应用(new added) + * PUT /openapi/v1/apps/{appId} * - * @param openapiV1AppsPostRequest (required) - * @return 应用创建成功 (status code 200) + * @param appId 应用ID (required) + * @param operator 操作人用户名 (required) + * @param openAppDTO (required) + * @return 应用更新成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) */ @Operation( - operationId = "openapiV1AppsPost", - summary = "创建应用", - description = "POST /openapi/v1/apps", + operationId = "updateApp", + summary = "更新应用(new added)", + description = "PUT /openapi/v1/apps/{appId}", tags = { "App Management" }, responses = { - @ApiResponse(responseCode = "200", description = "应用创建成功", content = { + @ApiResponse(responseCode = "200", description = "应用更新成功", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = OpenAppDTO.class)) }), @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsPost400Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }), @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }) }, security = { @@ -551,16 +460,17 @@ default ResponseEntity> openapiV1AppsGet( } ) @RequestMapping( - method = RequestMethod.POST, - value = AppManagementApi.PATH_OPENAPI_V1_APPS_POST, + method = RequestMethod.PUT, + value = "/openapi/v1/apps/{appId}", produces = { "application/json" }, consumes = { "application/json" } ) - - default ResponseEntity openapiV1AppsPost( - @Parameter(name = "OpenapiV1AppsPostRequest", description = "", required = true) @Valid @RequestBody OpenapiV1AppsPostRequest openapiV1AppsPostRequest + 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 ) { - return getDelegate().openapiV1AppsPost(openapiV1AppsPostRequest); + return getDelegate().updateApp(appId, operator, openAppDTO); } } 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 fd7788ab..9376963b 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,18 +1,15 @@ package com.apollo.openapi.server.api; -import com.apollo.openapi.server.model.EnvClusterInfo; import java.util.Map; +import com.apollo.openapi.server.model.MultiResponseEntity; 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.OpenapiV1AppsGet401Response; -import com.apollo.openapi.server.model.OpenapiV1AppsPost400Response; -import com.apollo.openapi.server.model.OpenapiV1AppsPostRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; -import org.springframework.lang.Nullable; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; @@ -32,7 +29,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") @Controller @RequestMapping("${openapi.apolloOpen.base-path:}") public class AppManagementApiController implements AppManagementApi { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApiDelegate.java index eda89660..6a3b1b57 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,21 +1,16 @@ package com.apollo.openapi.server.api; -import com.apollo.openapi.server.model.EnvClusterInfo; import java.util.Map; +import com.apollo.openapi.server.model.MultiResponseEntity; 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.OpenapiV1AppsGet401Response; -import com.apollo.openapi.server.model.OpenapiV1AppsPost400Response; -import com.apollo.openapi.server.model.OpenapiV1AppsPostRequest; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; -import org.springframework.lang.Nullable; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; -import javax.validation.constraints.*; -import javax.validation.Valid; import java.util.List; import java.util.Map; import java.util.Optional; @@ -25,7 +20,7 @@ * A delegate to be called by the {@link AppManagementApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") public interface AppManagementApiDelegate { default Optional getRequest() { @@ -33,73 +28,70 @@ default Optional getRequest() { } /** - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} : 删除AppNamespace - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * POST /openapi/v1/apps : 创建应用 (original openapi) + * POST /openapi/v1/apps * - * @param appId (required) - * @param namespaceName (required) - * @return (status code 200) - * @see AppManagementApi#openapiV1AppsAppIdAppnamespacesNamespaceNameDelete + * @param openCreateAppDTO (required) + * @return 应用创建成功 (status code 200) + * or 请求参数错误 (status code 400) + * or 权限不足 (status code 403) + * @see AppManagementApi#createApp */ - default ResponseEntity openapiV1AppsAppIdAppnamespacesNamespaceNameDelete(String appId, - String namespaceName) { + default ResponseEntity createApp(OpenCreateAppDTO openCreateAppDTO) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } /** - * DELETE /openapi/v1/apps/{appId} : 删除应用 + * POST /openapi/v1/apps/envs/{env} : 在指定环境创建应用(new added) + * POST /openapi/v1/apps/envs/{env} + * + * @param env 环境标识,例如 DEV、FAT、UAT、PROD (required) + * @param operator 操作人用户名 (required) + * @param openAppDTO (required) + * @return 应用在指定环境创建成功 (status code 200) + * or 请求参数错误 (status code 400) + * or 权限不足 (status code 403) + * @see AppManagementApi#createAppInEnv + */ + default ResponseEntity createAppInEnv(String env, + String operator, + OpenAppDTO openAppDTO) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * DELETE /openapi/v1/apps/{appId} : 删除应用(new added) * DELETE /openapi/v1/apps/{appId} * - * @param appId (required) + * @param appId 应用ID (required) + * @param operator 操作人用户名 (required) * @return 应用删除成功 (status code 200) * or 权限不足,需要超级管理员权限 (status code 403) * or 应用不存在 (status code 404) - * @see AppManagementApi#openapiV1AppsAppIdDelete + * @see AppManagementApi#deleteApp */ - default ResponseEntity openapiV1AppsAppIdDelete(String appId) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); + default ResponseEntity deleteApp(String appId, + String operator) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } /** - * GET /openapi/v1/apps/{appId}/env-clusters : 获取应用的环境集群信息 - * GET /openapi/v1/apps/{appId}/env-clusters + * GET /openapi/v1/apps : 查找应用 (original openapi) + * POST /openapi/v1/apps * - * @param appId (required) - * @return 成功获取应用环境集群信息 (status code 200) - * or 应用不存在 (status code 404) - * @see AppManagementApi#openapiV1AppsAppIdEnvClustersGet + * @param appIds 查找应用 (optional) + * @return 成功获取应用列表 (status code 200) + * or 未授权访问 (status code 401) + * @see AppManagementApi#findApps */ - default ResponseEntity> openapiV1AppsAppIdEnvClustersGet(String appId) { + 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 = "[ { \"env\" : \"env\", \"clusters\" : [ \"clusters\", \"clusters\" ] }, { \"env\" : \"env\", \"clusters\" : [ \"clusters\", \"clusters\" ] } ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; + 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\" } ]"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -110,43 +102,18 @@ default ResponseEntity> openapiV1AppsAppIdEnvClustersGet } /** - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links : 删除关联的Namespace - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links + * GET /openapi/v1/apps/authorized : 获取当前Consumer授权的应用列表 (original openapi) + * GET /openapi/v1/apps/authorized * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return (status code 200) - * @see AppManagementApi#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete - */ - default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete(String appId, - String env, - String clusterName, - String namespaceName) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/{appId} : 获取单个应用信息 - * GET /openapi/v1/apps/{appId} - * - * @param appId (required) - * @return 成功获取应用信息 (status code 200) - * or 应用不存在 (status code 404) - * @see AppManagementApi#openapiV1AppsAppIdGet + * @return 成功获取授权应用列表 (status code 200) + * or 未授权访问 (status code 401) + * @see AppManagementApi#findAppsAuthorized */ - default ResponseEntity openapiV1AppsAppIdGet(String appId) { + default ResponseEntity> findAppsAuthorized() { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"orgName\" : \"orgName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; + 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\" } ]"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -157,24 +124,19 @@ default ResponseEntity openapiV1AppsAppIdGet(String appId) { } /** - * 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 (required) + * @param appId 应用ID (required) * @return 成功获取应用缺失的环境列表 (status code 200) * or 应用不存在 (status code 404) - * @see AppManagementApi#openapiV1AppsAppIdMissEnvsGet + * @see AppManagementApi#findMissEnvs */ - default ResponseEntity> openapiV1AppsAppIdMissEnvsGet(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 = "[ \"\", \"\" ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; + String exampleString = "{ \"code\" : 200, \"entities\" : [ { \"code\" : 200, \"message\" : \"OK\", \"body\" : \"{}\" }, { \"code\" : 200, \"message\" : \"OK\", \"body\" : \"{}\" } ] }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -185,31 +147,19 @@ default ResponseEntity> openapiV1AppsAppIdMissEnvsGet(String appId) } /** - * GET /openapi/v1/apps/{appId}/namespaces/releases/status : 获取应用下所有Namespace的发布状态 - * GET /openapi/v1/apps/{appId}/namespaces/releases/status - * - * @param appId (required) - * @return (status code 200) - * @see AppManagementApi#openapiV1AppsAppIdNamespacesReleasesStatusGet - */ - default ResponseEntity>> openapiV1AppsAppIdNamespacesReleasesStatusGet(String appId) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/{appId}/navtree : 获取应用导航树 - * GET /openapi/v1/apps/{appId}/navtree + * GET /openapi/v1/apps/{appId} : 获取单个应用信息(new added) + * GET /openapi/v1/apps/{appId} * * @param appId (required) - * @return 成功获取应用导航树 (status code 200) - * @see AppManagementApi#openapiV1AppsAppIdNavtreeGet + * @return 成功获取应用信息 (status code 200) + * or 应用不存在 (status code 404) + * @see AppManagementApi#getApp */ - default ResponseEntity> openapiV1AppsAppIdNavtreeGet(String appId) { + 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 = "[ { \"env\" : \"env\", \"clusters\" : [ { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"parentClusterId\" : 6, \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }, { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"parentClusterId\" : 6, \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" } ] }, { \"env\" : \"env\", \"clusters\" : [ { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"parentClusterId\" : 6, \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }, { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"parentClusterId\" : 6, \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" } ] } ]"; + String exampleString = "{ \"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; } @@ -220,32 +170,18 @@ default ResponseEntity> openapiV1AppsAppIdNavtreeGet(String } /** - * PUT /openapi/v1/apps/{appId} : 更新应用 - * PUT /openapi/v1/apps/{appId} + * GET /openapi/v1/apps/{appId}/navtree : 获取应用导航树(new added) + * GET /openapi/v1/apps/{appId}/navtree * - * @param appId (required) - * @param openAppDTO (required) - * @return (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - * @see AppManagementApi#openapiV1AppsAppIdPut + * @param appId 应用ID (required) + * @return 成功获取应用导航树 (status code 200) + * @see AppManagementApi#getAppNavTree */ - default ResponseEntity openapiV1AppsAppIdPut(String appId, - OpenAppDTO openAppDTO) { + default ResponseEntity getAppNavTree(String appId) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"orgName\" : \"orgName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; + String exampleString = "{ \"code\" : 200, \"entities\" : [ { \"code\" : 200, \"message\" : \"OK\", \"body\" : \"{}\" }, { \"code\" : 200, \"message\" : \"OK\", \"body\" : \"{}\" } ] }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -256,59 +192,21 @@ default ResponseEntity openapiV1AppsAppIdPut(String appId, } /** - * GET /openapi/v1/apps/by-self : 获取当前Consumer的应用列表(分页) + * GET /openapi/v1/apps/by-self : 获取当前Consumer的应用列表(分页)(new added) * GET /openapi/v1/apps/by-self * + * @param page 页数 (required) + * @param size 页大小 (required) * @return 成功获取Consumer的应用列表 (status code 200) * or 未授权访问 (status code 401) - * @see AppManagementApi#openapiV1AppsBySelfGet - */ - default ResponseEntity> openapiV1AppsBySelfGet() { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"orgName\" : \"orgName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"orgName\" : \"orgName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\" } ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/apps/envs/{env} : 在指定环境创建应用 - * POST /openapi/v1/apps/envs/{env} - * - * @param env (required) - * @param openAppDTO (required) - * @return 应用在指定环境创建成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - * @see AppManagementApi#openapiV1AppsEnvsEnvPost + * @see AppManagementApi#getAppsBySelf */ - default ResponseEntity openapiV1AppsEnvsEnvPost(String env, - OpenAppDTO openAppDTO) { + 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 = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; + String exampleString = "[ { \"dataChangeCreatedTime\" : \"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\" } ]"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -319,24 +217,19 @@ default ResponseEntity openapiV1AppsEnvsEnvPost(Str } /** - * GET /openapi/v1/apps : 获取当前Consumer授权的应用列表 - * GET /openapi/v1/apps?authorized=true + * GET /openapi/v1/apps/{appId}/envclusters : 获取应用的环境集群信息 (original openapi) + * GET /openapi/v1/apps/{appId}/envclusters * - * @param authorized 是否只返回授权的应用 (optional) - * @return 成功获取授权应用列表 (status code 200) - * or 未授权访问 (status code 401) - * @see AppManagementApi#openapiV1AppsGet + * @param appId 应用ID (required) + * @return 成功获取应用环境集群信息 (status code 200) + * or 应用不存在 (status code 404) + * @see AppManagementApi#getEnvClusterInfo */ - default ResponseEntity> openapiV1AppsGet(String authorized) { + 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\" : \"dataChangeCreatedTime\", \"orgName\" : \"orgName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"orgName\" : \"orgName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\" } ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; + String exampleString = "[ { \"env\" : \"env\", \"clusters\" : [ \"clusters\", \"clusters\" ] }, { \"env\" : \"env\", \"clusters\" : [ \"clusters\", \"clusters\" ] } ]"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -347,30 +240,24 @@ default ResponseEntity> openapiV1AppsGet(String authorized) { } /** - * POST /openapi/v1/apps : 创建应用 - * POST /openapi/v1/apps + * PUT /openapi/v1/apps/{appId} : 更新应用(new added) + * PUT /openapi/v1/apps/{appId} * - * @param openapiV1AppsPostRequest (required) - * @return 应用创建成功 (status code 200) + * @param appId 应用ID (required) + * @param operator 操作人用户名 (required) + * @param openAppDTO (required) + * @return 应用更新成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) - * @see AppManagementApi#openapiV1AppsPost + * @see AppManagementApi#updateApp */ - default ResponseEntity openapiV1AppsPost(OpenapiV1AppsPostRequest openapiV1AppsPostRequest) { + 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\" : \"dataChangeCreatedTime\", \"orgName\" : \"orgName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"exception\" : \"exception\", \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; + 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; } 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 43fd1052..d664f53b 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 @@ -1,13 +1,12 @@ -/* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.15.0). +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.6.0). * https://openapi-generator.tech * Do not edit the class manually. */ package com.apollo.openapi.server.api; +import java.util.Map; import com.apollo.openapi.server.model.OpenClusterDTO; -import com.apollo.openapi.server.model.OpenNamespaceDTO; -import com.apollo.openapi.server.model.OpenapiV1AppsGet401Response; import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -19,8 +18,6 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; -import io.swagger.v3.oas.annotations.media.ExampleObject; -import org.springframework.lang.Nullable; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -32,7 +29,7 @@ import java.util.Map; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") @Validated @Tag(name = "Cluster Management", description = "集群管理相关接口,包括集群的创建、查询、删除等操作") public interface ClusterManagementApi { @@ -41,72 +38,31 @@ default ClusterManagementApiDelegate getDelegate() { return new ClusterManagementApiDelegate() {}; } - public static final String PATH_OPENAPI_V1_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_GET = "/openapi/v1/apps/{appId}/clusters/{clusterName}"; /** - * GET /openapi/v1/apps/{appId}/clusters/{clusterName} : 获取指定集群信息 - * GET /openapi/v1/apps/{appId}/clusters/{clusterName} + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters : 创建集群 (original openapi) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters * - * @param appId (required) - * @param clusterName (required) - * @return 成功获取集群信息 (status code 200) - * or 集群不存在 (status code 404) - */ - @Operation( - operationId = "openapiV1AppsAppIdClustersClusterNameGet", - summary = "获取指定集群信息", - description = "GET /openapi/v1/apps/{appId}/clusters/{clusterName}", - tags = { "Cluster Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取集群信息", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenClusterDTO.class)) - }), - @ApiResponse(responseCode = "404", description = "集群不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = ClusterManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_GET, - produces = { "application/json" } - ) - - default ResponseEntity openapiV1AppsAppIdClustersClusterNameGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName - ) { - return getDelegate().openapiV1AppsAppIdClustersClusterNameGet(appId, clusterName); - } - - - public static final String PATH_OPENAPI_V1_APPS_APP_ID_CLUSTERS_POST = "/openapi/v1/apps/{appId}/clusters"; - /** - * POST /openapi/v1/apps/{appId}/clusters : 创建集群 - * POST /openapi/v1/apps/{appId}/clusters - * - * @param appId (required) + * @param appId 应用ID (required) + * @param env (required) * @param openClusterDTO (required) * @return 集群创建成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) */ @Operation( - operationId = "openapiV1AppsAppIdClustersPost", - summary = "创建集群", - description = "POST /openapi/v1/apps/{appId}/clusters", + operationId = "createCluster", + summary = "创建集群 (original openapi)", + description = "POST /openapi/v1/envs/{env}/apps/{appId}/clusters", tags = { "Cluster Management" }, responses = { @ApiResponse(responseCode = "200", description = "集群创建成功", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = OpenClusterDTO.class)) }), @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }), @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }) }, security = { @@ -115,49 +71,49 @@ default ResponseEntity openapiV1AppsAppIdClustersClusterNameGet( ) @RequestMapping( method = RequestMethod.POST, - value = ClusterManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_CLUSTERS_POST, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters", produces = { "application/json" }, consumes = { "application/json" } ) - - default ResponseEntity openapiV1AppsAppIdClustersPost( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + default ResponseEntity createCluster( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, @Parameter(name = "OpenClusterDTO", description = "", required = true) @Valid @RequestBody OpenClusterDTO openClusterDTO ) { - return getDelegate().openapiV1AppsAppIdClustersPost(appId, openClusterDTO); + return getDelegate().createCluster(appId, env, openClusterDTO); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_DELETE = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}"; /** - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} : 删除集群 + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} : 删除集群 (new added) * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} * * @param env (required) * @param appId (required) * @param clusterName (required) + * @param operator 操作人用户名 (required) * @return 集群删除成功 (status code 200) * or 删除失败,集群可能包含配置 (status code 400) * or 权限不足 (status code 403) * or 集群不存在 (status code 404) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete", - summary = "删除集群", + operationId = "deleteCluster", + summary = "删除集群 (new added)", description = "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}", tags = { "Cluster Management" }, responses = { @ApiResponse(responseCode = "200", description = "集群删除成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }), @ApiResponse(responseCode = "400", description = "删除失败,集群可能包含配置", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }), @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }), @ApiResponse(responseCode = "404", description = "集群不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }) }, security = { @@ -166,84 +122,40 @@ default ResponseEntity openapiV1AppsAppIdClustersPost( ) @RequestMapping( method = RequestMethod.DELETE, - value = ClusterManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_DELETE, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}", produces = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete( + default ResponseEntity deleteCluster( @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName - ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete(env, appId, clusterName); - } - - - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_GET = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches"; - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches : 获取命名空间分支信息 - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return (status code 200) - * or 分支不存在 (status code 404) - */ - @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet", - summary = "获取命名空间分支信息", - description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches", - tags = { "Cluster Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenNamespaceDTO.class)) - }), - @ApiResponse(responseCode = "404", description = "分支不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = ClusterManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_GET, - produces = { "application/json" } - ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName + @NotNull @Parameter(name = "operator", description = "操作人用户名", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet(appId, env, clusterName, namespaceName); + return getDelegate().deleteCluster(env, appId, clusterName, operator); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_GET = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}"; /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} : 获取指定的Namespace - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} : 获取指定集群信息 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} * * @param appId (required) - * @param env (required) * @param clusterName (required) - * @param namespaceName (required) - * @param fillItemDetail (required) - * @return (status code 200) + * @param env (required) + * @return 成功获取集群信息 (status code 200) + * or 集群不存在 (status code 404) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet", - summary = "获取指定的Namespace", - description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}", + operationId = "getCluster", + summary = "获取指定集群信息 (original openapi)", + description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}", tags = { "Cluster Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenNamespaceDTO.class)) + @ApiResponse(responseCode = "200", description = "成功获取集群信息", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenClusterDTO.class)) + }), + @ApiResponse(responseCode = "404", description = "集群不存在", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }) }, security = { @@ -252,18 +164,15 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersCluste ) @RequestMapping( method = RequestMethod.GET, - value = ClusterManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_GET, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}", produces = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet( + default ResponseEntity getCluster( @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @NotNull @Parameter(name = "fillItemDetail", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "fillItemDetail", required = true) Boolean fillItemDetail + @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet(appId, env, clusterName, namespaceName, fillItemDetail); + return getDelegate().getCluster(appId, clusterName, env); } } 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 d9c89641..a3336957 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,14 +1,12 @@ package com.apollo.openapi.server.api; +import java.util.Map; import com.apollo.openapi.server.model.OpenClusterDTO; -import com.apollo.openapi.server.model.OpenNamespaceDTO; -import com.apollo.openapi.server.model.OpenapiV1AppsGet401Response; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; -import org.springframework.lang.Nullable; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; @@ -28,7 +26,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") @Controller @RequestMapping("${openapi.apolloOpen.base-path:}") public class ClusterManagementApiController implements ClusterManagementApi { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApiDelegate.java index 44b2b78a..dc5da6c0 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,17 +1,13 @@ package com.apollo.openapi.server.api; +import java.util.Map; import com.apollo.openapi.server.model.OpenClusterDTO; -import com.apollo.openapi.server.model.OpenNamespaceDTO; -import com.apollo.openapi.server.model.OpenapiV1AppsGet401Response; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; -import org.springframework.lang.Nullable; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; -import javax.validation.constraints.*; -import javax.validation.Valid; import java.util.List; import java.util.Map; import java.util.Optional; @@ -21,7 +17,7 @@ * A delegate to be called by the {@link ClusterManagementApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") public interface ClusterManagementApiDelegate { default Optional getRequest() { @@ -29,62 +25,24 @@ default Optional getRequest() { } /** - * GET /openapi/v1/apps/{appId}/clusters/{clusterName} : 获取指定集群信息 - * GET /openapi/v1/apps/{appId}/clusters/{clusterName} - * - * @param appId (required) - * @param clusterName (required) - * @return 成功获取集群信息 (status code 200) - * or 集群不存在 (status code 404) - * @see ClusterManagementApi#openapiV1AppsAppIdClustersClusterNameGet - */ - default ResponseEntity openapiV1AppsAppIdClustersClusterNameGet(String appId, - String clusterName) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/apps/{appId}/clusters : 创建集群 - * POST /openapi/v1/apps/{appId}/clusters + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters : 创建集群 (original openapi) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters * - * @param appId (required) + * @param appId 应用ID (required) + * @param env (required) * @param openClusterDTO (required) * @return 集群创建成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) - * @see ClusterManagementApi#openapiV1AppsAppIdClustersPost + * @see ClusterManagementApi#createCluster */ - default ResponseEntity openapiV1AppsAppIdClustersPost(String appId, + default ResponseEntity createCluster(String appId, + String env, OpenClusterDTO openClusterDTO) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -95,104 +53,45 @@ default ResponseEntity openapiV1AppsAppIdClustersPost(String app } /** - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} : 删除集群 + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} : 删除集群 (new added) * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} * * @param env (required) * @param appId (required) * @param clusterName (required) + * @param operator 操作人用户名 (required) * @return 集群删除成功 (status code 200) * or 删除失败,集群可能包含配置 (status code 400) * or 权限不足 (status code 403) * or 集群不存在 (status code 404) - * @see ClusterManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete + * @see ClusterManagementApi#deleteCluster */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete(String env, + default ResponseEntity deleteCluster(String env, String appId, - String clusterName) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches : 获取命名空间分支信息 - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return (status code 200) - * or 分支不存在 (status code 404) - * @see ClusterManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet - */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet(String appId, - String env, String clusterName, - String namespaceName) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); + String operator) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} : 获取指定的Namespace - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} : 获取指定集群信息 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} * * @param appId (required) - * @param env (required) * @param clusterName (required) - * @param namespaceName (required) - * @param fillItemDetail (required) - * @return (status code 200) - * @see ClusterManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet + * @param env (required) + * @return 成功获取集群信息 (status code 200) + * or 集群不存在 (status code 404) + * @see ClusterManagementApi#getCluster */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet(String appId, - String env, + default ResponseEntity getCluster(String appId, String clusterName, - String namespaceName, - Boolean fillItemDetail) { + String env) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"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 58b1c490..1ee4efcc 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 @@ -1,5 +1,5 @@ -/* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.15.0). +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.6.0). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -18,8 +18,6 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; -import io.swagger.v3.oas.annotations.media.ExampleObject; -import org.springframework.lang.Nullable; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -31,7 +29,7 @@ import java.util.Map; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") @Validated @Tag(name = "Instance Management", description = "实例管理相关接口,包括实例查询、配置生效状态等功能") public interface InstanceManagementApi { @@ -40,23 +38,23 @@ default InstanceManagementApiDelegate getDelegate() { return new InstanceManagementApiDelegate() {}; } - public static final String PATH_OPENAPI_V1_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_GET = "/openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances"; /** - * GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances : 获取命名空间下的实例数量 - * GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances : 获取命名空间下的实例数量 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances * - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return (status code 200) + * @param env (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @return 成功返回实例数量 (status code 200) */ @Operation( - operationId = "openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet", - summary = "获取命名空间下的实例数量", - description = "GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances", + operationId = "getInstanceCountByNamespace", + summary = "获取命名空间下的实例数量 (original openapi)", + description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances", tags = { "Instance Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { + @ApiResponse(responseCode = "200", description = "成功返回实例数量", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = Integer.class)) }) }, @@ -66,34 +64,33 @@ default InstanceManagementApiDelegate getDelegate() { ) @RequestMapping( method = RequestMethod.GET, - value = InstanceManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_GET, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances", produces = { "application/json" } ) - - default ResponseEntity openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName + default ResponseEntity getInstanceCountByNamespace( + @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName ) { - return getDelegate().openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(appId, clusterName, namespaceName); + return getDelegate().getInstanceCountByNamespace(env, appId, clusterName, namespaceName); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_GET = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances"; /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances : 查询不在指定发布版本中的实例 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int : 查询不在指定发布版本中的实例 (new added) * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 * - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) * @param excludeReleases 排除的发布ID列表,用逗号分隔 (optional) * @return (status code 200) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet", - summary = "查询不在指定发布版本中的实例", + operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet", + summary = "查询不在指定发布版本中的实例 (new added)", description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3", tags = { "Instance Management" }, responses = { @@ -107,24 +104,22 @@ default ResponseEntity openapiV1AppsAppIdClustersClusterNameNamespacesN ) @RequestMapping( method = RequestMethod.GET, - value = InstanceManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_GET, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int", produces = { "application/json" } ) - - default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet( - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "excludeReleases", description = "排除的发布ID列表,用逗号分隔", in = ParameterIn.QUERY) @Valid @RequestParam(value = "excludeReleases", required = false) @Nullable String excludeReleases + default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet( + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, + @Parameter(name = "excludeReleases", description = "排除的发布ID列表,用逗号分隔", in = ParameterIn.QUERY) @Valid @RequestParam(value = "excludeReleases", required = false) String excludeReleases ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(env, appId, clusterName, namespaceName, excludeReleases); + return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(env, appId, clusterName, namespaceName, excludeReleases); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID_INSTANCES_GET = "/openapi/v1/envs/{env}/releases/{releaseId}/instances"; /** - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances : 根据发布版本查询实例(支持分页) + * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances : 根据发布版本查询实例(支持分页) (new added) * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances * * @param env (required) @@ -135,7 +130,7 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersC */ @Operation( operationId = "openapiV1EnvsEnvReleasesReleaseIdInstancesGet", - summary = "根据发布版本查询实例(支持分页)", + summary = "根据发布版本查询实例(支持分页) (new added)", description = "GET /openapi/v1/envs/{env}/releases/{releaseId}/instances", tags = { "Instance Management" }, responses = { @@ -149,10 +144,9 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersC ) @RequestMapping( method = RequestMethod.GET, - value = InstanceManagementApi.PATH_OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID_INSTANCES_GET, + value = "/openapi/v1/envs/{env}/releases/{releaseId}/instances", produces = { "application/json" } ) - default ResponseEntity openapiV1EnvsEnvReleasesReleaseIdInstancesGet( @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, @Parameter(name = "releaseId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("releaseId") Integer releaseId, 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 fe583e59..479b10a7 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 @@ -7,7 +7,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; -import org.springframework.lang.Nullable; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; @@ -27,7 +26,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") @Controller @RequestMapping("${openapi.apolloOpen.base-path:}") public class InstanceManagementApiController implements InstanceManagementApi { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApiDelegate.java index fca7b6b1..c856fbce 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 @@ -5,12 +5,9 @@ import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; -import org.springframework.lang.Nullable; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; -import javax.validation.constraints.*; -import javax.validation.Valid; import java.util.List; import java.util.Map; import java.util.Optional; @@ -20,7 +17,7 @@ * A delegate to be called by the {@link InstanceManagementApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") public interface InstanceManagementApiDelegate { default Optional getRequest() { @@ -28,16 +25,18 @@ default Optional getRequest() { } /** - * GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances : 获取命名空间下的实例数量 - * GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances : 获取命名空间下的实例数量 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances * - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return (status code 200) - * @see InstanceManagementApi#openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet + * @param env (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @return 成功返回实例数量 (status code 200) + * @see InstanceManagementApi#getInstanceCountByNamespace */ - default ResponseEntity openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(String appId, + default ResponseEntity getInstanceCountByNamespace(String env, + String appId, String clusterName, String namespaceName) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -45,18 +44,18 @@ default ResponseEntity openapiV1AppsAppIdClustersClusterNameNamespacesN } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances : 查询不在指定发布版本中的实例 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int : 查询不在指定发布版本中的实例 (new added) * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 * - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) * @param excludeReleases 排除的发布ID列表,用逗号分隔 (optional) * @return (status code 200) - * @see InstanceManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet + * @see InstanceManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet */ - default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(String env, + default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(String env, String appId, String clusterName, String namespaceName, @@ -64,7 +63,7 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersC getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"configs\" : [ { \"releaseDeliveryTime\" : \"releaseDeliveryTime\", \"release\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }, { \"releaseDeliveryTime\" : \"releaseDeliveryTime\", \"release\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" } ], \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 }, { \"configs\" : [ { \"releaseDeliveryTime\" : \"releaseDeliveryTime\", \"release\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }, { \"releaseDeliveryTime\" : \"releaseDeliveryTime\", \"release\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" } ], \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 } ]"; + String exampleString = "[ { \"configs\" : [ { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 }, { \"configs\" : [ { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 } ]"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -75,7 +74,7 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersC } /** - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances : 根据发布版本查询实例(支持分页) + * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances : 根据发布版本查询实例(支持分页) (new added) * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances * * @param env (required) @@ -92,7 +91,7 @@ default ResponseEntity openapiV1EnvsEnvReleasesRelea getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"total\" : 1, \"size\" : 6, \"page\" : 0, \"content\" : [ { \"configs\" : [ { \"releaseDeliveryTime\" : \"releaseDeliveryTime\", \"release\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }, { \"releaseDeliveryTime\" : \"releaseDeliveryTime\", \"release\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" } ], \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 }, { \"configs\" : [ { \"releaseDeliveryTime\" : \"releaseDeliveryTime\", \"release\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }, { \"releaseDeliveryTime\" : \"releaseDeliveryTime\", \"release\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" } ], \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 } ] }"; + String exampleString = "{ \"total\" : 1, \"size\" : 6, \"page\" : 0, \"content\" : [ { \"configs\" : [ { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 }, { \"configs\" : [ { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 } ] }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } 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 c895ca88..147ffef3 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 @@ -1,18 +1,16 @@ -/* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.15.0). +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.6.0). * https://openapi-generator.tech * Do not edit the class manually. */ package com.apollo.openapi.server.api; -import com.apollo.openapi.server.model.ListItemDiffs; -import com.apollo.openapi.server.model.NamespaceSyncModel; -import com.apollo.openapi.server.model.NamespaceTextModel; +import java.util.Map; import com.apollo.openapi.server.model.OpenItemDTO; +import com.apollo.openapi.server.model.OpenItemDiffs; +import com.apollo.openapi.server.model.OpenNamespaceSyncModel; +import com.apollo.openapi.server.model.OpenNamespaceTextModel; import com.apollo.openapi.server.model.OpenPageDTOOpenItemDTO; -import com.apollo.openapi.server.model.OpenapiV1AppsGet401Response; -import com.apollo.openapi.server.model.OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response; -import com.apollo.openapi.server.model.OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response; import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -24,8 +22,6 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; -import io.swagger.v3.oas.annotations.media.ExampleObject; -import org.springframework.lang.Nullable; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -37,7 +33,7 @@ import java.util.Map; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") @Validated @Tag(name = "Item Management", description = "配置项管理相关接口,包括配置的增删改查、批量操作、同步等功能") public interface ItemManagementApi { @@ -46,27 +42,30 @@ default ItemManagementApiDelegate getDelegate() { return new ItemManagementApiDelegate() {}; } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ENCODED_ITEMS_KEY_DELETE = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}"; /** - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} : 通过编码的key删除配置项 - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate : 通过文本批量修改配置项 (new added) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate: * * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param key (required) - * @param operator (required) - * @return (status code 200) + * @param operator 操作人用户名 (required) + * @param openNamespaceTextModel (required) + * @return 批量更新配置项成功 (status code 200) + * or 权限不足 (status code 403) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete", - summary = "通过编码的key删除配置项", - description = "DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}", + operationId = "batchUpdateItemsByText", + summary = "通过文本批量修改配置项 (new added)", + description = "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate:", tags = { "Item Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { + @ApiResponse(responseCode = "200", description = "批量更新配置项成功", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) + }), + @ApiResponse(responseCode = "403", description = "权限不足", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }) }, security = { @@ -74,47 +73,42 @@ default ItemManagementApiDelegate getDelegate() { } ) @RequestMapping( - method = RequestMethod.DELETE, - value = ItemManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ENCODED_ITEMS_KEY_DELETE, - produces = { "application/json" } + method = RequestMethod.PUT, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate", + produces = { "application/json" }, + consumes = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete( + default ResponseEntity batchUpdateItemsByText( @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "key", description = "", required = true, in = ParameterIn.PATH) @PathVariable("key") String key, - @NotNull @Parameter(name = "operator", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator + @NotNull @Parameter(name = "operator", description = "操作人用户名", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator, + @Parameter(name = "OpenNamespaceTextModel", description = "", required = true) @Valid @RequestBody OpenNamespaceTextModel openNamespaceTextModel ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete(appId, env, clusterName, namespaceName, key, operator); + return getDelegate().batchUpdateItemsByText(appId, env, clusterName, namespaceName, operator, openNamespaceTextModel); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ENCODED_ITEMS_KEY_GET = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}"; /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} : 通过查询参数获取配置项(支持编码的key) - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false} + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare : 对比命名空间配置差异 (new added) + * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @return 成功获取配置项(支持编码key) (status code 200) - * or 配置项不存在 (status code 404) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param openNamespaceSyncModel (required) + * @return 成功对比命名空间配置差异 (status code 200) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet", - summary = "通过查询参数获取配置项(支持编码的key)", - description = "GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false}", + operationId = "compareItems", + summary = "对比命名空间配置差异 (new added)", + description = "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare", tags = { "Item Management" }, responses = { - @ApiResponse(responseCode = "200", description = "成功获取配置项(支持编码key)", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenItemDTO.class)) - }), - @ApiResponse(responseCode = "404", description = "配置项不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @ApiResponse(responseCode = "200", description = "成功对比命名空间配置差异", content = { + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenItemDiffs.class))) }) }, security = { @@ -122,56 +116,50 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNames } ) @RequestMapping( - method = RequestMethod.GET, - value = ItemManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ENCODED_ITEMS_KEY_GET, - produces = { "application/json" } + method = RequestMethod.POST, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare", + produces = { "application/json" }, + consumes = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "key", description = "", required = true, in = ParameterIn.PATH) @PathVariable("key") String key + default ResponseEntity> compareItems( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, + @Parameter(name = "OpenNamespaceSyncModel", description = "", required = true) @Valid @RequestBody OpenNamespaceSyncModel openNamespaceSyncModel ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet(appId, env, clusterName, namespaceName, key); + return getDelegate().compareItems(appId, env, clusterName, namespaceName, openNamespaceSyncModel); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ENCODED_ITEMS_KEY_PUT = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}"; /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} : 通过编码的key更新配置项 - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items : 创建新的配置项 (original openapi) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param createIfNotExists (required) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (required) * @param openItemDTO (required) - * @return 配置项更新成功(编码key) (status code 200) + * @return 配置项创建成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) - * or 配置项不存在 (status code 404) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut", - summary = "通过编码的key更新配置项", - description = "PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}", + operationId = "createItem", + summary = "创建新的配置项 (original openapi)", + description = "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items", tags = { "Item Management" }, responses = { - @ApiResponse(responseCode = "200", description = "配置项更新成功(编码key)", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @ApiResponse(responseCode = "200", description = "配置项创建成功", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenItemDTO.class)) }), @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }), @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) - }), - @ApiResponse(responseCode = "404", description = "配置项不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }) }, security = { @@ -179,53 +167,43 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterName } ) @RequestMapping( - method = RequestMethod.PUT, - value = ItemManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ENCODED_ITEMS_KEY_PUT, + method = RequestMethod.POST, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items", produces = { "application/json" }, consumes = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "key", description = "", required = true, in = ParameterIn.PATH) @PathVariable("key") String key, - @NotNull @Parameter(name = "createIfNotExists", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "createIfNotExists", required = true) Boolean createIfNotExists, + default ResponseEntity createItem( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, + @NotNull @Parameter(name = "operator", description = "操作人用户名", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator, @Parameter(name = "OpenItemDTO", description = "", required = true) @Valid @RequestBody OpenItemDTO openItemDTO ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); + return getDelegate().createItem(appId, env, clusterName, namespaceName, operator, openItemDTO); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_BATCH_UPDATE_PUT = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate"; /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate : 通过文本批量修改配置项 - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} : 删除配置项 (original openapi) + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceTextModel (required) - * @return 批量更新配置项成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名 (required) + * @param operator 操作人用户名 (required) + * @return 配置项删除成功 (status code 200) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut", - summary = "通过文本批量修改配置项", - description = "PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate", + operationId = "deleteItem", + summary = "删除配置项 (original openapi)", + description = "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}", tags = { "Item Management" }, responses = { - @ApiResponse(responseCode = "200", description = "批量更新配置项成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) - }), - @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) - }), - @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @ApiResponse(responseCode = "200", description = "配置项删除成功", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }) }, security = { @@ -233,43 +211,42 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClu } ) @RequestMapping( - method = RequestMethod.PUT, - value = ItemManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_BATCH_UPDATE_PUT, - produces = { "application/json" }, - consumes = { "application/json" } + method = RequestMethod.DELETE, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}", + produces = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "NamespaceTextModel", description = "", required = true) @Valid @RequestBody NamespaceTextModel namespaceTextModel + default ResponseEntity deleteItem( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, + @Parameter(name = "key", description = "配置项键名", required = true, in = ParameterIn.PATH) @PathVariable("key") String key, + @NotNull @Parameter(name = "operator", description = "操作人用户名", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut(appId, env, clusterName, namespaceName, namespaceTextModel); + return getDelegate().deleteItem(appId, env, clusterName, namespaceName, key, operator); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_COMPARE_POST = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare"; /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare : 对比命名空间配置差异 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} : 通过编码的key删除配置项 (original openapi) + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} * * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param namespaceSyncModel (required) - * @return 成功对比命名空间配置差异 (status code 200) + * @param key (required) + * @param operator (required) + * @return (status code 200) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost", - summary = "对比命名空间配置差异", - description = "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare", + operationId = "deleteItemByEncodedKey", + summary = "通过编码的key删除配置项 (original openapi)", + description = "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}", tags = { "Item Management" }, responses = { - @ApiResponse(responseCode = "200", description = "成功对比命名空间配置差异", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = ListItemDiffs.class))) + @ApiResponse(responseCode = "200", description = "", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }) }, security = { @@ -277,48 +254,46 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClu } ) @RequestMapping( - method = RequestMethod.POST, - value = ItemManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_COMPARE_POST, - produces = { "application/json" }, - consumes = { "application/json" } + method = RequestMethod.DELETE, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}", + produces = { "application/json" } ) - - default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost( + default ResponseEntity deleteItemByEncodedKey( @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "NamespaceSyncModel", description = "", required = true) @Valid @RequestBody NamespaceSyncModel namespaceSyncModel + @Parameter(name = "key", description = "", required = true, in = ParameterIn.PATH) @PathVariable("key") String key, + @NotNull @Parameter(name = "operator", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost(appId, env, clusterName, namespaceName, namespaceSyncModel); + return getDelegate().deleteItemByEncodedKey(appId, env, clusterName, namespaceName, key, operator); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_GET = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items"; /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items : 获取命名空间下的配置项列表 - * + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items : 获取命名空间下的配置项列表 (original openapi) + * 获取指定命名空间的配置项列表,支持分页 * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (required) - * @param size (required) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) * @return 成功获取配置项列表 (status code 200) * or 命名空间不存在 (status code 404) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet", - summary = "获取命名空间下的配置项列表", - description = "", + operationId = "findItemsByNamespace", + summary = "获取命名空间下的配置项列表 (original openapi)", + description = "获取指定命名空间的配置项列表,支持分页", tags = { "Item Management" }, responses = { @ApiResponse(responseCode = "200", description = "成功获取配置项列表", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = OpenPageDTOOpenItemDTO.class)) }), @ApiResponse(responseCode = "404", description = "命名空间不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }) }, security = { @@ -327,43 +302,44 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClu ) @RequestMapping( method = RequestMethod.GET, - value = ItemManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_GET, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items", produces = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @NotNull @Parameter(name = "page", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = true) Integer page, - @NotNull @Parameter(name = "size", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = true) Integer size + default ResponseEntity findItemsByNamespace( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, + @NotNull @Min(0) @Parameter(name = "page", description = "页码,从0开始", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = true) Integer page, + @NotNull @Min(0) @Parameter(name = "size", description = "每页数量", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = true) Integer size ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet(appId, env, clusterName, namespaceName, page, size); + return getDelegate().findItemsByNamespace(appId, env, clusterName, namespaceName, page, size); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_KEY_DELETE = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}"; /** - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} : 删除配置项 - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items : 获取分支下的配置项 (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param operator (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @return 成功获取分支下的配置项列表 (status code 200) + * or 分支不存在 (status code 404) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete", - summary = "删除配置项", - description = "DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}", + operationId = "getBranchItems", + summary = "获取分支下的配置项 (new added)", + description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items:", tags = { "Item Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) + @ApiResponse(responseCode = "200", description = "成功获取分支下的配置项列表", content = { + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenItemDTO.class))) + }), + @ApiResponse(responseCode = "404", description = "分支不存在", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }) }, security = { @@ -371,47 +347,89 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClusters } ) @RequestMapping( - method = RequestMethod.DELETE, - value = ItemManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_KEY_DELETE, + method = RequestMethod.GET, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items", produces = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "key", description = "", required = true, in = ParameterIn.PATH) @PathVariable("key") String key, - @NotNull @Parameter(name = "operator", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator + default ResponseEntity> getBranchItems( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, + @Parameter(name = "branchName", description = "分支名称", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete(appId, env, clusterName, namespaceName, key, operator); + return getDelegate().getBranchItems(appId, env, clusterName, namespaceName, branchName); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_KEY_GET = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}"; /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} : 获取单个配置项 - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} : 获取单个配置项 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名 (required) * @return 成功获取配置项 (status code 200) * or 配置项不存在 (status code 404) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet", - summary = "获取单个配置项", - description = "GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}", + operationId = "getItem", + summary = "获取单个配置项 (original openapi)", + description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}", tags = { "Item Management" }, responses = { @ApiResponse(responseCode = "200", description = "成功获取配置项", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = OpenItemDTO.class)) }), @ApiResponse(responseCode = "404", description = "配置项不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + }) + }, + security = { + @SecurityRequirement(name = "ApiKeyAuth") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}", + produces = { "application/json" } + ) + default ResponseEntity getItem( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, + @Parameter(name = "key", description = "配置项键名", required = true, in = ParameterIn.PATH) @PathVariable("key") String key + ) { + return getDelegate().getItem(appId, env, clusterName, namespaceName, key); + } + + + /** + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} : 通过查询参数获取配置项(支持编码的key) (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + * + * @param appId (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名(需要URL编码) (required) + * @return 成功获取配置项(支持编码key) (status code 200) + * or 配置项不存在 (status code 404) + */ + @Operation( + operationId = "getItemByEncodedKey", + summary = "通过查询参数获取配置项(支持编码的key) (original openapi)", + description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}", + tags = { "Item Management" }, + responses = { + @ApiResponse(responseCode = "200", description = "成功获取配置项(支持编码key)", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenItemDTO.class)) + }), + @ApiResponse(responseCode = "404", description = "配置项不存在", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }) }, security = { @@ -420,55 +438,47 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNames ) @RequestMapping( method = RequestMethod.GET, - value = ItemManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_KEY_GET, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}", produces = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet( + default ResponseEntity getItemByEncodedKey( @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "key", description = "", required = true, in = ParameterIn.PATH) @PathVariable("key") String key + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, + @Parameter(name = "key", description = "配置项键名(需要URL编码)", required = true, in = ParameterIn.PATH) @PathVariable("key") String key ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet(appId, env, clusterName, namespaceName, key); + return getDelegate().getItemByEncodedKey(appId, env, clusterName, namespaceName, key); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_KEY_PUT = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}"; /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} : 更新配置项 - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert : 撤销配置项更改 (new added) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert * * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param key (required) - * @param createIfNotExists (required) - * @param openItemDTO (required) - * @return 配置项更新成功 (status code 200) + * @param operator 操作人用户名 (required) + * @return 配置项更改撤销成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) - * or 配置项不存在 (status code 404) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut", - summary = "更新配置项", - description = "PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}", + operationId = "revertItems", + summary = "撤销配置项更改 (new added)", + description = "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert", tags = { "Item Management" }, responses = { - @ApiResponse(responseCode = "200", description = "配置项更新成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @ApiResponse(responseCode = "200", description = "配置项更改撤销成功", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }), @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }), @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) - }), - @ApiResponse(responseCode = "404", description = "配置项不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }) }, security = { @@ -476,53 +486,49 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterName } ) @RequestMapping( - method = RequestMethod.PUT, - value = ItemManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_KEY_PUT, - produces = { "application/json" }, - consumes = { "application/json" } + method = RequestMethod.POST, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert", + produces = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut( + default ResponseEntity revertItems( @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "key", description = "", required = true, in = ParameterIn.PATH) @PathVariable("key") String key, - @NotNull @Parameter(name = "createIfNotExists", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "createIfNotExists", required = true) Boolean createIfNotExists, - @Parameter(name = "OpenItemDTO", description = "", required = true) @Valid @RequestBody OpenItemDTO openItemDTO + @NotNull @Parameter(name = "operator", description = "操作人用户名", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); + return getDelegate().revertItems(appId, env, clusterName, namespaceName, operator); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_POST = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items"; /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items : 创建新的配置项 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync : 同步配置项到多个命名空间 (new added) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync: * - * @param appId (required) - * @param env (required) + * @param appId 应用ID (required) + * @param env 环境标识 (required) * @param clusterName (required) * @param namespaceName (required) - * @param openItemDTO (required) - * @return 配置项创建成功 (status code 200) + * @param operator 操作人用户名 (required) + * @param openNamespaceSyncModel (required) + * @return 配置项同步成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost", - summary = "创建新的配置项", - description = "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items", + operationId = "syncItems", + summary = "同步配置项到多个命名空间 (new added)", + description = "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync:", tags = { "Item Management" }, responses = { - @ApiResponse(responseCode = "200", description = "配置项创建成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenItemDTO.class)) + @ApiResponse(responseCode = "200", description = "配置项同步成功", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }), @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }), @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }) }, security = { @@ -531,49 +537,55 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClu ) @RequestMapping( method = RequestMethod.POST, - value = ItemManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_POST, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync", produces = { "application/json" }, consumes = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + default ResponseEntity syncItems( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "OpenItemDTO", description = "", required = true) @Valid @RequestBody OpenItemDTO openItemDTO + @NotNull @Parameter(name = "operator", description = "操作人用户名", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator, + @Parameter(name = "OpenNamespaceSyncModel", description = "", required = true) @Valid @RequestBody OpenNamespaceSyncModel openNamespaceSyncModel ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost(appId, env, clusterName, namespaceName, openItemDTO); + return getDelegate().syncItems(appId, env, clusterName, namespaceName, operator, openNamespaceSyncModel); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_REVERT_POST = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert"; /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert : 撤销配置项更改 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} : 更新配置项 (original openapi) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} * * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return 配置项更改撤销成功 (status code 200) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key (required) + * @param createIfNotExists (required) + * @param openItemDTO (required) + * @return 配置项更新成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) + * or 配置项不存在 (status code 404) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost", - summary = "撤销配置项更改", - description = "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert", + operationId = "updateItem", + summary = "更新配置项 (original openapi)", + description = "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}", tags = { "Item Management" }, responses = { - @ApiResponse(responseCode = "200", description = "配置项更改撤销成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @ApiResponse(responseCode = "200", description = "配置项更新成功", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }), @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }), @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + }), + @ApiResponse(responseCode = "404", description = "配置项不存在", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }) }, security = { @@ -581,49 +593,57 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterName } ) @RequestMapping( - method = RequestMethod.POST, - value = ItemManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_REVERT_POST, - produces = { "application/json" } + method = RequestMethod.PUT, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}", + produces = { "application/json" }, + consumes = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost( + default ResponseEntity updateItem( @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, + @Parameter(name = "key", description = "", required = true, in = ParameterIn.PATH) @PathVariable("key") String key, + @NotNull @Parameter(name = "createIfNotExists", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "createIfNotExists", required = true, defaultValue = "false") Boolean createIfNotExists, + @Parameter(name = "OpenItemDTO", description = "", required = true) @Valid @RequestBody OpenItemDTO openItemDTO ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost(appId, env, clusterName, namespaceName); + return getDelegate().updateItem(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_SYNC_POST = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync"; /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync : 同步配置项到多个命名空间 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} : 通过编码的key更新配置项 (original openapi) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceSyncModel (required) - * @return 配置项同步成功 (status code 200) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名(需要URL编码) (required) + * @param createIfNotExists 若不存在则创建(true/false) (required) + * @param openItemDTO (required) + * @return 配置项更新成功(编码key) (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) + * or 配置项不存在 (status code 404) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost", - summary = "同步配置项到多个命名空间", - description = "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync", + operationId = "updateItemByEncodedKey", + summary = "通过编码的key更新配置项 (original openapi)", + description = "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}", tags = { "Item Management" }, responses = { - @ApiResponse(responseCode = "200", description = "配置项同步成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @ApiResponse(responseCode = "200", description = "配置项更新成功(编码key)", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }), @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }), @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + }), + @ApiResponse(responseCode = "404", description = "配置项不存在", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }) }, security = { @@ -631,47 +651,47 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClu } ) @RequestMapping( - method = RequestMethod.POST, - value = ItemManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_SYNC_POST, + method = RequestMethod.PUT, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}", produces = { "application/json" }, consumes = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "NamespaceSyncModel", description = "", required = true) @Valid @RequestBody NamespaceSyncModel namespaceSyncModel + default ResponseEntity updateItemByEncodedKey( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, + @Parameter(name = "key", description = "配置项键名(需要URL编码)", required = true, in = ParameterIn.PATH) @PathVariable("key") String key, + @NotNull @Parameter(name = "createIfNotExists", description = "若不存在则创建(true/false)", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "createIfNotExists", required = true, defaultValue = "false") Boolean createIfNotExists, + @Parameter(name = "OpenItemDTO", description = "", required = true) @Valid @RequestBody OpenItemDTO openItemDTO ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost(appId, env, clusterName, namespaceName, namespaceSyncModel); + return getDelegate().updateItemByEncodedKey(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_VALIDATE_POST = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate"; /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate : 验证配置文本语法 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate : 验证配置文本语法 (new added) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate * * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param namespaceTextModel (required) + * @param openNamespaceTextModel (required) * @return 配置文本语法验证通过 (status code 200) * or 配置文本语法错误 (status code 400) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost", - summary = "验证配置文本语法", - description = "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate", + operationId = "validateItems", + summary = "验证配置文本语法 (new added)", + description = "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate", tags = { "Item Management" }, responses = { @ApiResponse(responseCode = "200", description = "配置文本语法验证通过", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }), @ApiResponse(responseCode = "400", description = "配置文本语法错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }) }, security = { @@ -680,19 +700,18 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClu ) @RequestMapping( method = RequestMethod.POST, - value = ItemManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_VALIDATE_POST, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate", produces = { "application/json" }, consumes = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost( + default ResponseEntity validateItems( @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "NamespaceTextModel", description = "", required = true) @Valid @RequestBody NamespaceTextModel namespaceTextModel + @Parameter(name = "OpenNamespaceTextModel", description = "", required = true) @Valid @RequestBody OpenNamespaceTextModel openNamespaceTextModel ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost(appId, env, clusterName, namespaceName, namespaceTextModel); + return getDelegate().validateItems(appId, env, clusterName, namespaceName, openNamespaceTextModel); } } diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApiController.java index a473941f..d47dd5b2 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,19 +1,16 @@ package com.apollo.openapi.server.api; -import com.apollo.openapi.server.model.ListItemDiffs; -import com.apollo.openapi.server.model.NamespaceSyncModel; -import com.apollo.openapi.server.model.NamespaceTextModel; +import java.util.Map; import com.apollo.openapi.server.model.OpenItemDTO; +import com.apollo.openapi.server.model.OpenItemDiffs; +import com.apollo.openapi.server.model.OpenNamespaceSyncModel; +import com.apollo.openapi.server.model.OpenNamespaceTextModel; import com.apollo.openapi.server.model.OpenPageDTOOpenItemDTO; -import com.apollo.openapi.server.model.OpenapiV1AppsGet401Response; -import com.apollo.openapi.server.model.OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response; -import com.apollo.openapi.server.model.OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; -import org.springframework.lang.Nullable; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; @@ -33,7 +30,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") @Controller @RequestMapping("${openapi.apolloOpen.base-path:}") public class ItemManagementApiController implements ItemManagementApi { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApiDelegate.java index 40324eab..28379ae8 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,22 +1,17 @@ package com.apollo.openapi.server.api; -import com.apollo.openapi.server.model.ListItemDiffs; -import com.apollo.openapi.server.model.NamespaceSyncModel; -import com.apollo.openapi.server.model.NamespaceTextModel; +import java.util.Map; import com.apollo.openapi.server.model.OpenItemDTO; +import com.apollo.openapi.server.model.OpenItemDiffs; +import com.apollo.openapi.server.model.OpenNamespaceSyncModel; +import com.apollo.openapi.server.model.OpenNamespaceTextModel; import com.apollo.openapi.server.model.OpenPageDTOOpenItemDTO; -import com.apollo.openapi.server.model.OpenapiV1AppsGet401Response; -import com.apollo.openapi.server.model.OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response; -import com.apollo.openapi.server.model.OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; -import org.springframework.lang.Nullable; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; -import javax.validation.constraints.*; -import javax.validation.Valid; import java.util.List; import java.util.Map; import java.util.Optional; @@ -26,7 +21,7 @@ * A delegate to be called by the {@link ItemManagementApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") public interface ItemManagementApiDelegate { default Optional getRequest() { @@ -34,55 +29,50 @@ default Optional getRequest() { } /** - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} : 通过编码的key删除配置项 - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate : 通过文本批量修改配置项 (new added) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate: * * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param key (required) - * @param operator (required) - * @return (status code 200) - * @see ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete + * @param operator 操作人用户名 (required) + * @param openNamespaceTextModel (required) + * @return 批量更新配置项成功 (status code 200) + * or 权限不足 (status code 403) + * @see ItemManagementApi#batchUpdateItemsByText */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete(String appId, + default ResponseEntity batchUpdateItemsByText(String appId, String env, String clusterName, String namespaceName, - String key, - String operator) { + String operator, + OpenNamespaceTextModel openNamespaceTextModel) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} : 通过查询参数获取配置项(支持编码的key) - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false} + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare : 对比命名空间配置差异 (new added) + * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @return 成功获取配置项(支持编码key) (status code 200) - * or 配置项不存在 (status code 404) - * @see ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param openNamespaceSyncModel (required) + * @return 成功对比命名空间配置差异 (status code 200) + * @see ItemManagementApi#compareItems */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet(String appId, + default ResponseEntity> compareItems(String appId, String env, String clusterName, String namespaceName, - String key) { + OpenNamespaceSyncModel openNamespaceSyncModel) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; + String exampleString = "[ { \"namespace\" : { \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"env\" : \"env\", \"namespaceName\" : \"namespaceName\" }, \"diffs\" : { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"deleteItems\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ], \"createItems\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ], \"updateItems\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, \"extInfo\" : \"extInfo\" }, { \"namespace\" : { \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"env\" : \"env\", \"namespaceName\" : \"namespaceName\" }, \"diffs\" : { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"deleteItems\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ], \"createItems\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ], \"updateItems\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, \"extInfo\" : \"extInfo\" } ]"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -93,48 +83,30 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterName } /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} : 通过编码的key更新配置项 - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items : 创建新的配置项 (original openapi) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param createIfNotExists (required) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (required) * @param openItemDTO (required) - * @return 配置项更新成功(编码key) (status code 200) + * @return 配置项创建成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) - * or 配置项不存在 (status code 404) - * @see ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut + * @see ItemManagementApi#createItem */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(String appId, + default ResponseEntity createItem(String appId, String env, String clusterName, String namespaceName, - String key, - Boolean createIfNotExists, + String operator, OpenItemDTO openItemDTO) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -145,92 +117,66 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClu } /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate : 通过文本批量修改配置项 - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} : 删除配置项 (original openapi) + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceTextModel (required) - * @return 批量更新配置项成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - * @see ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名 (required) + * @param operator 操作人用户名 (required) + * @return 配置项删除成功 (status code 200) + * @see ItemManagementApi#deleteItem */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut(String appId, + default ResponseEntity deleteItem(String appId, String env, String clusterName, String namespaceName, - NamespaceTextModel namespaceTextModel) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); + String key, + String operator) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare : 对比命名空间配置差异 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} : 通过编码的key删除配置项 (original openapi) + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} * * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param namespaceSyncModel (required) - * @return 成功对比命名空间配置差异 (status code 200) - * @see ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost + * @param key (required) + * @param operator (required) + * @return (status code 200) + * @see ItemManagementApi#deleteItemByEncodedKey */ - default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost(String appId, + default ResponseEntity deleteItemByEncodedKey(String appId, String env, String clusterName, String namespaceName, - NamespaceSyncModel namespaceSyncModel) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"namespace\" : { \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"env\" : \"env\", \"namespaceName\" : \"namespaceName\" }, \"diffs\" : { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"deleteItems\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"type\" : 1, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"namespaceId\" : 6, \"lineNum\" : 5, \"comment\" : \"comment\", \"id\" : 0, \"value\" : \"value\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"type\" : 1, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"namespaceId\" : 6, \"lineNum\" : 5, \"comment\" : \"comment\", \"id\" : 0, \"value\" : \"value\", \"key\" : \"key\" } ], \"createItems\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"type\" : 1, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"namespaceId\" : 6, \"lineNum\" : 5, \"comment\" : \"comment\", \"id\" : 0, \"value\" : \"value\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"type\" : 1, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"namespaceId\" : 6, \"lineNum\" : 5, \"comment\" : \"comment\", \"id\" : 0, \"value\" : \"value\", \"key\" : \"key\" } ], \"updateItems\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"type\" : 1, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"namespaceId\" : 6, \"lineNum\" : 5, \"comment\" : \"comment\", \"id\" : 0, \"value\" : \"value\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"type\" : 1, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"namespaceId\" : 6, \"lineNum\" : 5, \"comment\" : \"comment\", \"id\" : 0, \"value\" : \"value\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }, \"extInfo\" : \"extInfo\" }, { \"namespace\" : { \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"env\" : \"env\", \"namespaceName\" : \"namespaceName\" }, \"diffs\" : { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"deleteItems\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"type\" : 1, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"namespaceId\" : 6, \"lineNum\" : 5, \"comment\" : \"comment\", \"id\" : 0, \"value\" : \"value\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"type\" : 1, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"namespaceId\" : 6, \"lineNum\" : 5, \"comment\" : \"comment\", \"id\" : 0, \"value\" : \"value\", \"key\" : \"key\" } ], \"createItems\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"type\" : 1, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"namespaceId\" : 6, \"lineNum\" : 5, \"comment\" : \"comment\", \"id\" : 0, \"value\" : \"value\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"type\" : 1, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"namespaceId\" : 6, \"lineNum\" : 5, \"comment\" : \"comment\", \"id\" : 0, \"value\" : \"value\", \"key\" : \"key\" } ], \"updateItems\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"type\" : 1, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"namespaceId\" : 6, \"lineNum\" : 5, \"comment\" : \"comment\", \"id\" : 0, \"value\" : \"value\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"type\" : 1, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"namespaceId\" : 6, \"lineNum\" : 5, \"comment\" : \"comment\", \"id\" : 0, \"value\" : \"value\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }, \"extInfo\" : \"extInfo\" } ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); + String key, + String operator) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items : 获取命名空间下的配置项列表 - * + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items : 获取命名空间下的配置项列表 (original openapi) + * 获取指定命名空间的配置项列表,支持分页 * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (required) - * @param size (required) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) * @return 成功获取配置项列表 (status code 200) * or 命名空间不存在 (status code 404) - * @see ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet + * @see ItemManagementApi#findItemsByNamespace */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet(String appId, + default ResponseEntity findItemsByNamespace(String appId, String env, String clusterName, String namespaceName, @@ -239,12 +185,7 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClusters getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"total\" : 1, \"size\" : 6, \"page\" : 0, \"content\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" } ] }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; + String exampleString = "{ \"total\" : 1, \"size\" : 6, \"page\" : 0, \"content\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ] }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -255,42 +196,50 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClusters } /** - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} : 删除配置项 - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items : 获取分支下的配置项 (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param operator (required) - * @return (status code 200) - * @see ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @return 成功获取分支下的配置项列表 (status code 200) + * or 分支不存在 (status code 404) + * @see ItemManagementApi#getBranchItems */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete(String appId, + default ResponseEntity> getBranchItems(String appId, String env, String clusterName, String namespaceName, - String key, - String operator) { + String branchName) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "[ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ]"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} : 获取单个配置项 - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} : 获取单个配置项 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名 (required) * @return 成功获取配置项 (status code 200) * or 配置项不存在 (status code 404) - * @see ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet + * @see ItemManagementApi#getItem */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet(String appId, + default ResponseEntity getItem(String appId, String env, String clusterName, String namespaceName, @@ -298,12 +247,7 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterName getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -314,48 +258,27 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterName } /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} : 更新配置项 - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} : 通过查询参数获取配置项(支持编码的key) (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} * * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param createIfNotExists (required) - * @param openItemDTO (required) - * @return 配置项更新成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名(需要URL编码) (required) + * @return 成功获取配置项(支持编码key) (status code 200) * or 配置项不存在 (status code 404) - * @see ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut + * @see ItemManagementApi#getItemByEncodedKey */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut(String appId, + default ResponseEntity getItemByEncodedKey(String appId, String env, String clusterName, String namespaceName, - String key, - Boolean createIfNotExists, - OpenItemDTO openItemDTO) { + String key) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -366,161 +289,127 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClu } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items : 创建新的配置项 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert : 撤销配置项更改 (new added) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert * * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param openItemDTO (required) - * @return 配置项创建成功 (status code 200) + * @param operator 操作人用户名 (required) + * @return 配置项更改撤销成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) - * @see ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost + * @see ItemManagementApi#revertItems */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost(String appId, + default ResponseEntity revertItems(String appId, String env, String clusterName, String namespaceName, - OpenItemDTO openItemDTO) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); + String operator) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert : 撤销配置项更改 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync : 同步配置项到多个命名空间 (new added) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync: * - * @param appId (required) - * @param env (required) + * @param appId 应用ID (required) + * @param env 环境标识 (required) * @param clusterName (required) * @param namespaceName (required) - * @return 配置项更改撤销成功 (status code 200) + * @param operator 操作人用户名 (required) + * @param openNamespaceSyncModel (required) + * @return 配置项同步成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) - * @see ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost + * @see ItemManagementApi#syncItems */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost(String appId, + default ResponseEntity syncItems(String appId, String env, String clusterName, - String namespaceName) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); + String namespaceName, + String operator, + OpenNamespaceSyncModel openNamespaceSyncModel) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync : 同步配置项到多个命名空间 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} : 更新配置项 (original openapi) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} * * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceSyncModel (required) - * @return 配置项同步成功 (status code 200) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key (required) + * @param createIfNotExists (required) + * @param openItemDTO (required) + * @return 配置项更新成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) - * @see ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost + * or 配置项不存在 (status code 404) + * @see ItemManagementApi#updateItem */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost(String appId, + default ResponseEntity updateItem(String appId, String env, String clusterName, String namespaceName, - NamespaceSyncModel namespaceSyncModel) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); + String key, + Boolean createIfNotExists, + OpenItemDTO openItemDTO) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate : 验证配置文本语法 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} : 通过编码的key更新配置项 (original openapi) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + * + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名(需要URL编码) (required) + * @param createIfNotExists 若不存在则创建(true/false) (required) + * @param openItemDTO (required) + * @return 配置项更新成功(编码key) (status code 200) + * or 请求参数错误 (status code 400) + * or 权限不足 (status code 403) + * or 配置项不存在 (status code 404) + * @see ItemManagementApi#updateItemByEncodedKey + */ + default ResponseEntity updateItemByEncodedKey(String appId, + String env, + String clusterName, + String namespaceName, + String key, + Boolean createIfNotExists, + OpenItemDTO openItemDTO) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate : 验证配置文本语法 (new added) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate * * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param namespaceTextModel (required) + * @param openNamespaceTextModel (required) * @return 配置文本语法验证通过 (status code 200) * or 配置文本语法错误 (status code 400) - * @see ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost + * @see ItemManagementApi#validateItems */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost(String appId, + default ResponseEntity validateItems(String appId, String env, String clusterName, String namespaceName, - NamespaceTextModel namespaceTextModel) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"valid\" : true, \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"valid\" : true, \"message\" : \"message\", \"errors\" : [ \"errors\", \"errors\" ] }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); + OpenNamespaceTextModel openNamespaceTextModel) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApi.java index 360b70d1..ac043e6f 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 @@ -1,17 +1,15 @@ -/* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.15.0). +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.6.0). * https://openapi-generator.tech * Do not edit the class manually. */ package com.apollo.openapi.server.api; -import com.apollo.openapi.server.model.NamespaceGrayDelReleaseDTO; +import java.util.Map; import com.apollo.openapi.server.model.NamespaceReleaseDTO; import com.apollo.openapi.server.model.OpenGrayReleaseRuleDTO; -import com.apollo.openapi.server.model.OpenItemDTO; import com.apollo.openapi.server.model.OpenNamespaceDTO; import com.apollo.openapi.server.model.OpenReleaseDTO; -import com.apollo.openapi.server.model.OpenapiV1AppsGet401Response; import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -23,8 +21,6 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; -import io.swagger.v3.oas.annotations.media.ExampleObject; -import org.springframework.lang.Nullable; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -36,7 +32,7 @@ import java.util.Map; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") @Validated @Tag(name = "Namespace Branch Management", description = "the Namespace Branch Management API") public interface NamespaceBranchManagementApi { @@ -45,25 +41,24 @@ default NamespaceBranchManagementApiDelegate getDelegate() { return new NamespaceBranchManagementApiDelegate() {}; } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCH_POST = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch"; /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch : 创建命名空间分支 - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches : 创建命名空间分支 (original openapi) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param operator (required) - * @return (status code 200) + * @param appId app标识 (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (required) + * @return 命名空间分支创建成功 (status code 200) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost", - summary = "创建命名空间分支", - description = "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch", + operationId = "createBranch", + summary = "创建命名空间分支 (original openapi)", + description = "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches", tags = { "Namespace Branch Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { + @ApiResponse(responseCode = "200", description = "命名空间分支创建成功", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = OpenNamespaceDTO.class)) }) }, @@ -73,41 +68,39 @@ default NamespaceBranchManagementApiDelegate getDelegate() { ) @RequestMapping( method = RequestMethod.POST, - value = NamespaceBranchManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCH_POST, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches", produces = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @NotNull @Parameter(name = "operator", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator + default ResponseEntity createBranch( + @Parameter(name = "appId", description = "app标识", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, + @NotNull @Parameter(name = "operator", description = "操作人用户名", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost(appId, env, clusterName, namespaceName, operator); + return getDelegate().createBranch(appId, env, clusterName, namespaceName, operator); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_DELETE = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}"; /** - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} : 删除命名空间分支 + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} : 删除命名空间分支 (original openapi) * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} * - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param operator (required) - * @return (status code 200) + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param operator 操作人用户名 (required) + * @return 分支删除成功 (status code 200) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete", - summary = "删除命名空间分支", + operationId = "deleteBranch", + summary = "删除命名空间分支 (original openapi)", description = "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}", tags = { "Namespace Branch Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { + @ApiResponse(responseCode = "200", description = "分支删除成功", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }) }, @@ -117,183 +110,43 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersCluste ) @RequestMapping( method = RequestMethod.DELETE, - value = NamespaceBranchManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_DELETE, - produces = { "application/json" } - ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete( - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "branchName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName, - @NotNull @Parameter(name = "operator", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator - ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete(env, appId, clusterName, namespaceName, branchName, operator); - } - - - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_GRAY_DEL_RELEASES_POST = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases"; - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases : 创建灰度删除发布 - * - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param namespaceGrayDelReleaseDTO (required) - * @return (status code 200) - */ - @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost", - summary = "创建灰度删除发布", - description = "", - tags = { "Namespace Branch Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenReleaseDTO.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = NamespaceBranchManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_GRAY_DEL_RELEASES_POST, - produces = { "application/json" }, - consumes = { "application/json" } - ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "branchName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName, - @Parameter(name = "NamespaceGrayDelReleaseDTO", description = "", required = true) @Valid @RequestBody NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO - ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO); - } - - - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_GRAY_RULES_GET = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules"; - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules : 获取分支灰度发布规则 - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @return (status code 200) - */ - @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet", - summary = "获取分支灰度发布规则", - description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules", - tags = { "Namespace Branch Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenGrayReleaseRuleDTO.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = NamespaceBranchManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_GRAY_RULES_GET, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}", produces = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "branchName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName - ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet(appId, env, clusterName, namespaceName, branchName); - } - - - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_GRAY_RULES_PUT = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules"; - /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules : 更新分支灰度发布规则 - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param operator (required) - * @param openGrayReleaseRuleDTO (required) - * @return (status code 200) - */ - @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut", - summary = "更新分支灰度发布规则", - description = "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules", - tags = { "Namespace Branch Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.PUT, - value = NamespaceBranchManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_GRAY_RULES_PUT, - produces = { "application/json" }, - consumes = { "application/json" } - ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "branchName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName, - @NotNull @Parameter(name = "operator", description = "", required = true, in = ParameterIn.HEADER) @RequestHeader(value = "operator", required = true) String operator, - @Parameter(name = "OpenGrayReleaseRuleDTO", description = "", required = true) @Valid @RequestBody OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO + default ResponseEntity deleteBranch( + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, + @Parameter(name = "branchName", description = "分支名称", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName, + @NotNull @Parameter(name = "operator", description = "操作人用户名", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO); + return getDelegate().deleteBranch(env, appId, clusterName, namespaceName, branchName, operator); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_ITEMS_GET = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items"; /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items : 获取分支下的配置项 - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches : 获取命名空间分支信息 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @return 成功获取分支下的配置项列表 (status code 200) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @return 成功获取分支信息 (status code 200) * or 分支不存在 (status code 404) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet", - summary = "获取分支下的配置项", - description = "GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items", + operationId = "findBranch", + summary = "获取命名空间分支信息 (original openapi)", + description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches", tags = { "Namespace Branch Management" }, responses = { - @ApiResponse(responseCode = "200", description = "成功获取分支下的配置项列表", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenItemDTO.class))) + @ApiResponse(responseCode = "200", description = "成功获取分支信息", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenNamespaceDTO.class)) }), @ApiResponse(responseCode = "404", description = "分支不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }) }, security = { @@ -302,51 +155,38 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNames ) @RequestMapping( method = RequestMethod.GET, - value = NamespaceBranchManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_ITEMS_GET, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches", produces = { "application/json" } ) - - default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "branchName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName + default ResponseEntity findBranch( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet(appId, env, clusterName, namespaceName, branchName); + return getDelegate().findBranch(appId, env, clusterName, namespaceName); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_MERGE_POST = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge"; /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge : 合并分支 - * + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules : 获取分支灰度发布规则 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param deleteBranch (required) - * @param namespaceReleaseDTO (required) - * @return 分支合并成功 (status code 200) - * or 合并参数错误 (status code 400) - * or 权限不足 (status code 403) + * @param appId app标识 (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @return 成功获取灰度发布规则 (status code 200) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost", - summary = "合并分支", - description = "", + operationId = "getBranchGrayRules", + summary = "获取分支灰度发布规则 (original openapi)", + description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules", tags = { "Namespace Branch Management" }, responses = { - @ApiResponse(responseCode = "200", description = "分支合并成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenReleaseDTO.class)) - }), - @ApiResponse(responseCode = "400", description = "合并参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) - }), - @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @ApiResponse(responseCode = "200", description = "成功获取灰度发布规则", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenGrayReleaseRuleDTO.class)) }) }, security = { @@ -354,47 +194,42 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClust } ) @RequestMapping( - method = RequestMethod.POST, - value = NamespaceBranchManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_MERGE_POST, - produces = { "application/json" }, - consumes = { "application/json" } + method = RequestMethod.GET, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules", + produces = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "branchName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName, - @NotNull @Parameter(name = "deleteBranch", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "deleteBranch", required = true) Boolean deleteBranch, - @Parameter(name = "NamespaceReleaseDTO", description = "", required = true) @Valid @RequestBody NamespaceReleaseDTO namespaceReleaseDTO + default ResponseEntity getBranchGrayRules( + @Parameter(name = "appId", description = "app标识", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, + @Parameter(name = "branchName", description = "分支名称", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO); + return getDelegate().getBranchGrayRules(appId, env, clusterName, namespaceName, branchName); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_PATCH = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}"; /** - * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} : 合并分支到主分支 + * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} : 合并分支到主分支 (new added) * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") * - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param deleteBranch (required) - * @param xApolloOperator (required) + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param deleteBranch 合并后是否删除分支(true/false) (required) + * @param operator 操作人用户名 (required) * @param namespaceReleaseDTO (required) - * @return (status code 200) + * @return 分支合并成功 (status code 200) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch", - summary = "合并分支到主分支", + operationId = "mergeBranch", + summary = "合并分支到主分支 (new added)", description = "PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\")", tags = { "Namespace Branch Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { + @ApiResponse(responseCode = "200", description = "分支合并成功", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = OpenReleaseDTO.class)) }) }, @@ -404,46 +239,45 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterN ) @RequestMapping( method = RequestMethod.PATCH, - value = NamespaceBranchManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_PATCH, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}", produces = { "application/json" }, consumes = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch( - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "branchName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName, - @NotNull @Parameter(name = "deleteBranch", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "deleteBranch", required = true) Boolean deleteBranch, - @NotNull @Parameter(name = "X-Apollo-Operator", description = "", required = true, in = ParameterIn.HEADER) @RequestHeader(value = "X-Apollo-Operator", required = true) String xApolloOperator, + default ResponseEntity mergeBranch( + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, + @Parameter(name = "branchName", description = "分支名称", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName, + @NotNull @Parameter(name = "deleteBranch", description = "合并后是否删除分支(true/false)", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "deleteBranch", required = true) Boolean deleteBranch, + @NotNull @Parameter(name = "operator", description = "操作人用户名", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator, @Parameter(name = "NamespaceReleaseDTO", description = "", required = true) @Valid @RequestBody NamespaceReleaseDTO namespaceReleaseDTO ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(env, appId, clusterName, namespaceName, branchName, deleteBranch, xApolloOperator, namespaceReleaseDTO); + return getDelegate().mergeBranch(env, appId, clusterName, namespaceName, branchName, deleteBranch, operator, namespaceReleaseDTO); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_RELEASES_POST = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases"; /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases : 创建灰度发布 - * + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules : 更新分支灰度发布规则 (original openapi) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param namespaceReleaseDTO (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param operator 操作人用户名 (required) + * @param openGrayReleaseRuleDTO (required) + * @return 灰度规则更新成功 (status code 200) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost", - summary = "创建灰度发布", - description = "", + operationId = "updateBranchRules", + summary = "更新分支灰度发布规则 (original openapi)", + description = "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules", tags = { "Namespace Branch Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenReleaseDTO.class)) + @ApiResponse(responseCode = "200", description = "灰度规则更新成功", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }) }, security = { @@ -451,21 +285,21 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterN } ) @RequestMapping( - method = RequestMethod.POST, - value = NamespaceBranchManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_RELEASES_POST, + method = RequestMethod.PUT, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules", produces = { "application/json" }, consumes = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "branchName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName, - @Parameter(name = "NamespaceReleaseDTO", description = "", required = true) @Valid @RequestBody NamespaceReleaseDTO namespaceReleaseDTO + default ResponseEntity updateBranchRules( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, + @Parameter(name = "branchName", description = "分支名称", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName, + @NotNull @Parameter(name = "operator", description = "操作人用户名", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator, + @Parameter(name = "OpenGrayReleaseRuleDTO", description = "", required = true) @Valid @RequestBody OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO); + return getDelegate().updateBranchRules(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO); } } 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 8ffc4b15..996e2b81 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,18 +1,15 @@ package com.apollo.openapi.server.api; -import com.apollo.openapi.server.model.NamespaceGrayDelReleaseDTO; +import java.util.Map; import com.apollo.openapi.server.model.NamespaceReleaseDTO; import com.apollo.openapi.server.model.OpenGrayReleaseRuleDTO; -import com.apollo.openapi.server.model.OpenItemDTO; import com.apollo.openapi.server.model.OpenNamespaceDTO; import com.apollo.openapi.server.model.OpenReleaseDTO; -import com.apollo.openapi.server.model.OpenapiV1AppsGet401Response; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; -import org.springframework.lang.Nullable; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; @@ -32,7 +29,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") @Controller @RequestMapping("${openapi.apolloOpen.base-path:}") public class NamespaceBranchManagementApiController implements NamespaceBranchManagementApi { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApiDelegate.java index ea751962..3583b6bd 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,21 +1,16 @@ package com.apollo.openapi.server.api; -import com.apollo.openapi.server.model.NamespaceGrayDelReleaseDTO; +import java.util.Map; import com.apollo.openapi.server.model.NamespaceReleaseDTO; import com.apollo.openapi.server.model.OpenGrayReleaseRuleDTO; -import com.apollo.openapi.server.model.OpenItemDTO; import com.apollo.openapi.server.model.OpenNamespaceDTO; import com.apollo.openapi.server.model.OpenReleaseDTO; -import com.apollo.openapi.server.model.OpenapiV1AppsGet401Response; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; -import org.springframework.lang.Nullable; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; -import javax.validation.constraints.*; -import javax.validation.Valid; import java.util.List; import java.util.Map; import java.util.Optional; @@ -25,7 +20,7 @@ * A delegate to be called by the {@link NamespaceBranchManagementApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") public interface NamespaceBranchManagementApiDelegate { default Optional getRequest() { @@ -33,18 +28,18 @@ default Optional getRequest() { } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch : 创建命名空间分支 - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches : 创建命名空间分支 (original openapi) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param operator (required) - * @return (status code 200) - * @see NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost + * @param appId app标识 (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (required) + * @return 命名空间分支创建成功 (status code 200) + * @see NamespaceBranchManagementApi#createBranch */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost(String appId, + default ResponseEntity createBranch(String appId, String env, String clusterName, String namespaceName, @@ -52,7 +47,7 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersCluste getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -63,19 +58,19 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersCluste } /** - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} : 删除命名空间分支 + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} : 删除命名空间分支 (original openapi) * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} * - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param operator (required) - * @return (status code 200) - * @see NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param operator 操作人用户名 (required) + * @return 分支删除成功 (status code 200) + * @see NamespaceBranchManagementApi#deleteBranch */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete(String env, + default ResponseEntity deleteBranch(String env, String appId, String clusterName, String namespaceName, @@ -86,119 +81,25 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNames } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases : 创建灰度删除发布 - * - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param namespaceGrayDelReleaseDTO (required) - * @return (status code 200) - * @see NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost - */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost(String appId, - String env, - String clusterName, - String namespaceName, - String branchName, - NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules : 获取分支灰度发布规则 - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @return (status code 200) - * @see NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet - */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet(String appId, - String env, - String clusterName, - String namespaceName, - String branchName) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"branchName\" : \"branchName\", \"ruleItems\" : [ { \"clientIpList\" : [ \"clientIpList\", \"clientIpList\" ], \"clientLabelList\" : [ \"clientLabelList\", \"clientLabelList\" ], \"clientAppId\" : \"clientAppId\" }, { \"clientIpList\" : [ \"clientIpList\", \"clientIpList\" ], \"clientLabelList\" : [ \"clientLabelList\", \"clientLabelList\" ], \"clientAppId\" : \"clientAppId\" } ], \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules : 更新分支灰度发布规则 - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param operator (required) - * @param openGrayReleaseRuleDTO (required) - * @return (status code 200) - * @see NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut - */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut(String appId, - String env, - String clusterName, - String namespaceName, - String branchName, - String operator, - OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items : 获取分支下的配置项 - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches : 获取命名空间分支信息 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @return 成功获取分支下的配置项列表 (status code 200) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @return 成功获取分支信息 (status code 200) * or 分支不存在 (status code 404) - * @see NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet + * @see NamespaceBranchManagementApi#findBranch */ - default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet(String appId, + default ResponseEntity findBranch(String appId, String env, String clusterName, - String namespaceName, - String branchName) { + String namespaceName) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" } ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -209,42 +110,26 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClust } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge : 合并分支 - * + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules : 获取分支灰度发布规则 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param deleteBranch (required) - * @param namespaceReleaseDTO (required) - * @return 分支合并成功 (status code 200) - * or 合并参数错误 (status code 400) - * or 权限不足 (status code 403) - * @see NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost + * @param appId app标识 (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @return 成功获取灰度发布规则 (status code 200) + * @see NamespaceBranchManagementApi#getBranchGrayRules */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(String appId, + default ResponseEntity getBranchGrayRules(String appId, String env, String clusterName, String namespaceName, - String branchName, - Boolean deleteBranch, - NamespaceReleaseDTO namespaceReleaseDTO) { + String branchName) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"branchName\" : \"branchName\", \"ruleItems\" : [ { \"clientIpList\" : [ \"clientIpList\", \"clientIpList\" ], \"clientLabelList\" : [ \"clientLabelList\", \"clientLabelList\" ], \"clientAppId\" : \"clientAppId\" }, { \"clientIpList\" : [ \"clientIpList\", \"clientIpList\" ], \"clientLabelList\" : [ \"clientLabelList\", \"clientLabelList\" ], \"clientAppId\" : \"clientAppId\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -255,32 +140,32 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterN } /** - * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} : 合并分支到主分支 + * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} : 合并分支到主分支 (new added) * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") * - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param deleteBranch (required) - * @param xApolloOperator (required) + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param deleteBranch 合并后是否删除分支(true/false) (required) + * @param operator 操作人用户名 (required) * @param namespaceReleaseDTO (required) - * @return (status code 200) - * @see NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch + * @return 分支合并成功 (status code 200) + * @see NamespaceBranchManagementApi#mergeBranch */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(String env, + default ResponseEntity mergeBranch(String env, String appId, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, - String xApolloOperator, + String operator, NamespaceReleaseDTO namespaceReleaseDTO) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -291,33 +176,26 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterN } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases : 创建灰度发布 - * + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules : 更新分支灰度发布规则 (original openapi) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param namespaceReleaseDTO (required) - * @return (status code 200) - * @see NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param operator 操作人用户名 (required) + * @param openGrayReleaseRuleDTO (required) + * @return 灰度规则更新成功 (status code 200) + * @see NamespaceBranchManagementApi#updateBranchRules */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost(String appId, + default ResponseEntity updateBranchRules(String appId, String env, String clusterName, String namespaceName, String branchName, - NamespaceReleaseDTO namespaceReleaseDTO) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); + String operator, + OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApi.java index cb964e9f..a50c5c62 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 @@ -1,14 +1,14 @@ -/* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.15.0). +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.6.0). * https://openapi-generator.tech * Do not edit the class manually. */ package com.apollo.openapi.server.api; +import java.util.Map; import com.apollo.openapi.server.model.OpenAppNamespaceDTO; import com.apollo.openapi.server.model.OpenNamespaceDTO; import com.apollo.openapi.server.model.OpenNamespaceLockDTO; -import com.apollo.openapi.server.model.OpenapiV1AppsGet401Response; import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -20,8 +20,6 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; -import io.swagger.v3.oas.annotations.media.ExampleObject; -import org.springframework.lang.Nullable; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -33,7 +31,7 @@ import java.util.Map; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") @Validated @Tag(name = "Namespace Management", description = "命名空间管理相关接口,包括命名空间的创建、查询、配置等操作") public interface NamespaceManagementApi { @@ -42,22 +40,23 @@ default NamespaceManagementApiDelegate getDelegate() { return new NamespaceManagementApiDelegate() {}; } - public static final String PATH_OPENAPI_V1_APPNAMESPACES_GET = "/openapi/v1/appnamespaces"; /** - * GET /openapi/v1/appnamespaces : 获取所有公共AppNamespace - * GET /openapi/v1/appnamespaces?public=true + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check : 检查缺失的Namespace (new added) + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check * - * @param publicOnly (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @return 缺失的命名空间名称列表 (status code 200) */ @Operation( - operationId = "openapiV1AppnamespacesGet", - summary = "获取所有公共AppNamespace", - description = "GET /openapi/v1/appnamespaces?public=true", + operationId = "checkNamespaceIntegrity", + summary = "检查缺失的Namespace (new added)", + description = "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check", tags = { "Namespace Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenAppNamespaceDTO.class))) + @ApiResponse(responseCode = "200", description = "缺失的命名空间名称列表", content = { + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = String.class))) }) }, security = { @@ -66,33 +65,158 @@ default NamespaceManagementApiDelegate getDelegate() { ) @RequestMapping( method = RequestMethod.GET, - value = NamespaceManagementApi.PATH_OPENAPI_V1_APPNAMESPACES_GET, + value = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check", produces = { "application/json" } ) - - default ResponseEntity> openapiV1AppnamespacesGet( - @NotNull @Parameter(name = "publicOnly", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "publicOnly", required = true) Boolean publicOnly + default ResponseEntity> checkNamespaceIntegrity( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName ) { - return getDelegate().openapiV1AppnamespacesGet(publicOnly); + return getDelegate().checkNamespaceIntegrity(appId, env, clusterName); } - public static final String PATH_OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_GET = "/openapi/v1/apps/{appId}/appnamespaces"; /** - * GET /openapi/v1/apps/{appId}/appnamespaces : 获取指定应用的AppNamespace - * GET /openapi/v1/apps/{appId}/appnamespaces + * POST /openapi/v1/apps/{appId}/appnamespaces : 创建AppNamespace (original openapi) + * POST /openapi/v1/apps/{appId}/appnamespaces + * + * @param appId (required) + * @param openAppNamespaceDTO (required) + * @return AppNamespace创建成功 (status code 200) + * or 请求参数错误 (status code 400) + * or 权限不足 (status code 403) + */ + @Operation( + operationId = "createNamespace", + summary = "创建AppNamespace (original openapi)", + description = "POST /openapi/v1/apps/{appId}/appnamespaces", + tags = { "Namespace Management" }, + responses = { + @ApiResponse(responseCode = "200", description = "AppNamespace创建成功", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenAppNamespaceDTO.class)) + }), + @ApiResponse(responseCode = "400", description = "请求参数错误", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + }), + @ApiResponse(responseCode = "403", description = "权限不足", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + }) + }, + security = { + @SecurityRequirement(name = "ApiKeyAuth") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/openapi/v1/apps/{appId}/appnamespaces", + produces = { "application/json" }, + consumes = { "application/json" } + ) + default ResponseEntity createNamespace( + @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "OpenAppNamespaceDTO", description = "", required = true) @Valid @RequestBody OpenAppNamespaceDTO openAppNamespaceDTO + ) { + return getDelegate().createNamespace(appId, openAppNamespaceDTO); + } + + + /** + * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} : 删除AppNamespace (new added) + * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (required) + * @return AppNamespace删除成功 (status code 200) + */ + @Operation( + operationId = "deleteAppNamespace", + summary = "删除AppNamespace (new added)", + description = "DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}", + tags = { "Namespace Management" }, + responses = { + @ApiResponse(responseCode = "200", description = "AppNamespace删除成功", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) + }) + }, + security = { + @SecurityRequirement(name = "ApiKeyAuth") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}", + produces = { "application/json" } + ) + default ResponseEntity deleteAppNamespace( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, + @NotNull @Parameter(name = "operator", description = "操作人用户名", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator + ) { + return getDelegate().deleteAppNamespace(appId, namespaceName, operator); + } + + + /** + * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links : 删除关联的Namespace (new added) + * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links + * + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (required) + * @return 解除关联成功 (status code 200) + */ + @Operation( + operationId = "deleteNamespaceLinks", + summary = "删除关联的Namespace (new added)", + description = "DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links", + tags = { "Namespace Management" }, + responses = { + @ApiResponse(responseCode = "200", description = "解除关联成功", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) + }) + }, + security = { + @SecurityRequirement(name = "ApiKeyAuth") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links", + produces = { "application/json" } + ) + default ResponseEntity deleteNamespaceLinks( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, + @NotNull @Parameter(name = "operator", description = "操作人用户名", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator + ) { + return getDelegate().deleteNamespaceLinks(appId, env, clusterName, namespaceName, operator); + } + + + /** + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces : 获取指定集群下的所有Namespace (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces * * @param appId (required) + * @param env (required) + * @param clusterName (required) + * @param fillItemDetail (required) * @return (status code 200) */ @Operation( - operationId = "openapiV1AppsAppIdAppnamespacesGet", - summary = "获取指定应用的AppNamespace", - description = "GET /openapi/v1/apps/{appId}/appnamespaces", + operationId = "findNamespaces", + summary = "获取指定集群下的所有Namespace (original openapi)", + description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces", tags = { "Namespace Management" }, responses = { @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenAppNamespaceDTO.class))) + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenNamespaceDTO.class))) }) }, security = { @@ -101,33 +225,34 @@ default ResponseEntity> openapiV1AppnamespacesGet( ) @RequestMapping( method = RequestMethod.GET, - value = NamespaceManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_GET, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces", produces = { "application/json" } ) - - default ResponseEntity> openapiV1AppsAppIdAppnamespacesGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId + default ResponseEntity> findNamespaces( + @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, + @NotNull @Parameter(name = "fillItemDetail", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "fillItemDetail", required = true, defaultValue = "true") Boolean fillItemDetail ) { - return getDelegate().openapiV1AppsAppIdAppnamespacesGet(appId); + return getDelegate().findNamespaces(appId, env, clusterName, fillItemDetail); } - public static final String PATH_OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_NAMESPACE_NAME_GET = "/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}"; /** - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} : 获取指定的AppNamespace + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} : 获取指定的AppNamespace (new added) * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} * - * @param appId (required) - * @param namespaceName (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @return 成功获取AppNamespace (status code 200) */ @Operation( - operationId = "openapiV1AppsAppIdAppnamespacesNamespaceNameGet", - summary = "获取指定的AppNamespace", + operationId = "getAppNamespace", + summary = "获取指定的AppNamespace (new added)", description = "GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}", tags = { "Namespace Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { + @ApiResponse(responseCode = "200", description = "成功获取AppNamespace", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = OpenAppNamespaceDTO.class)) }) }, @@ -137,43 +262,32 @@ default ResponseEntity> openapiV1AppsAppIdAppnamespace ) @RequestMapping( method = RequestMethod.GET, - value = NamespaceManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_NAMESPACE_NAME_GET, + value = "/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}", produces = { "application/json" } ) - - default ResponseEntity openapiV1AppsAppIdAppnamespacesNamespaceNameGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName + default ResponseEntity getAppNamespace( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName ) { - return getDelegate().openapiV1AppsAppIdAppnamespacesNamespaceNameGet(appId, namespaceName); + return getDelegate().getAppNamespace(appId, namespaceName); } - public static final String PATH_OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_POST = "/openapi/v1/apps/{appId}/appnamespaces"; /** - * POST /openapi/v1/apps/{appId}/appnamespaces : 创建AppNamespace - * POST /openapi/v1/apps/{appId}/appnamespaces + * GET /openapi/v1/appnamespaces : 获取所有公共AppNamespace (new added) + * GET /openapi/v1/appnamespaces?public=true * - * @param appId (required) - * @param openAppNamespaceDTO (required) - * @return AppNamespace创建成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) + * @param publicOnly (required) + * @return (status code 200) */ @Operation( - operationId = "openapiV1AppsAppIdAppnamespacesPost", - summary = "创建AppNamespace", - description = "POST /openapi/v1/apps/{appId}/appnamespaces", + operationId = "getAppNamespaces", + summary = "获取所有公共AppNamespace (new added)", + description = "GET /openapi/v1/appnamespaces?public=true", tags = { "Namespace Management" }, responses = { - @ApiResponse(responseCode = "200", description = "AppNamespace创建成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenAppNamespaceDTO.class)) - }), - @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) - }), - @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @ApiResponse(responseCode = "200", description = "", content = { + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenAppNamespaceDTO.class))) }) }, security = { @@ -181,38 +295,32 @@ default ResponseEntity openapiV1AppsAppIdAppnamespacesNames } ) @RequestMapping( - method = RequestMethod.POST, - value = NamespaceManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_POST, - produces = { "application/json" }, - consumes = { "application/json" } + method = RequestMethod.GET, + value = "/openapi/v1/appnamespaces", + produces = { "application/json" } ) - - default ResponseEntity openapiV1AppsAppIdAppnamespacesPost( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "OpenAppNamespaceDTO", description = "", required = true) @Valid @RequestBody OpenAppNamespaceDTO openAppNamespaceDTO + default ResponseEntity> getAppNamespaces( + @NotNull @Parameter(name = "publicOnly", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "publicOnly", required = true) Boolean publicOnly ) { - return getDelegate().openapiV1AppsAppIdAppnamespacesPost(appId, openAppNamespaceDTO); + return getDelegate().getAppNamespaces(publicOnly); } - public static final String PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_INTEGRITY_CHECK_GET = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check"; /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check : 检查缺失的Namespace - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check + * GET /openapi/v1/apps/{appId}/appnamespaces : 获取指定应用的AppNamespace (new added) + * GET /openapi/v1/apps/{appId}/appnamespaces * * @param appId (required) - * @param env (required) - * @param clusterName (required) * @return (status code 200) */ @Operation( - operationId = "openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet", - summary = "检查缺失的Namespace", - description = "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check", + operationId = "getAppNamespacesByApp", + summary = "获取指定应用的AppNamespace (new added)", + description = "GET /openapi/v1/apps/{appId}/appnamespaces", tags = { "Namespace Management" }, responses = { @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = String.class))) + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenAppNamespaceDTO.class))) }) }, security = { @@ -221,23 +329,19 @@ default ResponseEntity openapiV1AppsAppIdAppnamespacesPost( ) @RequestMapping( method = RequestMethod.GET, - value = NamespaceManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_INTEGRITY_CHECK_GET, + value = "/openapi/v1/apps/{appId}/appnamespaces", produces = { "application/json" } ) - - default ResponseEntity> openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName + default ResponseEntity> getAppNamespacesByApp( + @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId ) { - return getDelegate().openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet(appId, env, clusterName); + return getDelegate().getAppNamespacesByApp(appId); } - public static final String PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_PUBLIC_ASSOCIATION_GET = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association"; /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association : 获取关联的公共Namespace - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock : 获取Namespace的锁状态 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock * * @param appId (required) * @param env (required) @@ -246,13 +350,13 @@ default ResponseEntity> openapiV1AppsAppIdEnvsEnvClustersClusterNam * @return (status code 200) */ @Operation( - operationId = "openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet", - summary = "获取关联的公共Namespace", - description = "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association", + operationId = "getNamespaceLock", + summary = "获取Namespace的锁状态 (original openapi)", + description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock", tags = { "Namespace Management" }, responses = { @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenNamespaceDTO.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenNamespaceLockDTO.class)) }) }, security = { @@ -261,38 +365,67 @@ default ResponseEntity> openapiV1AppsAppIdEnvsEnvClustersClusterNam ) @RequestMapping( method = RequestMethod.GET, - value = NamespaceManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_PUBLIC_ASSOCIATION_GET, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock", produces = { "application/json" } ) - - default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet( + default ResponseEntity getNamespaceLock( @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName ) { - return getDelegate().openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet(appId, env, clusterName, namespaceName); + return getDelegate().getNamespaceLock(appId, env, clusterName, namespaceName); + } + + + /** + * GET /openapi/v1/apps/{appId}/namespaces/releases/status : 获取应用下所有Namespace的发布状态 (new added) + * GET /openapi/v1/apps/{appId}/namespaces/releases/status + * + * @param appId 应用ID (required) + * @return 成功获取发布状态映射 (status code 200) + */ + @Operation( + operationId = "getNamespacesReleaseStatus", + summary = "获取应用下所有Namespace的发布状态 (new added)", + description = "GET /openapi/v1/apps/{appId}/namespaces/releases/status", + tags = { "Namespace Management" }, + responses = { + @ApiResponse(responseCode = "200", description = "成功获取发布状态映射") + }, + security = { + @SecurityRequirement(name = "ApiKeyAuth") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/openapi/v1/apps/{appId}/namespaces/releases/status", + produces = { "application/json" } + ) + default ResponseEntity>> getNamespacesReleaseStatus( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId + ) { + return getDelegate().getNamespacesReleaseStatus(appId); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPNAMESPACES_PUBLIC_NAMESPACE_NAME_INSTANCES_GET = "/openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances"; /** - * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances : 获取公共AppNamespace的所有实例 + * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances : 获取公共AppNamespace的所有实例 (new added) * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances * - * @param env (required) - * @param publicNamespaceName (required) - * @param page (required) - * @param size (required) - * @return (status code 200) + * @param env 环境标识 (required) + * @param publicNamespaceName 公共命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) + * @return 成功获取实例列表 (status code 200) */ @Operation( - operationId = "openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet", - summary = "获取公共AppNamespace的所有实例", + operationId = "getPublicAppNamespaceInstances", + summary = "获取公共AppNamespace的所有实例 (new added)", description = "GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances", tags = { "Namespace Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { + @ApiResponse(responseCode = "200", description = "成功获取实例列表", content = { @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenNamespaceDTO.class))) }) }, @@ -302,39 +435,37 @@ default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersCluste ) @RequestMapping( method = RequestMethod.GET, - value = NamespaceManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPNAMESPACES_PUBLIC_NAMESPACE_NAME_INSTANCES_GET, + value = "/openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances", produces = { "application/json" } ) - - default ResponseEntity> openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet( - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "publicNamespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("publicNamespaceName") String publicNamespaceName, - @NotNull @Parameter(name = "page", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = true) Integer page, - @NotNull @Parameter(name = "size", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = true) Integer size + default ResponseEntity> getPublicAppNamespaceInstances( + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "publicNamespaceName", description = "公共命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("publicNamespaceName") String publicNamespaceName, + @NotNull @Parameter(name = "page", description = "页码,从0开始", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = true) Integer page, + @NotNull @Parameter(name = "size", description = "每页数量", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = true) Integer size ) { - return getDelegate().openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet(env, publicNamespaceName, page, size); + return getDelegate().getPublicAppNamespaceInstances(env, publicNamespaceName, page, size); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_GET = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces"; /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces : 获取指定集群下的所有Namespace - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association : 获取关联的公共Namespace (new added) + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param fillItemDetail (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @return 成功获取关联的公共Namespace (status code 200) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet", - summary = "获取指定集群下的所有Namespace", - description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces", + operationId = "getPublicNamespaceAssociation", + summary = "获取关联的公共Namespace (new added)", + description = "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association", tags = { "Namespace Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenNamespaceDTO.class))) + @ApiResponse(responseCode = "200", description = "成功获取关联的公共Namespace", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenNamespaceDTO.class)) }) }, security = { @@ -343,39 +474,38 @@ default ResponseEntity> openapiV1EnvsEnvAppnamespacesPubl ) @RequestMapping( method = RequestMethod.GET, - value = NamespaceManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_GET, + value = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association", produces = { "application/json" } ) - - default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @NotNull @Parameter(name = "fillItemDetail", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "fillItemDetail", required = true) Boolean fillItemDetail + default ResponseEntity getPublicNamespaceAssociation( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet(appId, env, clusterName, fillItemDetail); + return getDelegate().getPublicNamespaceAssociation(appId, env, clusterName, namespaceName); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_LOCK_GET = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock"; /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock : 获取Namespace的锁状态 - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} : 获取指定的Namespace (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} * * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) + * @param fillItemDetail (required) * @return (status code 200) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet", - summary = "获取Namespace的锁状态", - description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock", + operationId = "loadNamespace", + summary = "获取指定的Namespace (original openapi)", + description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}", tags = { "Namespace Management" }, responses = { @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenNamespaceLockDTO.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenNamespaceDTO.class)) }) }, security = { @@ -384,17 +514,17 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClusters ) @RequestMapping( method = RequestMethod.GET, - value = NamespaceManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_LOCK_GET, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}", produces = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet( + default ResponseEntity loadNamespace( @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName + @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, + @NotNull @Parameter(name = "fillItemDetail", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "fillItemDetail", required = true, defaultValue = "true") Boolean fillItemDetail ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet(appId, env, clusterName, namespaceName); + return getDelegate().loadNamespace(appId, env, clusterName, namespaceName, fillItemDetail); } } diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApiController.java index 38eabb51..e0d2fe77 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,15 +1,14 @@ package com.apollo.openapi.server.api; +import java.util.Map; import com.apollo.openapi.server.model.OpenAppNamespaceDTO; import com.apollo.openapi.server.model.OpenNamespaceDTO; import com.apollo.openapi.server.model.OpenNamespaceLockDTO; -import com.apollo.openapi.server.model.OpenapiV1AppsGet401Response; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; -import org.springframework.lang.Nullable; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; @@ -29,7 +28,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") @Controller @RequestMapping("${openapi.apolloOpen.base-path:}") public class NamespaceManagementApiController implements NamespaceManagementApi { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApiDelegate.java index 5c3f4174..14c8ad8e 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,18 +1,15 @@ package com.apollo.openapi.server.api; +import java.util.Map; import com.apollo.openapi.server.model.OpenAppNamespaceDTO; import com.apollo.openapi.server.model.OpenNamespaceDTO; import com.apollo.openapi.server.model.OpenNamespaceLockDTO; -import com.apollo.openapi.server.model.OpenapiV1AppsGet401Response; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; -import org.springframework.lang.Nullable; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; -import javax.validation.constraints.*; -import javax.validation.Valid; import java.util.List; import java.util.Map; import java.util.Optional; @@ -22,7 +19,7 @@ * A delegate to be called by the {@link NamespaceManagementApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") public interface NamespaceManagementApiDelegate { default Optional getRequest() { @@ -30,18 +27,22 @@ default Optional getRequest() { } /** - * GET /openapi/v1/appnamespaces : 获取所有公共AppNamespace - * GET /openapi/v1/appnamespaces?public=true + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check : 检查缺失的Namespace (new added) + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check * - * @param publicOnly (required) - * @return (status code 200) - * @see NamespaceManagementApi#openapiV1AppnamespacesGet + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @return 缺失的命名空间名称列表 (status code 200) + * @see NamespaceManagementApi#checkNamespaceIntegrity */ - default ResponseEntity> openapiV1AppnamespacesGet(Boolean publicOnly) { + default ResponseEntity> checkNamespaceIntegrity(String appId, + String env, + String clusterName) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appendNamespacePrefix\" : true, \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appendNamespacePrefix\" : true, \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" } ]"; + String exampleString = "[ \"\", \"\" ]"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -52,18 +53,22 @@ default ResponseEntity> openapiV1AppnamespacesGet(Bool } /** - * GET /openapi/v1/apps/{appId}/appnamespaces : 获取指定应用的AppNamespace - * GET /openapi/v1/apps/{appId}/appnamespaces + * POST /openapi/v1/apps/{appId}/appnamespaces : 创建AppNamespace (original openapi) + * POST /openapi/v1/apps/{appId}/appnamespaces * * @param appId (required) - * @return (status code 200) - * @see NamespaceManagementApi#openapiV1AppsAppIdAppnamespacesGet + * @param openAppNamespaceDTO (required) + * @return AppNamespace创建成功 (status code 200) + * or 请求参数错误 (status code 400) + * or 权限不足 (status code 403) + * @see NamespaceManagementApi#createNamespace */ - default ResponseEntity> openapiV1AppsAppIdAppnamespacesGet(String appId) { + default ResponseEntity createNamespace(String appId, + OpenAppNamespaceDTO openAppNamespaceDTO) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appendNamespacePrefix\" : true, \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appendNamespacePrefix\" : true, \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" } ]"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appendNamespacePrefix\" : true, \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -74,20 +79,62 @@ default ResponseEntity> openapiV1AppsAppIdAppnamespace } /** - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} : 获取指定的AppNamespace - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} : 删除AppNamespace (new added) + * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (required) + * @return AppNamespace删除成功 (status code 200) + * @see NamespaceManagementApi#deleteAppNamespace + */ + default ResponseEntity deleteAppNamespace(String appId, + String namespaceName, + String operator) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links : 删除关联的Namespace (new added) + * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links + * + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (required) + * @return 解除关联成功 (status code 200) + * @see NamespaceManagementApi#deleteNamespaceLinks + */ + default ResponseEntity deleteNamespaceLinks(String appId, + String env, + String clusterName, + String namespaceName, + String operator) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces : 获取指定集群下的所有Namespace (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces * * @param appId (required) - * @param namespaceName (required) + * @param env (required) + * @param clusterName (required) + * @param fillItemDetail (required) * @return (status code 200) - * @see NamespaceManagementApi#openapiV1AppsAppIdAppnamespacesNamespaceNameGet + * @see NamespaceManagementApi#findNamespaces */ - default ResponseEntity openapiV1AppsAppIdAppnamespacesNamespaceNameGet(String appId, - String namespaceName) { + default ResponseEntity> findNamespaces(String appId, + String env, + String clusterName, + Boolean fillItemDetail) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appendNamespacePrefix\" : true, \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }"; + String exampleString = "[ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" } ]"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -98,32 +145,42 @@ default ResponseEntity openapiV1AppsAppIdAppnamespacesNames } /** - * POST /openapi/v1/apps/{appId}/appnamespaces : 创建AppNamespace - * POST /openapi/v1/apps/{appId}/appnamespaces + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} : 获取指定的AppNamespace (new added) + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} * - * @param appId (required) - * @param openAppNamespaceDTO (required) - * @return AppNamespace创建成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - * @see NamespaceManagementApi#openapiV1AppsAppIdAppnamespacesPost + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @return 成功获取AppNamespace (status code 200) + * @see NamespaceManagementApi#getAppNamespace */ - default ResponseEntity openapiV1AppsAppIdAppnamespacesPost(String appId, - OpenAppNamespaceDTO openAppNamespaceDTO) { + default ResponseEntity getAppNamespace(String appId, + String namespaceName) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appendNamespacePrefix\" : true, \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appendNamespacePrefix\" : true, \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /openapi/v1/appnamespaces : 获取所有公共AppNamespace (new added) + * GET /openapi/v1/appnamespaces?public=true + * + * @param publicOnly (required) + * @return (status code 200) + * @see NamespaceManagementApi#getAppNamespaces + */ + default ResponseEntity> getAppNamespaces(Boolean publicOnly) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; + String exampleString = "[ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appendNamespacePrefix\" : true, \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appendNamespacePrefix\" : true, \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ]"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -134,22 +191,18 @@ default ResponseEntity openapiV1AppsAppIdAppnamespacesPost( } /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check : 检查缺失的Namespace - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check + * GET /openapi/v1/apps/{appId}/appnamespaces : 获取指定应用的AppNamespace (new added) + * GET /openapi/v1/apps/{appId}/appnamespaces * * @param appId (required) - * @param env (required) - * @param clusterName (required) * @return (status code 200) - * @see NamespaceManagementApi#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet + * @see NamespaceManagementApi#getAppNamespacesByApp */ - default ResponseEntity> openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet(String appId, - String env, - String clusterName) { + default ResponseEntity> getAppNamespacesByApp(String appId) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ \"\", \"\" ]"; + String exampleString = "[ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appendNamespacePrefix\" : true, \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appendNamespacePrefix\" : true, \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ]"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -160,24 +213,24 @@ default ResponseEntity> openapiV1AppsAppIdEnvsEnvClustersClusterNam } /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association : 获取关联的公共Namespace - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock : 获取Namespace的锁状态 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock * * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) * @return (status code 200) - * @see NamespaceManagementApi#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet + * @see NamespaceManagementApi#getNamespaceLock */ - default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet(String appId, + default ResponseEntity getNamespaceLock(String appId, String env, String clusterName, String namespaceName) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; + String exampleString = "{ \"lockedBy\" : \"lockedBy\", \"isLocked\" : true, \"namespaceName\" : \"namespaceName\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -188,24 +241,46 @@ default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersCluste } /** - * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances : 获取公共AppNamespace的所有实例 + * GET /openapi/v1/apps/{appId}/namespaces/releases/status : 获取应用下所有Namespace的发布状态 (new added) + * GET /openapi/v1/apps/{appId}/namespaces/releases/status + * + * @param appId 应用ID (required) + * @return 成功获取发布状态映射 (status code 200) + * @see NamespaceManagementApi#getNamespacesReleaseStatus + */ + default ResponseEntity>> getNamespacesReleaseStatus(String appId) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"projectA\" : { \"featureX\" : true, \"featureY\" : false }, \"projectB\" : { \"darkMode\" : true } }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances : 获取公共AppNamespace的所有实例 (new added) * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances * - * @param env (required) - * @param publicNamespaceName (required) - * @param page (required) - * @param size (required) - * @return (status code 200) - * @see NamespaceManagementApi#openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet + * @param env 环境标识 (required) + * @param publicNamespaceName 公共命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) + * @return 成功获取实例列表 (status code 200) + * @see NamespaceManagementApi#getPublicAppNamespaceInstances */ - default ResponseEntity> openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet(String env, + default ResponseEntity> getPublicAppNamespaceInstances(String env, String publicNamespaceName, Integer page, Integer size) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" } ]"; + String exampleString = "[ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" } ]"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -216,24 +291,24 @@ default ResponseEntity> openapiV1EnvsEnvAppnamespacesPubl } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces : 获取指定集群下的所有Namespace - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association : 获取关联的公共Namespace (new added) + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param fillItemDetail (required) - * @return (status code 200) - * @see NamespaceManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @return 成功获取关联的公共Namespace (status code 200) + * @see NamespaceManagementApi#getPublicNamespaceAssociation */ - default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet(String appId, + default ResponseEntity getPublicNamespaceAssociation(String appId, String env, String clusterName, - Boolean fillItemDetail) { + String namespaceName) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" } ]"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -244,24 +319,26 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClusters } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock : 获取Namespace的锁状态 - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} : 获取指定的Namespace (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} * * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) + * @param fillItemDetail (required) * @return (status code 200) - * @see NamespaceManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet + * @see NamespaceManagementApi#loadNamespace */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet(String appId, + default ResponseEntity loadNamespace(String appId, String env, String clusterName, - String namespaceName) { + String namespaceName, + Boolean fillItemDetail) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"lockedBy\" : \"lockedBy\", \"isLocked\" : true, \"namespaceName\" : \"namespaceName\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } 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 b6892f91..b077eac9 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 @@ -1,12 +1,12 @@ -/* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.15.0). +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.6.0). * https://openapi-generator.tech * Do not edit the class manually. */ package com.apollo.openapi.server.api; +import java.util.Map; import com.apollo.openapi.server.model.OpenOrganizationDto; -import com.apollo.openapi.server.model.OpenapiV1AppsGet401Response; import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -18,8 +18,6 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; -import io.swagger.v3.oas.annotations.media.ExampleObject; -import org.springframework.lang.Nullable; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -31,7 +29,7 @@ import java.util.Map; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") @Validated @Tag(name = "Organization Management", description = "组织管理相关接口,包括组织信息查询等功能") public interface OrganizationManagementApi { @@ -40,17 +38,16 @@ default OrganizationManagementApiDelegate getDelegate() { return new OrganizationManagementApiDelegate() {}; } - public static final String PATH_OPENAPI_V1_ORGANIZATIONS_GET = "/openapi/v1/organizations"; /** - * GET /openapi/v1/organizations : 获取所有组织信息 + * GET /openapi/v1/organizations : 获取所有组织信息 (original openapi) * GET /openapi/v1/organizations * * @return 成功获取组织列表 (status code 200) * or 未授权访问 (status code 401) */ @Operation( - operationId = "openapiV1OrganizationsGet", - summary = "获取所有组织信息", + operationId = "getOrganization", + summary = "获取所有组织信息 (original openapi)", description = "GET /openapi/v1/organizations", tags = { "Organization Management" }, responses = { @@ -58,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 = OpenapiV1AppsGet401Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }) }, security = { @@ -67,14 +64,13 @@ default OrganizationManagementApiDelegate getDelegate() { ) @RequestMapping( method = RequestMethod.GET, - value = OrganizationManagementApi.PATH_OPENAPI_V1_ORGANIZATIONS_GET, + value = "/openapi/v1/organizations", produces = { "application/json" } ) - - default ResponseEntity> openapiV1OrganizationsGet( - + default ResponseEntity> getOrganization( + ) { - return getDelegate().openapiV1OrganizationsGet(); + return getDelegate().getOrganization(); } } 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 70ded652..eb3b05f4 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,13 +1,12 @@ package com.apollo.openapi.server.api; +import java.util.Map; import com.apollo.openapi.server.model.OpenOrganizationDto; -import com.apollo.openapi.server.model.OpenapiV1AppsGet401Response; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; -import org.springframework.lang.Nullable; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; @@ -27,7 +26,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") @Controller @RequestMapping("${openapi.apolloOpen.base-path:}") public class OrganizationManagementApiController implements OrganizationManagementApi { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApiDelegate.java index 4e5ae766..c4cf161d 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,16 +1,13 @@ package com.apollo.openapi.server.api; +import java.util.Map; import com.apollo.openapi.server.model.OpenOrganizationDto; -import com.apollo.openapi.server.model.OpenapiV1AppsGet401Response; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; -import org.springframework.lang.Nullable; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; -import javax.validation.constraints.*; -import javax.validation.Valid; import java.util.List; import java.util.Map; import java.util.Optional; @@ -20,7 +17,7 @@ * A delegate to be called by the {@link OrganizationManagementApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") public interface OrganizationManagementApiDelegate { default Optional getRequest() { @@ -28,14 +25,14 @@ default Optional getRequest() { } /** - * GET /openapi/v1/organizations : 获取所有组织信息 + * GET /openapi/v1/organizations : 获取所有组织信息 (original openapi) * GET /openapi/v1/organizations * * @return 成功获取组织列表 (status code 200) * or 未授权访问 (status code 401) - * @see OrganizationManagementApi#openapiV1OrganizationsGet + * @see OrganizationManagementApi#getOrganization */ - default ResponseEntity> openapiV1OrganizationsGet() { + default ResponseEntity> getOrganization() { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -43,11 +40,6 @@ default ResponseEntity> openapiV1OrganizationsGet() { ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } } }); return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApi.java index 1959f0dd..84e0bade 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 @@ -1,15 +1,15 @@ -/* - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.15.0). +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.6.0). * https://openapi-generator.tech * Do not edit the class manually. */ package com.apollo.openapi.server.api; -import com.apollo.openapi.server.model.ListReleaseBO; +import java.util.Map; +import com.apollo.openapi.server.model.NamespaceGrayDelReleaseDTO; import com.apollo.openapi.server.model.NamespaceReleaseDTO; +import com.apollo.openapi.server.model.OpenReleaseBO; import com.apollo.openapi.server.model.OpenReleaseDTO; -import com.apollo.openapi.server.model.OpenapiV1AppsGet401Response; -import com.apollo.openapi.server.model.OpenapiV1EnvsEnvReleasesCompareGet200Response; import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -21,8 +21,6 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; -import io.swagger.v3.oas.annotations.media.ExampleObject; -import org.springframework.lang.Nullable; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -34,7 +32,7 @@ import java.util.Map; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") @Validated @Tag(name = "Release Management", description = "发布管理相关接口,包括配置发布、发布历史、灰度发布等功能") public interface ReleaseManagementApi { @@ -43,27 +41,26 @@ default ReleaseManagementApiDelegate getDelegate() { return new ReleaseManagementApiDelegate() {}; } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_ACTIVE_GET = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active"; /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active : 获取活跃发布(分页) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases : 创建灰度删除发布 (original openapi) + * * * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param page (required) - * @param size (required) + * @param branchName (required) + * @param namespaceGrayDelReleaseDTO (required) * @return (status code 200) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet", - summary = "获取活跃发布(分页)", - description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active", + operationId = "createGrayDelRelease", + summary = "创建灰度删除发布 (original openapi)", + description = "", tags = { "Release Management" }, responses = { @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenReleaseDTO.class))) + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenReleaseDTO.class)) }) }, security = { @@ -71,44 +68,43 @@ default ReleaseManagementApiDelegate getDelegate() { } ) @RequestMapping( - method = RequestMethod.GET, - value = ReleaseManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_ACTIVE_GET, - produces = { "application/json" } + method = RequestMethod.POST, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases", + produces = { "application/json" }, + consumes = { "application/json" } ) - - default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet( + default ResponseEntity createGrayDelRelease( @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @NotNull @Parameter(name = "page", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = true) Integer page, - @NotNull @Parameter(name = "size", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = true) Integer size + @Parameter(name = "branchName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName, + @Parameter(name = "NamespaceGrayDelReleaseDTO", description = "", required = true) @Valid @RequestBody NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet(appId, env, clusterName, namespaceName, page, size); + return getDelegate().createGrayDelRelease(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_ALL_GET = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all"; /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all : 获取所有发布(分页) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases : 创建灰度发布 (original openapi) + * 创建灰度发布 * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (required) - * @param size (required) - * @return (status code 200) + * @param appId app标识 (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param namespaceReleaseDTO (required) + * @return 灰度发布创建成功 (status code 200) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet", - summary = "获取所有发布(分页)", - description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all", + operationId = "createGrayRelease", + summary = "创建灰度发布 (original openapi)", + description = "创建灰度发布", tags = { "Release Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = ListReleaseBO.class))) + @ApiResponse(responseCode = "200", description = "灰度发布创建成功", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenReleaseDTO.class)) }) }, security = { @@ -116,46 +112,50 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersCl } ) @RequestMapping( - method = RequestMethod.GET, - value = ReleaseManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_ALL_GET, - produces = { "application/json" } + method = RequestMethod.POST, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases", + produces = { "application/json" }, + consumes = { "application/json" } ) - - default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @NotNull @Parameter(name = "page", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = true) Integer page, - @NotNull @Parameter(name = "size", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = true) Integer size + default ResponseEntity createGrayRelease( + @Parameter(name = "appId", description = "app标识", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, + @Parameter(name = "branchName", description = "分支名称", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName, + @Parameter(name = "NamespaceReleaseDTO", description = "", required = true) @Valid @RequestBody NamespaceReleaseDTO namespaceReleaseDTO ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet(appId, env, clusterName, namespaceName, page, size); + return getDelegate().createGrayRelease(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_LATEST_GET = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest"; /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest : 获取最新活跃发布 - * + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases : 创建发布 (original openapi) + * 创建发布 * - * @param appId (required) - * @param env (required) + * @param appId app标识 (required) + * @param env 环境标识 (required) * @param clusterName (required) - * @param namespaceName (required) - * @return 成功获取最新活跃发布 (status code 200) - * or 未找到活跃发布 (status code 404) + * @param namespaceName 命名空间名称 (required) + * @param namespaceReleaseDTO (required) + * @return 发布创建成功 (status code 200) + * or 发布参数错误 (status code 400) + * or 权限不足 (status code 403) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet", - summary = "获取最新活跃发布", - description = "", + operationId = "createRelease", + summary = "创建发布 (original openapi)", + description = "创建发布", tags = { "Release Management" }, responses = { - @ApiResponse(responseCode = "200", description = "成功获取最新活跃发布", content = { + @ApiResponse(responseCode = "200", description = "发布创建成功", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = OpenReleaseDTO.class)) }), - @ApiResponse(responseCode = "404", description = "未找到活跃发布", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @ApiResponse(responseCode = "400", description = "发布参数错误", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + }), + @ApiResponse(responseCode = "403", description = "权限不足", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) }) }, security = { @@ -163,49 +163,42 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClu } ) @RequestMapping( - method = RequestMethod.GET, - value = ReleaseManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_LATEST_GET, - produces = { "application/json" } + method = RequestMethod.POST, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases", + produces = { "application/json" }, + consumes = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + default ResponseEntity createRelease( + @Parameter(name = "appId", description = "app标识", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, + @Parameter(name = "NamespaceReleaseDTO", description = "", required = true) @Valid @RequestBody NamespaceReleaseDTO namespaceReleaseDTO ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet(appId, env, clusterName, namespaceName); + return getDelegate().createRelease(appId, env, clusterName, namespaceName, namespaceReleaseDTO); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_POST = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases"; /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases : 创建发布 - * + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active : 获取活跃发布(分页) (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceReleaseDTO (required) - * @return 发布创建成功 (status code 200) - * or 发布参数错误 (status code 400) - * or 权限不足 (status code 403) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) + * @return 成功获取活跃发布列表 (status code 200) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost", - summary = "创建发布", - description = "", + operationId = "findActiveReleases", + summary = "获取活跃发布(分页) (new added)", + description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active", tags = { "Release Management" }, responses = { - @ApiResponse(responseCode = "200", description = "发布创建成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenReleaseDTO.class)) - }), - @ApiResponse(responseCode = "400", description = "发布参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) - }), - @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @ApiResponse(responseCode = "200", description = "成功获取活跃发布列表", content = { + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenReleaseDTO.class))) }) }, security = { @@ -213,41 +206,42 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterN } ) @RequestMapping( - method = RequestMethod.POST, - value = ReleaseManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_POST, - produces = { "application/json" }, - consumes = { "application/json" } + method = RequestMethod.GET, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active", + produces = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "NamespaceReleaseDTO", description = "", required = true) @Valid @RequestBody NamespaceReleaseDTO namespaceReleaseDTO + default ResponseEntity> findActiveReleases( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, + @NotNull @Parameter(name = "page", description = "页码,从0开始", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = true) Integer page, + @NotNull @Parameter(name = "size", description = "每页数量", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = true) Integer size ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost(appId, env, clusterName, namespaceName, namespaceReleaseDTO); + return getDelegate().findActiveReleases(appId, env, clusterName, namespaceName, page, size); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_RELEASES_COMPARE_GET = "/openapi/v1/envs/{env}/releases/compare"; /** - * GET /openapi/v1/envs/{env}/releases/compare : 对比发布 - * GET /openapi/v1/envs/{env}/releases/compare + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all : 获取所有发布(分页) (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all * - * @param env (required) - * @param baseReleaseId (required) - * @param toCompareReleaseId (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) + * @return 成功获取发布列表 (status code 200) */ @Operation( - operationId = "openapiV1EnvsEnvReleasesCompareGet", - summary = "对比发布", - description = "GET /openapi/v1/envs/{env}/releases/compare", + operationId = "findAllReleases", + summary = "获取所有发布(分页) (new added)", + description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all", tags = { "Release Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1EnvsEnvReleasesCompareGet200Response.class)) + @ApiResponse(responseCode = "200", description = "成功获取发布列表", content = { + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenReleaseBO.class))) }) }, security = { @@ -256,35 +250,36 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterN ) @RequestMapping( method = RequestMethod.GET, - value = ReleaseManagementApi.PATH_OPENAPI_V1_ENVS_ENV_RELEASES_COMPARE_GET, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all", produces = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvReleasesCompareGet( - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @NotNull @Parameter(name = "baseReleaseId", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "baseReleaseId", required = true) Integer baseReleaseId, - @NotNull @Parameter(name = "toCompareReleaseId", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "toCompareReleaseId", required = true) Integer toCompareReleaseId + default ResponseEntity> findAllReleases( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, + @NotNull @Parameter(name = "page", description = "页码,从0开始", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = true) Integer page, + @NotNull @Parameter(name = "size", description = "每页数量", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = true) Integer size ) { - return getDelegate().openapiV1EnvsEnvReleasesCompareGet(env, baseReleaseId, toCompareReleaseId); + return getDelegate().findAllReleases(appId, env, clusterName, namespaceName, page, size); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID_GET = "/openapi/v1/envs/{env}/releases/{releaseId}"; /** - * GET /openapi/v1/envs/{env}/releases/{releaseId} : 获取发布详情 + * GET /openapi/v1/envs/{env}/releases/{releaseId} : 获取发布详情 (new added) * GET /openapi/v1/envs/{env}/releases/{releaseId} * - * @param env (required) - * @param releaseId (required) - * @return (status code 200) + * @param env 环境标识 (required) + * @param releaseId 发布ID (required) + * @return 成功获取发布详情 (status code 200) */ @Operation( - operationId = "openapiV1EnvsEnvReleasesReleaseIdGet", - summary = "获取发布详情", + operationId = "getReleaseById", + summary = "获取发布详情 (new added)", description = "GET /openapi/v1/envs/{env}/releases/{releaseId}", tags = { "Release Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { + @ApiResponse(responseCode = "200", description = "成功获取发布详情", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = OpenReleaseDTO.class)) }) }, @@ -294,35 +289,130 @@ default ResponseEntity openapiV1E ) @RequestMapping( method = RequestMethod.GET, - value = ReleaseManagementApi.PATH_OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID_GET, + value = "/openapi/v1/envs/{env}/releases/{releaseId}", produces = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvReleasesReleaseIdGet( - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "releaseId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("releaseId") Integer releaseId + default ResponseEntity getReleaseById( + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "releaseId", description = "发布ID", required = true, in = ParameterIn.PATH) @PathVariable("releaseId") Integer releaseId ) { - return getDelegate().openapiV1EnvsEnvReleasesReleaseIdGet(env, releaseId); + return getDelegate().getReleaseById(env, releaseId); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID_ROLLBACK_PUT = "/openapi/v1/envs/{env}/releases/{releaseId}/rollback"; /** - * PUT /openapi/v1/envs/{env}/releases/{releaseId}/rollback : 回滚发布 - * + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest : 获取最新活跃发布 (original openapi) + * 查询命名空间最新活跃发布 * - * @param env (required) - * @param releaseId (required) - * @param operator (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @return 成功获取最新活跃发布 (status code 200) + * or 未找到活跃发布 (status code 404) */ @Operation( - operationId = "openapiV1EnvsEnvReleasesReleaseIdRollbackPut", - summary = "回滚发布", - description = "", + operationId = "loadLatestActiveRelease", + summary = "获取最新活跃发布 (original openapi)", + description = "查询命名空间最新活跃发布", tags = { "Release Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { + @ApiResponse(responseCode = "200", description = "成功获取最新活跃发布", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenReleaseDTO.class)) + }), + @ApiResponse(responseCode = "404", description = "未找到活跃发布", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + }) + }, + security = { + @SecurityRequirement(name = "ApiKeyAuth") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest", + produces = { "application/json" } + ) + default ResponseEntity loadLatestActiveRelease( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName + ) { + return getDelegate().loadLatestActiveRelease(appId, env, clusterName, namespaceName); + } + + + /** + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge : 合并分支 (original openapi) + * 合并灰度分支并可选择删除分支 + * + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param deleteBranch 合并后是否删除分支(true/false) (required) + * @param namespaceReleaseDTO (required) + * @return 分支合并成功 (status code 200) + * or 合并参数错误 (status code 400) + * or 权限不足 (status code 403) + */ + @Operation( + operationId = "merge", + summary = "合并分支 (original openapi)", + description = "合并灰度分支并可选择删除分支", + tags = { "Release Management" }, + responses = { + @ApiResponse(responseCode = "200", description = "分支合并成功", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenReleaseDTO.class)) + }), + @ApiResponse(responseCode = "400", description = "合并参数错误", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + }), + @ApiResponse(responseCode = "403", description = "权限不足", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + }) + }, + security = { + @SecurityRequirement(name = "ApiKeyAuth") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge", + produces = { "application/json" }, + consumes = { "application/json" } + ) + default ResponseEntity merge( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, + @Parameter(name = "branchName", description = "分支名称", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName, + @NotNull @Parameter(name = "deleteBranch", description = "合并后是否删除分支(true/false)", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "deleteBranch", required = true) Boolean deleteBranch, + @Parameter(name = "NamespaceReleaseDTO", description = "", required = true) @Valid @RequestBody NamespaceReleaseDTO namespaceReleaseDTO + ) { + return getDelegate().merge(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO); + } + + + /** + * PUT /openapi/v1/envs/{env}/releases/{releaseId}/rollback : 回滚发布 (original openapi) + * 回滚到指定的发布版本 + * + * @param env 环境标识 (required) + * @param releaseId 发布ID (required) + * @param operator 操作人用户名 (required) + * @return 发布回滚成功 (status code 200) + */ + @Operation( + operationId = "rollback", + summary = "回滚发布 (original openapi)", + description = "回滚到指定的发布版本", + tags = { "Release Management" }, + responses = { + @ApiResponse(responseCode = "200", description = "发布回滚成功", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }) }, @@ -332,16 +422,15 @@ default ResponseEntity openapiV1EnvsEnvReleasesReleaseIdGet( ) @RequestMapping( method = RequestMethod.PUT, - value = ReleaseManagementApi.PATH_OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID_ROLLBACK_PUT, + value = "/openapi/v1/envs/{env}/releases/{releaseId}/rollback", produces = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvReleasesReleaseIdRollbackPut( - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "releaseId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("releaseId") Integer releaseId, - @NotNull @Parameter(name = "operator", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator + default ResponseEntity rollback( + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "releaseId", description = "发布ID", required = true, in = ParameterIn.PATH) @PathVariable("releaseId") Long releaseId, + @NotNull @Parameter(name = "operator", description = "操作人用户名", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator ) { - return getDelegate().openapiV1EnvsEnvReleasesReleaseIdRollbackPut(env, releaseId, operator); + return getDelegate().rollback(env, releaseId, operator); } } diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiController.java index d9283d40..52820b21 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,16 +1,15 @@ package com.apollo.openapi.server.api; -import com.apollo.openapi.server.model.ListReleaseBO; +import java.util.Map; +import com.apollo.openapi.server.model.NamespaceGrayDelReleaseDTO; import com.apollo.openapi.server.model.NamespaceReleaseDTO; +import com.apollo.openapi.server.model.OpenReleaseBO; import com.apollo.openapi.server.model.OpenReleaseDTO; -import com.apollo.openapi.server.model.OpenapiV1AppsGet401Response; -import com.apollo.openapi.server.model.OpenapiV1EnvsEnvReleasesCompareGet200Response; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; -import org.springframework.lang.Nullable; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; @@ -30,7 +29,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") @Controller @RequestMapping("${openapi.apolloOpen.base-path:}") public class ReleaseManagementApiController implements ReleaseManagementApi { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiDelegate.java index 711f2fd5..669f4450 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,19 +1,16 @@ package com.apollo.openapi.server.api; -import com.apollo.openapi.server.model.ListReleaseBO; +import java.util.Map; +import com.apollo.openapi.server.model.NamespaceGrayDelReleaseDTO; import com.apollo.openapi.server.model.NamespaceReleaseDTO; +import com.apollo.openapi.server.model.OpenReleaseBO; import com.apollo.openapi.server.model.OpenReleaseDTO; -import com.apollo.openapi.server.model.OpenapiV1AppsGet401Response; -import com.apollo.openapi.server.model.OpenapiV1EnvsEnvReleasesCompareGet200Response; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; -import org.springframework.lang.Nullable; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; -import javax.validation.constraints.*; -import javax.validation.Valid; import java.util.List; import java.util.Map; import java.util.Optional; @@ -23,7 +20,7 @@ * A delegate to be called by the {@link ReleaseManagementApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") public interface ReleaseManagementApiDelegate { default Optional getRequest() { @@ -31,28 +28,28 @@ default Optional getRequest() { } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active : 获取活跃发布(分页) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases : 创建灰度删除发布 (original openapi) + * * * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param page (required) - * @param size (required) + * @param branchName (required) + * @param namespaceGrayDelReleaseDTO (required) * @return (status code 200) - * @see ReleaseManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet + * @see ReleaseManagementApi#createGrayDelRelease */ - default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet(String appId, + default ResponseEntity createGrayDelRelease(String appId, String env, String clusterName, String namespaceName, - Integer page, - Integer size) { + String branchName, + NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" } ]"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -63,28 +60,28 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersCl } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all : 获取所有发布(分页) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases : 创建灰度发布 (original openapi) + * 创建灰度发布 * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (required) - * @param size (required) - * @return (status code 200) - * @see ReleaseManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet + * @param appId app标识 (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param namespaceReleaseDTO (required) + * @return 灰度发布创建成功 (status code 200) + * @see ReleaseManagementApi#createGrayRelease */ - default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet(String appId, + default ResponseEntity createGrayRelease(String appId, String env, String clusterName, String namespaceName, - Integer page, - Integer size) { + String branchName, + NamespaceReleaseDTO namespaceReleaseDTO) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"baseInfo\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"configurations\" : \"configurations\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"releaseKey\" : \"releaseKey\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"isAbandoned\" : true, \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"namespaceName\" : \"namespaceName\" }, \"items\" : [ { \"value\" : \"value\", \"key\" : \"key\" }, { \"value\" : \"value\", \"key\" : \"key\" } ] }, { \"baseInfo\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"configurations\" : \"configurations\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"releaseKey\" : \"releaseKey\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"isAbandoned\" : true, \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"namespaceName\" : \"namespaceName\" }, \"items\" : [ { \"value\" : \"value\", \"key\" : \"key\" }, { \"value\" : \"value\", \"key\" : \"key\" } ] } ]"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -95,30 +92,28 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClu } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest : 获取最新活跃发布 - * + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases : 创建发布 (original openapi) + * 创建发布 * - * @param appId (required) - * @param env (required) + * @param appId app标识 (required) + * @param env 环境标识 (required) * @param clusterName (required) - * @param namespaceName (required) - * @return 成功获取最新活跃发布 (status code 200) - * or 未找到活跃发布 (status code 404) - * @see ReleaseManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet + * @param namespaceName 命名空间名称 (required) + * @param namespaceReleaseDTO (required) + * @return 发布创建成功 (status code 200) + * or 发布参数错误 (status code 400) + * or 权限不足 (status code 403) + * @see ReleaseManagementApi#createRelease */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet(String appId, + default ResponseEntity createRelease(String appId, String env, String clusterName, - String namespaceName) { + String namespaceName, + NamespaceReleaseDTO namespaceReleaseDTO) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -129,38 +124,84 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterN } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases : 创建发布 - * + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active : 获取活跃发布(分页) (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceReleaseDTO (required) - * @return 发布创建成功 (status code 200) - * or 发布参数错误 (status code 400) - * or 权限不足 (status code 403) - * @see ReleaseManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) + * @return 成功获取活跃发布列表 (status code 200) + * @see ReleaseManagementApi#findActiveReleases */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost(String appId, + default ResponseEntity> findActiveReleases(String appId, String env, String clusterName, String namespaceName, - NamespaceReleaseDTO namespaceReleaseDTO) { + Integer page, + Integer size) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; + String exampleString = "[ { \"dataChangeCreatedTime\" : \"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\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" } ]"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all : 获取所有发布(分页) (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all + * + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) + * @return 成功获取发布列表 (status code 200) + * @see ReleaseManagementApi#findAllReleases + */ + default ResponseEntity> findAllReleases(String appId, + String env, + String clusterName, + String namespaceName, + Integer page, + Integer size) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; + String exampleString = "[ { \"baseInfo\" : { \"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\" }, \"items\" : [ { \"value\" : \"value\", \"key\" : \"key\" }, { \"value\" : \"value\", \"key\" : \"key\" } ] }, { \"baseInfo\" : { \"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\" }, \"items\" : [ { \"value\" : \"value\", \"key\" : \"key\" }, { \"value\" : \"value\", \"key\" : \"key\" } ] } ]"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /openapi/v1/envs/{env}/releases/{releaseId} : 获取发布详情 (new added) + * GET /openapi/v1/envs/{env}/releases/{releaseId} + * + * @param env 环境标识 (required) + * @param releaseId 发布ID (required) + * @return 成功获取发布详情 (status code 200) + * @see ReleaseManagementApi#getReleaseById + */ + default ResponseEntity getReleaseById(String env, + Integer releaseId) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -171,22 +212,25 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterN } /** - * GET /openapi/v1/envs/{env}/releases/compare : 对比发布 - * GET /openapi/v1/envs/{env}/releases/compare + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest : 获取最新活跃发布 (original openapi) + * 查询命名空间最新活跃发布 * - * @param env (required) - * @param baseReleaseId (required) - * @param toCompareReleaseId (required) - * @return (status code 200) - * @see ReleaseManagementApi#openapiV1EnvsEnvReleasesCompareGet + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @return 成功获取最新活跃发布 (status code 200) + * or 未找到活跃发布 (status code 404) + * @see ReleaseManagementApi#loadLatestActiveRelease */ - default ResponseEntity openapiV1EnvsEnvReleasesCompareGet(String env, - Integer baseReleaseId, - Integer toCompareReleaseId) { + default ResponseEntity loadLatestActiveRelease(String appId, + String env, + String clusterName, + String namespaceName) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"changes\" : [ { \"type\" : \"ADDED\", \"entity\" : { \"firstEntity\" : { \"value\" : \"value\", \"key\" : \"key\" }, \"secondEntity\" : { \"value\" : \"value\", \"key\" : \"key\" } } }, { \"type\" : \"ADDED\", \"entity\" : { \"firstEntity\" : { \"value\" : \"value\", \"key\" : \"key\" }, \"secondEntity\" : { \"value\" : \"value\", \"key\" : \"key\" } } } ] }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -197,20 +241,32 @@ default ResponseEntity openapiV1E } /** - * GET /openapi/v1/envs/{env}/releases/{releaseId} : 获取发布详情 - * GET /openapi/v1/envs/{env}/releases/{releaseId} + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge : 合并分支 (original openapi) + * 合并灰度分支并可选择删除分支 * - * @param env (required) - * @param releaseId (required) - * @return (status code 200) - * @see ReleaseManagementApi#openapiV1EnvsEnvReleasesReleaseIdGet + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param deleteBranch 合并后是否删除分支(true/false) (required) + * @param namespaceReleaseDTO (required) + * @return 分支合并成功 (status code 200) + * or 合并参数错误 (status code 400) + * or 权限不足 (status code 403) + * @see ReleaseManagementApi#merge */ - default ResponseEntity openapiV1EnvsEnvReleasesReleaseIdGet(String env, - Integer releaseId) { + default ResponseEntity merge(String appId, + String env, + String clusterName, + String namespaceName, + String branchName, + Boolean deleteBranch, + NamespaceReleaseDTO namespaceReleaseDTO) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -221,17 +277,17 @@ default ResponseEntity openapiV1EnvsEnvReleasesReleaseIdGet(Stri } /** - * PUT /openapi/v1/envs/{env}/releases/{releaseId}/rollback : 回滚发布 - * + * PUT /openapi/v1/envs/{env}/releases/{releaseId}/rollback : 回滚发布 (original openapi) + * 回滚到指定的发布版本 * - * @param env (required) - * @param releaseId (required) - * @param operator (required) - * @return (status code 200) - * @see ReleaseManagementApi#openapiV1EnvsEnvReleasesReleaseIdRollbackPut + * @param env 环境标识 (required) + * @param releaseId 发布ID (required) + * @param operator 操作人用户名 (required) + * @return 发布回滚成功 (status code 200) + * @see ReleaseManagementApi#rollback */ - default ResponseEntity openapiV1EnvsEnvReleasesReleaseIdRollbackPut(String env, - Integer releaseId, + default ResponseEntity rollback(String env, + Long releaseId, String operator) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/config/HomeController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/config/HomeController.java index 27331fe4..c35d2252 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/config/HomeController.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/config/HomeController.java @@ -17,4 +17,4 @@ public String index() { return "redirect:swagger-ui.html"; } -} \ No newline at end of file +} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/config/SpringDocConfiguration.java b/spring-boot2/src/main/java/com/apollo/openapi/server/config/SpringDocConfiguration.java index 7936e69c..14ac8b03 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/config/SpringDocConfiguration.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/config/SpringDocConfiguration.java @@ -19,7 +19,7 @@ OpenAPI apiInfo() { .info( new Info() .title("Apollo OpenAPI") - .description("Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` ") + .description("

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
") .version("1.0.0") ) .components( @@ -32,4 +32,4 @@ OpenAPI apiInfo() { ) ; } -} \ No newline at end of file +} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/Change.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/Change.java deleted file mode 100644 index 155f89cf..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/Change.java +++ /dev/null @@ -1,147 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.apollo.openapi.server.model.EntityPairKVEntity; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * Change - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class Change { - - /** - * - */ - public enum TypeEnum { - ADDED("ADDED"), - - MODIFIED("MODIFIED"), - - DELETED("DELETED"); - - private final String value; - - TypeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - private @Nullable TypeEnum type; - - private @Nullable EntityPairKVEntity entity; - - public Change type(@Nullable TypeEnum type) { - this.type = type; - return this; - } - - /** - * - * @return type - */ - - @Schema(name = "type", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("type") - public @Nullable TypeEnum getType() { - return type; - } - - public void setType(@Nullable TypeEnum type) { - this.type = type; - } - - public Change entity(@Nullable EntityPairKVEntity entity) { - this.entity = entity; - return this; - } - - /** - * Get entity - * @return entity - */ - @Valid - @Schema(name = "entity", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("entity") - public @Nullable EntityPairKVEntity getEntity() { - return entity; - } - - public void setEntity(@Nullable EntityPairKVEntity entity) { - this.entity = entity; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Change change = (Change) o; - return Objects.equals(this.type, change.type) && - Objects.equals(this.entity, change.entity); - } - - @Override - public int hashCode() { - return Objects.hash(type, entity); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Change {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" entity: ").append(toIndentedString(entity)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/ClusterDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/ClusterDTO.java deleted file mode 100644 index 6da5439c..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/ClusterDTO.java +++ /dev/null @@ -1,336 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * ClusterDTO - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class ClusterDTO { - - private @Nullable String dataChangeCreatedBy; - - private @Nullable String dataChangeLastModifiedBy; - - private @Nullable String dataChangeCreatedByDisplayName; - - private @Nullable String dataChangeLastModifiedByDisplayName; - - private @Nullable String dataChangeCreatedTime; - - private @Nullable String dataChangeLastModifiedTime; - - private @Nullable Long id; - - private String name; - - private String appId; - - private @Nullable Long parentClusterId; - - private @Nullable String comment; - - public ClusterDTO() { - super(); - } - - /** - * Constructor with only required parameters - */ - public ClusterDTO(String name, String appId) { - this.name = name; - this.appId = appId; - } - - public ClusterDTO dataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * - * @return dataChangeCreatedBy - */ - - @Schema(name = "dataChangeCreatedBy", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeCreatedBy") - public @Nullable String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - public void setDataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - public ClusterDTO dataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * - * @return dataChangeLastModifiedBy - */ - - @Schema(name = "dataChangeLastModifiedBy", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeLastModifiedBy") - public @Nullable String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - public void setDataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - public ClusterDTO dataChangeCreatedByDisplayName(@Nullable String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - return this; - } - - /** - * - * @return dataChangeCreatedByDisplayName - */ - - @Schema(name = "dataChangeCreatedByDisplayName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeCreatedByDisplayName") - public @Nullable String getDataChangeCreatedByDisplayName() { - return dataChangeCreatedByDisplayName; - } - - public void setDataChangeCreatedByDisplayName(@Nullable String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - } - - public ClusterDTO dataChangeLastModifiedByDisplayName(@Nullable String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - return this; - } - - /** - * - * @return dataChangeLastModifiedByDisplayName - */ - - @Schema(name = "dataChangeLastModifiedByDisplayName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeLastModifiedByDisplayName") - public @Nullable String getDataChangeLastModifiedByDisplayName() { - return dataChangeLastModifiedByDisplayName; - } - - public void setDataChangeLastModifiedByDisplayName(@Nullable String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - } - - public ClusterDTO dataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - return this; - } - - /** - * - * @return dataChangeCreatedTime - */ - - @Schema(name = "dataChangeCreatedTime", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeCreatedTime") - public @Nullable String getDataChangeCreatedTime() { - return dataChangeCreatedTime; - } - - public void setDataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - public ClusterDTO dataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - return this; - } - - /** - * - * @return dataChangeLastModifiedTime - */ - - @Schema(name = "dataChangeLastModifiedTime", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeLastModifiedTime") - public @Nullable String getDataChangeLastModifiedTime() { - return dataChangeLastModifiedTime; - } - - public void setDataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - public ClusterDTO id(@Nullable Long id) { - this.id = id; - return this; - } - - /** - * - * @return id - */ - - @Schema(name = "id", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("id") - public @Nullable Long getId() { - return id; - } - - public void setId(@Nullable Long id) { - this.id = id; - } - - public ClusterDTO name(String name) { - this.name = name; - return this; - } - - /** - * - * @return name - */ - @NotNull @Pattern(regexp = "[0-9a-zA-Z_-]+[0-9a-zA-Z_.-]*") - @Schema(name = "name", description = "", requiredMode = Schema.RequiredMode.REQUIRED) - @JsonProperty("name") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public ClusterDTO appId(String appId) { - this.appId = appId; - return this; - } - - /** - * - * @return appId - */ - @NotNull - @Schema(name = "appId", description = "", requiredMode = Schema.RequiredMode.REQUIRED) - @JsonProperty("appId") - public String getAppId() { - return appId; - } - - public void setAppId(String appId) { - this.appId = appId; - } - - public ClusterDTO parentClusterId(@Nullable Long parentClusterId) { - this.parentClusterId = parentClusterId; - return this; - } - - /** - * - * @return parentClusterId - */ - - @Schema(name = "parentClusterId", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("parentClusterId") - public @Nullable Long getParentClusterId() { - return parentClusterId; - } - - public void setParentClusterId(@Nullable Long parentClusterId) { - this.parentClusterId = parentClusterId; - } - - public ClusterDTO comment(@Nullable String comment) { - this.comment = comment; - return this; - } - - /** - * - * @return comment - */ - - @Schema(name = "comment", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("comment") - public @Nullable String getComment() { - return comment; - } - - public void setComment(@Nullable String comment) { - this.comment = comment; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClusterDTO clusterDTO = (ClusterDTO) o; - return Objects.equals(this.dataChangeCreatedBy, clusterDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeLastModifiedBy, clusterDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, clusterDTO.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, clusterDTO.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, clusterDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, clusterDTO.dataChangeLastModifiedTime) && - Objects.equals(this.id, clusterDTO.id) && - Objects.equals(this.name, clusterDTO.name) && - Objects.equals(this.appId, clusterDTO.appId) && - Objects.equals(this.parentClusterId, clusterDTO.parentClusterId) && - Objects.equals(this.comment, clusterDTO.comment); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, id, name, appId, parentClusterId, comment); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ClusterDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).append("\n"); - sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); - sb.append(" dataChangeLastModifiedByDisplayName: ").append(toIndentedString(dataChangeLastModifiedByDisplayName)).append("\n"); - sb.append(" dataChangeCreatedTime: ").append(toIndentedString(dataChangeCreatedTime)).append("\n"); - sb.append(" dataChangeLastModifiedTime: ").append(toIndentedString(dataChangeLastModifiedTime)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" parentClusterId: ").append(toIndentedString(parentClusterId)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/EntityPairKVEntity.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/EntityPairKVEntity.java deleted file mode 100644 index a533297a..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/EntityPairKVEntity.java +++ /dev/null @@ -1,109 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.apollo.openapi.server.model.KVEntity; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * EntityPairKVEntity - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class EntityPairKVEntity { - - private @Nullable KVEntity firstEntity; - - private @Nullable KVEntity secondEntity; - - public EntityPairKVEntity firstEntity(@Nullable KVEntity firstEntity) { - this.firstEntity = firstEntity; - return this; - } - - /** - * Get firstEntity - * @return firstEntity - */ - @Valid - @Schema(name = "firstEntity", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("firstEntity") - public @Nullable KVEntity getFirstEntity() { - return firstEntity; - } - - public void setFirstEntity(@Nullable KVEntity firstEntity) { - this.firstEntity = firstEntity; - } - - public EntityPairKVEntity secondEntity(@Nullable KVEntity secondEntity) { - this.secondEntity = secondEntity; - return this; - } - - /** - * Get secondEntity - * @return secondEntity - */ - @Valid - @Schema(name = "secondEntity", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("secondEntity") - public @Nullable KVEntity getSecondEntity() { - return secondEntity; - } - - public void setSecondEntity(@Nullable KVEntity secondEntity) { - this.secondEntity = secondEntity; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EntityPairKVEntity entityPairKVEntity = (EntityPairKVEntity) o; - return Objects.equals(this.firstEntity, entityPairKVEntity.firstEntity) && - Objects.equals(this.secondEntity, entityPairKVEntity.secondEntity); - } - - @Override - public int hashCode() { - return Objects.hash(firstEntity, secondEntity); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EntityPairKVEntity {\n"); - sb.append(" firstEntity: ").append(toIndentedString(firstEntity)).append("\n"); - sb.append(" secondEntity: ").append(toIndentedString(secondEntity)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/ItemChangeSets.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/ItemChangeSets.java deleted file mode 100644 index fbb14e0f..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/ItemChangeSets.java +++ /dev/null @@ -1,307 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.apollo.openapi.server.model.ItemDTO; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * ItemChangeSets - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class ItemChangeSets { - - private @Nullable String dataChangeCreatedBy; - - private @Nullable String dataChangeLastModifiedBy; - - private @Nullable String dataChangeCreatedByDisplayName; - - private @Nullable String dataChangeLastModifiedByDisplayName; - - private @Nullable String dataChangeCreatedTime; - - private @Nullable String dataChangeLastModifiedTime; - - @Valid - private List<@Valid ItemDTO> createItems = new ArrayList<>(); - - @Valid - private List<@Valid ItemDTO> updateItems = new ArrayList<>(); - - @Valid - private List<@Valid ItemDTO> deleteItems = new ArrayList<>(); - - public ItemChangeSets dataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * - * @return dataChangeCreatedBy - */ - - @Schema(name = "dataChangeCreatedBy", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeCreatedBy") - public @Nullable String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - public void setDataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - public ItemChangeSets dataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * - * @return dataChangeLastModifiedBy - */ - - @Schema(name = "dataChangeLastModifiedBy", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeLastModifiedBy") - public @Nullable String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - public void setDataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - public ItemChangeSets dataChangeCreatedByDisplayName(@Nullable String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - return this; - } - - /** - * - * @return dataChangeCreatedByDisplayName - */ - - @Schema(name = "dataChangeCreatedByDisplayName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeCreatedByDisplayName") - public @Nullable String getDataChangeCreatedByDisplayName() { - return dataChangeCreatedByDisplayName; - } - - public void setDataChangeCreatedByDisplayName(@Nullable String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - } - - public ItemChangeSets dataChangeLastModifiedByDisplayName(@Nullable String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - return this; - } - - /** - * - * @return dataChangeLastModifiedByDisplayName - */ - - @Schema(name = "dataChangeLastModifiedByDisplayName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeLastModifiedByDisplayName") - public @Nullable String getDataChangeLastModifiedByDisplayName() { - return dataChangeLastModifiedByDisplayName; - } - - public void setDataChangeLastModifiedByDisplayName(@Nullable String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - } - - public ItemChangeSets dataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - return this; - } - - /** - * - * @return dataChangeCreatedTime - */ - - @Schema(name = "dataChangeCreatedTime", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeCreatedTime") - public @Nullable String getDataChangeCreatedTime() { - return dataChangeCreatedTime; - } - - public void setDataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - public ItemChangeSets dataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - return this; - } - - /** - * - * @return dataChangeLastModifiedTime - */ - - @Schema(name = "dataChangeLastModifiedTime", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeLastModifiedTime") - public @Nullable String getDataChangeLastModifiedTime() { - return dataChangeLastModifiedTime; - } - - public void setDataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - public ItemChangeSets createItems(List<@Valid ItemDTO> createItems) { - this.createItems = createItems; - return this; - } - - public ItemChangeSets addCreateItemsItem(ItemDTO createItemsItem) { - if (this.createItems == null) { - this.createItems = new ArrayList<>(); - } - this.createItems.add(createItemsItem); - return this; - } - - /** - * - * @return createItems - */ - @Valid - @Schema(name = "createItems", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("createItems") - public List<@Valid ItemDTO> getCreateItems() { - return createItems; - } - - public void setCreateItems(List<@Valid ItemDTO> createItems) { - this.createItems = createItems; - } - - public ItemChangeSets updateItems(List<@Valid ItemDTO> updateItems) { - this.updateItems = updateItems; - return this; - } - - public ItemChangeSets addUpdateItemsItem(ItemDTO updateItemsItem) { - if (this.updateItems == null) { - this.updateItems = new ArrayList<>(); - } - this.updateItems.add(updateItemsItem); - return this; - } - - /** - * - * @return updateItems - */ - @Valid - @Schema(name = "updateItems", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("updateItems") - public List<@Valid ItemDTO> getUpdateItems() { - return updateItems; - } - - public void setUpdateItems(List<@Valid ItemDTO> updateItems) { - this.updateItems = updateItems; - } - - public ItemChangeSets deleteItems(List<@Valid ItemDTO> deleteItems) { - this.deleteItems = deleteItems; - return this; - } - - public ItemChangeSets addDeleteItemsItem(ItemDTO deleteItemsItem) { - if (this.deleteItems == null) { - this.deleteItems = new ArrayList<>(); - } - this.deleteItems.add(deleteItemsItem); - return this; - } - - /** - * - * @return deleteItems - */ - @Valid - @Schema(name = "deleteItems", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("deleteItems") - public List<@Valid ItemDTO> getDeleteItems() { - return deleteItems; - } - - public void setDeleteItems(List<@Valid ItemDTO> deleteItems) { - this.deleteItems = deleteItems; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ItemChangeSets itemChangeSets = (ItemChangeSets) o; - return Objects.equals(this.dataChangeCreatedBy, itemChangeSets.dataChangeCreatedBy) && - Objects.equals(this.dataChangeLastModifiedBy, itemChangeSets.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, itemChangeSets.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, itemChangeSets.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, itemChangeSets.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, itemChangeSets.dataChangeLastModifiedTime) && - Objects.equals(this.createItems, itemChangeSets.createItems) && - Objects.equals(this.updateItems, itemChangeSets.updateItems) && - Objects.equals(this.deleteItems, itemChangeSets.deleteItems); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, createItems, updateItems, deleteItems); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ItemChangeSets {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).append("\n"); - sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); - sb.append(" dataChangeLastModifiedByDisplayName: ").append(toIndentedString(dataChangeLastModifiedByDisplayName)).append("\n"); - sb.append(" dataChangeCreatedTime: ").append(toIndentedString(dataChangeCreatedTime)).append("\n"); - sb.append(" dataChangeLastModifiedTime: ").append(toIndentedString(dataChangeLastModifiedTime)).append("\n"); - sb.append(" createItems: ").append(toIndentedString(createItems)).append("\n"); - sb.append(" updateItems: ").append(toIndentedString(updateItems)).append("\n"); - sb.append(" deleteItems: ").append(toIndentedString(deleteItems)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/ItemDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/ItemDTO.java deleted file mode 100644 index f9b4a642..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/ItemDTO.java +++ /dev/null @@ -1,372 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * ItemDTO - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class ItemDTO { - - private @Nullable String dataChangeCreatedBy; - - private @Nullable String dataChangeLastModifiedBy; - - private @Nullable String dataChangeCreatedByDisplayName; - - private @Nullable String dataChangeLastModifiedByDisplayName; - - private @Nullable String dataChangeCreatedTime; - - private @Nullable String dataChangeLastModifiedTime; - - private @Nullable Long id; - - private @Nullable Long namespaceId; - - private @Nullable String key; - - private @Nullable Integer type; - - private @Nullable String value; - - private @Nullable String comment; - - private @Nullable Integer lineNum; - - public ItemDTO dataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * - * @return dataChangeCreatedBy - */ - - @Schema(name = "dataChangeCreatedBy", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeCreatedBy") - public @Nullable String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - public void setDataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - public ItemDTO dataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * - * @return dataChangeLastModifiedBy - */ - - @Schema(name = "dataChangeLastModifiedBy", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeLastModifiedBy") - public @Nullable String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - public void setDataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - public ItemDTO dataChangeCreatedByDisplayName(@Nullable String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - return this; - } - - /** - * - * @return dataChangeCreatedByDisplayName - */ - - @Schema(name = "dataChangeCreatedByDisplayName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeCreatedByDisplayName") - public @Nullable String getDataChangeCreatedByDisplayName() { - return dataChangeCreatedByDisplayName; - } - - public void setDataChangeCreatedByDisplayName(@Nullable String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - } - - public ItemDTO dataChangeLastModifiedByDisplayName(@Nullable String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - return this; - } - - /** - * - * @return dataChangeLastModifiedByDisplayName - */ - - @Schema(name = "dataChangeLastModifiedByDisplayName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeLastModifiedByDisplayName") - public @Nullable String getDataChangeLastModifiedByDisplayName() { - return dataChangeLastModifiedByDisplayName; - } - - public void setDataChangeLastModifiedByDisplayName(@Nullable String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - } - - public ItemDTO dataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - return this; - } - - /** - * - * @return dataChangeCreatedTime - */ - - @Schema(name = "dataChangeCreatedTime", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeCreatedTime") - public @Nullable String getDataChangeCreatedTime() { - return dataChangeCreatedTime; - } - - public void setDataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - public ItemDTO dataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - return this; - } - - /** - * - * @return dataChangeLastModifiedTime - */ - - @Schema(name = "dataChangeLastModifiedTime", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeLastModifiedTime") - public @Nullable String getDataChangeLastModifiedTime() { - return dataChangeLastModifiedTime; - } - - public void setDataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - public ItemDTO id(@Nullable Long id) { - this.id = id; - return this; - } - - /** - * - * @return id - */ - - @Schema(name = "id", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("id") - public @Nullable Long getId() { - return id; - } - - public void setId(@Nullable Long id) { - this.id = id; - } - - public ItemDTO namespaceId(@Nullable Long namespaceId) { - this.namespaceId = namespaceId; - return this; - } - - /** - * - * @return namespaceId - */ - - @Schema(name = "namespaceId", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("namespaceId") - public @Nullable Long getNamespaceId() { - return namespaceId; - } - - public void setNamespaceId(@Nullable Long namespaceId) { - this.namespaceId = namespaceId; - } - - public ItemDTO key(@Nullable String key) { - this.key = key; - return this; - } - - /** - * - * @return key - */ - - @Schema(name = "key", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("key") - public @Nullable String getKey() { - return key; - } - - public void setKey(@Nullable String key) { - this.key = key; - } - - public ItemDTO type(@Nullable Integer type) { - this.type = type; - return this; - } - - /** - * - * @return type - */ - - @Schema(name = "type", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("type") - public @Nullable Integer getType() { - return type; - } - - public void setType(@Nullable Integer type) { - this.type = type; - } - - public ItemDTO value(@Nullable String value) { - this.value = value; - return this; - } - - /** - * - * @return value - */ - - @Schema(name = "value", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("value") - public @Nullable String getValue() { - return value; - } - - public void setValue(@Nullable String value) { - this.value = value; - } - - public ItemDTO comment(@Nullable String comment) { - this.comment = comment; - return this; - } - - /** - * - * @return comment - */ - - @Schema(name = "comment", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("comment") - public @Nullable String getComment() { - return comment; - } - - public void setComment(@Nullable String comment) { - this.comment = comment; - } - - public ItemDTO lineNum(@Nullable Integer lineNum) { - this.lineNum = lineNum; - return this; - } - - /** - * - * @return lineNum - */ - - @Schema(name = "lineNum", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("lineNum") - public @Nullable Integer getLineNum() { - return lineNum; - } - - public void setLineNum(@Nullable Integer lineNum) { - this.lineNum = lineNum; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ItemDTO itemDTO = (ItemDTO) o; - return Objects.equals(this.dataChangeCreatedBy, itemDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeLastModifiedBy, itemDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, itemDTO.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, itemDTO.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, itemDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, itemDTO.dataChangeLastModifiedTime) && - Objects.equals(this.id, itemDTO.id) && - Objects.equals(this.namespaceId, itemDTO.namespaceId) && - Objects.equals(this.key, itemDTO.key) && - Objects.equals(this.type, itemDTO.type) && - Objects.equals(this.value, itemDTO.value) && - Objects.equals(this.comment, itemDTO.comment) && - Objects.equals(this.lineNum, itemDTO.lineNum); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, id, namespaceId, key, type, value, comment, lineNum); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ItemDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).append("\n"); - sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); - sb.append(" dataChangeLastModifiedByDisplayName: ").append(toIndentedString(dataChangeLastModifiedByDisplayName)).append("\n"); - sb.append(" dataChangeCreatedTime: ").append(toIndentedString(dataChangeCreatedTime)).append("\n"); - sb.append(" dataChangeLastModifiedTime: ").append(toIndentedString(dataChangeLastModifiedTime)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" namespaceId: ").append(toIndentedString(namespaceId)).append("\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append(" lineNum: ").append(toIndentedString(lineNum)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/KVEntity.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/KVEntity.java index f947e49f..48ee7601 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/KVEntity.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/KVEntity.java @@ -4,7 +4,6 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,50 +18,50 @@ * KVEntity */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") public class KVEntity { - private @Nullable String key; + private String key; - private @Nullable String value; + private String value; - public KVEntity key(@Nullable String key) { + public KVEntity key(String key) { this.key = key; return this; } /** - * + * 键 * @return key - */ - - @Schema(name = "key", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "key", description = "键", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("key") - public @Nullable String getKey() { + public String getKey() { return key; } - public void setKey(@Nullable String key) { + public void setKey(String key) { this.key = key; } - public KVEntity value(@Nullable String value) { + public KVEntity value(String value) { this.value = value; return this; } /** - * + * 值 * @return value - */ - - @Schema(name = "value", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "value", description = "值", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("value") - public @Nullable String getValue() { + public String getValue() { return value; } - public void setValue(@Nullable String value) { + public void setValue(String value) { this.value = value; } @@ -105,4 +104,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/MapString.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/MapString.java deleted file mode 100644 index 60990a17..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/MapString.java +++ /dev/null @@ -1,85 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * 字符串映射对象,用于表示键值对的配置数据结构 - */ - -@Schema(name = "MapString", description = "字符串映射对象,用于表示键值对的配置数据结构") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class MapString { - - private @Nullable String key; - - public MapString key(@Nullable String key) { - this.key = key; - return this; - } - - /** - * Get key - * @return key - */ - - @Schema(name = "key", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("key") - public @Nullable String getKey() { - return key; - } - - public void setKey(@Nullable String key) { - this.key = key; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MapString mapString = (MapString) o; - return Objects.equals(this.key, mapString.key); - } - - @Override - public int hashCode() { - return Objects.hash(key); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MapString {\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/MultiResponseEntity.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/MultiResponseEntity.java new file mode 100644 index 00000000..f76b3d2f --- /dev/null +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/MultiResponseEntity.java @@ -0,0 +1,136 @@ +package com.apollo.openapi.server.model; + +import java.net.URI; +import java.util.Objects; +import com.apollo.openapi.server.model.RichResponseEntity; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * A response container holding multiple RichResponseEntity objects + */ + +@Schema(name = "MultiResponseEntity", description = "A response container holding multiple RichResponseEntity objects") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +public class MultiResponseEntity { + + private Integer code; + + @Valid + private List<@Valid RichResponseEntity> entities = new ArrayList<>(); + + /** + * Default constructor + * @deprecated Use {@link MultiResponseEntity#MultiResponseEntity(Integer, List<@Valid RichResponseEntity>)} + */ + @Deprecated + public MultiResponseEntity() { + super(); + } + + /** + * Constructor with only required parameters + */ + public MultiResponseEntity(Integer code, List<@Valid RichResponseEntity> entities) { + this.code = code; + this.entities = entities; + } + + public MultiResponseEntity code(Integer code) { + this.code = code; + return this; + } + + /** + * Overall HTTP status code + * @return code + */ + @NotNull + @Schema(name = "code", example = "200", description = "Overall HTTP status code", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("code") + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public MultiResponseEntity entities(List<@Valid RichResponseEntity> entities) { + this.entities = entities; + return this; + } + + public MultiResponseEntity addEntitiesItem(RichResponseEntity entitiesItem) { + if (this.entities == null) { + this.entities = new ArrayList<>(); + } + this.entities.add(entitiesItem); + return this; + } + + /** + * List of rich response entities + * @return entities + */ + @NotNull @Valid + @Schema(name = "entities", description = "List of rich response entities", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("entities") + public List<@Valid RichResponseEntity> getEntities() { + return entities; + } + + public void setEntities(List<@Valid RichResponseEntity> entities) { + this.entities = entities; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MultiResponseEntity multiResponseEntity = (MultiResponseEntity) o; + return Objects.equals(this.code, multiResponseEntity.code) && + Objects.equals(this.entities, multiResponseEntity.entities); + } + + @Override + public int hashCode() { + return Objects.hash(code, entities); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MultiResponseEntity {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" entities: ").append(toIndentedString(entities)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceGrayDelReleaseDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceGrayDelReleaseDTO.java index 596c4912..002554c5 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceGrayDelReleaseDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceGrayDelReleaseDTO.java @@ -5,9 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; -import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -23,21 +21,21 @@ */ @Schema(name = "NamespaceGrayDelReleaseDTO", description = "命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") public class NamespaceGrayDelReleaseDTO { - private @Nullable String releaseTitle; + private String releaseTitle; - private @Nullable String releaseComment; + private String releaseComment; - private @Nullable String releasedBy; + private String releasedBy; - private @Nullable Boolean isEmergencyPublish; + private Boolean isEmergencyPublish; @Valid - private List grayDelKeys = new ArrayList<>(); + private List grayDelKeys; - public NamespaceGrayDelReleaseDTO releaseTitle(@Nullable String releaseTitle) { + public NamespaceGrayDelReleaseDTO releaseTitle(String releaseTitle) { this.releaseTitle = releaseTitle; return this; } @@ -45,19 +43,19 @@ public NamespaceGrayDelReleaseDTO releaseTitle(@Nullable String releaseTitle) { /** * 发布标题,用于标识这次灰度删除发布的名称或版本号 * @return releaseTitle - */ - + */ + @Schema(name = "releaseTitle", description = "发布标题,用于标识这次灰度删除发布的名称或版本号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("releaseTitle") - public @Nullable String getReleaseTitle() { + public String getReleaseTitle() { return releaseTitle; } - public void setReleaseTitle(@Nullable String releaseTitle) { + public void setReleaseTitle(String releaseTitle) { this.releaseTitle = releaseTitle; } - public NamespaceGrayDelReleaseDTO releaseComment(@Nullable String releaseComment) { + public NamespaceGrayDelReleaseDTO releaseComment(String releaseComment) { this.releaseComment = releaseComment; return this; } @@ -65,19 +63,19 @@ public NamespaceGrayDelReleaseDTO releaseComment(@Nullable String releaseComment /** * 发布备注,详细描述本次灰度删除发布的目的和删除的配置项 * @return releaseComment - */ - + */ + @Schema(name = "releaseComment", description = "发布备注,详细描述本次灰度删除发布的目的和删除的配置项", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("releaseComment") - public @Nullable String getReleaseComment() { + public String getReleaseComment() { return releaseComment; } - public void setReleaseComment(@Nullable String releaseComment) { + public void setReleaseComment(String releaseComment) { this.releaseComment = releaseComment; } - public NamespaceGrayDelReleaseDTO releasedBy(@Nullable String releasedBy) { + public NamespaceGrayDelReleaseDTO releasedBy(String releasedBy) { this.releasedBy = releasedBy; return this; } @@ -85,19 +83,19 @@ public NamespaceGrayDelReleaseDTO releasedBy(@Nullable String releasedBy) { /** * 发布操作者用户名,记录是谁执行了这次灰度删除发布操作 * @return releasedBy - */ - + */ + @Schema(name = "releasedBy", description = "发布操作者用户名,记录是谁执行了这次灰度删除发布操作", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("releasedBy") - public @Nullable String getReleasedBy() { + public String getReleasedBy() { return releasedBy; } - public void setReleasedBy(@Nullable String releasedBy) { + public void setReleasedBy(String releasedBy) { this.releasedBy = releasedBy; } - public NamespaceGrayDelReleaseDTO isEmergencyPublish(@Nullable Boolean isEmergencyPublish) { + public NamespaceGrayDelReleaseDTO isEmergencyPublish(Boolean isEmergencyPublish) { this.isEmergencyPublish = isEmergencyPublish; return this; } @@ -105,15 +103,15 @@ public NamespaceGrayDelReleaseDTO isEmergencyPublish(@Nullable Boolean isEmergen /** * 是否为紧急发布,紧急发布可能会跳过某些审核流程 * @return isEmergencyPublish - */ - + */ + @Schema(name = "isEmergencyPublish", description = "是否为紧急发布,紧急发布可能会跳过某些审核流程", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("isEmergencyPublish") - public @Nullable Boolean getIsEmergencyPublish() { + public Boolean getIsEmergencyPublish() { return isEmergencyPublish; } - public void setIsEmergencyPublish(@Nullable Boolean isEmergencyPublish) { + public void setIsEmergencyPublish(Boolean isEmergencyPublish) { this.isEmergencyPublish = isEmergencyPublish; } @@ -133,8 +131,8 @@ public NamespaceGrayDelReleaseDTO addGrayDelKeysItem(String grayDelKeysItem) { /** * 需要在灰度发布中删除的配置项键名列表 * @return grayDelKeys - */ - + */ + @Schema(name = "grayDelKeys", description = "需要在灰度发布中删除的配置项键名列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("grayDelKeys") public List getGrayDelKeys() { @@ -190,4 +188,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceReleaseDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceReleaseDTO.java index d849355e..bf73645f 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceReleaseDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceReleaseDTO.java @@ -4,7 +4,6 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -20,18 +19,18 @@ */ @Schema(name = "NamespaceReleaseDTO", description = "命名空间发布请求数据传输对象,用于创建新的配置发布") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") public class NamespaceReleaseDTO { - private @Nullable String releaseTitle; + private String releaseTitle; - private @Nullable String releaseComment; + private String releaseComment; - private @Nullable String releasedBy; + private String releasedBy; - private @Nullable Boolean isEmergencyPublish; + private Boolean isEmergencyPublish; - public NamespaceReleaseDTO releaseTitle(@Nullable String releaseTitle) { + public NamespaceReleaseDTO releaseTitle(String releaseTitle) { this.releaseTitle = releaseTitle; return this; } @@ -39,19 +38,19 @@ public NamespaceReleaseDTO releaseTitle(@Nullable String releaseTitle) { /** * 发布标题,用于标识这次发布的名称或版本号 * @return releaseTitle - */ - + */ + @Schema(name = "releaseTitle", description = "发布标题,用于标识这次发布的名称或版本号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("releaseTitle") - public @Nullable String getReleaseTitle() { + public String getReleaseTitle() { return releaseTitle; } - public void setReleaseTitle(@Nullable String releaseTitle) { + public void setReleaseTitle(String releaseTitle) { this.releaseTitle = releaseTitle; } - public NamespaceReleaseDTO releaseComment(@Nullable String releaseComment) { + public NamespaceReleaseDTO releaseComment(String releaseComment) { this.releaseComment = releaseComment; return this; } @@ -59,19 +58,19 @@ public NamespaceReleaseDTO releaseComment(@Nullable String releaseComment) { /** * 发布备注,详细描述本次发布的变更内容和目的 * @return releaseComment - */ - + */ + @Schema(name = "releaseComment", description = "发布备注,详细描述本次发布的变更内容和目的", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("releaseComment") - public @Nullable String getReleaseComment() { + public String getReleaseComment() { return releaseComment; } - public void setReleaseComment(@Nullable String releaseComment) { + public void setReleaseComment(String releaseComment) { this.releaseComment = releaseComment; } - public NamespaceReleaseDTO releasedBy(@Nullable String releasedBy) { + public NamespaceReleaseDTO releasedBy(String releasedBy) { this.releasedBy = releasedBy; return this; } @@ -79,19 +78,19 @@ public NamespaceReleaseDTO releasedBy(@Nullable String releasedBy) { /** * 发布操作者用户名,记录是谁执行了这次发布操作 * @return releasedBy - */ - + */ + @Schema(name = "releasedBy", description = "发布操作者用户名,记录是谁执行了这次发布操作", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("releasedBy") - public @Nullable String getReleasedBy() { + public String getReleasedBy() { return releasedBy; } - public void setReleasedBy(@Nullable String releasedBy) { + public void setReleasedBy(String releasedBy) { this.releasedBy = releasedBy; } - public NamespaceReleaseDTO isEmergencyPublish(@Nullable Boolean isEmergencyPublish) { + public NamespaceReleaseDTO isEmergencyPublish(Boolean isEmergencyPublish) { this.isEmergencyPublish = isEmergencyPublish; return this; } @@ -99,15 +98,15 @@ public NamespaceReleaseDTO isEmergencyPublish(@Nullable Boolean isEmergencyPubli /** * 是否为紧急发布,紧急发布可能会跳过某些审核流程 * @return isEmergencyPublish - */ - + */ + @Schema(name = "isEmergencyPublish", description = "是否为紧急发布,紧急发布可能会跳过某些审核流程", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("isEmergencyPublish") - public @Nullable Boolean getIsEmergencyPublish() { + public Boolean getIsEmergencyPublish() { return isEmergencyPublish; } - public void setIsEmergencyPublish(@Nullable Boolean isEmergencyPublish) { + public void setIsEmergencyPublish(Boolean isEmergencyPublish) { this.isEmergencyPublish = isEmergencyPublish; } @@ -154,4 +153,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceTextModel.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceTextModel.java deleted file mode 100644 index 9f82c4da..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceTextModel.java +++ /dev/null @@ -1,252 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * NamespaceTextModel - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class NamespaceTextModel { - - private @Nullable String appId; - - private @Nullable String env; - - private @Nullable String clusterName; - - private @Nullable String namespaceName; - - private @Nullable Long namespaceId; - - private @Nullable String format; - - private @Nullable String configText; - - private @Nullable String operator; - - public NamespaceTextModel appId(@Nullable String appId) { - this.appId = appId; - return this; - } - - /** - * - * @return appId - */ - - @Schema(name = "appId", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("appId") - public @Nullable String getAppId() { - return appId; - } - - public void setAppId(@Nullable String appId) { - this.appId = appId; - } - - public NamespaceTextModel env(@Nullable String env) { - this.env = env; - return this; - } - - /** - * - * @return env - */ - - @Schema(name = "env", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("env") - public @Nullable String getEnv() { - return env; - } - - public void setEnv(@Nullable String env) { - this.env = env; - } - - public NamespaceTextModel clusterName(@Nullable String clusterName) { - this.clusterName = clusterName; - return this; - } - - /** - * - * @return clusterName - */ - - @Schema(name = "clusterName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("clusterName") - public @Nullable String getClusterName() { - return clusterName; - } - - public void setClusterName(@Nullable String clusterName) { - this.clusterName = clusterName; - } - - public NamespaceTextModel namespaceName(@Nullable String namespaceName) { - this.namespaceName = namespaceName; - return this; - } - - /** - * - * @return namespaceName - */ - - @Schema(name = "namespaceName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("namespaceName") - public @Nullable String getNamespaceName() { - return namespaceName; - } - - public void setNamespaceName(@Nullable String namespaceName) { - this.namespaceName = namespaceName; - } - - public NamespaceTextModel namespaceId(@Nullable Long namespaceId) { - this.namespaceId = namespaceId; - return this; - } - - /** - * - * @return namespaceId - */ - - @Schema(name = "namespaceId", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("namespaceId") - public @Nullable Long getNamespaceId() { - return namespaceId; - } - - public void setNamespaceId(@Nullable Long namespaceId) { - this.namespaceId = namespaceId; - } - - public NamespaceTextModel format(@Nullable String format) { - this.format = format; - return this; - } - - /** - * - * @return format - */ - - @Schema(name = "format", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("format") - public @Nullable String getFormat() { - return format; - } - - public void setFormat(@Nullable String format) { - this.format = format; - } - - public NamespaceTextModel configText(@Nullable String configText) { - this.configText = configText; - return this; - } - - /** - * - * @return configText - */ - - @Schema(name = "configText", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("configText") - public @Nullable String getConfigText() { - return configText; - } - - public void setConfigText(@Nullable String configText) { - this.configText = configText; - } - - public NamespaceTextModel operator(@Nullable String operator) { - this.operator = operator; - return this; - } - - /** - * - * @return operator - */ - - @Schema(name = "operator", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("operator") - public @Nullable String getOperator() { - return operator; - } - - public void setOperator(@Nullable String operator) { - this.operator = operator; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NamespaceTextModel namespaceTextModel = (NamespaceTextModel) o; - return Objects.equals(this.appId, namespaceTextModel.appId) && - Objects.equals(this.env, namespaceTextModel.env) && - Objects.equals(this.clusterName, namespaceTextModel.clusterName) && - Objects.equals(this.namespaceName, namespaceTextModel.namespaceName) && - Objects.equals(this.namespaceId, namespaceTextModel.namespaceId) && - Objects.equals(this.format, namespaceTextModel.format) && - Objects.equals(this.configText, namespaceTextModel.configText) && - Objects.equals(this.operator, namespaceTextModel.operator); - } - - @Override - public int hashCode() { - return Objects.hash(appId, env, clusterName, namespaceName, namespaceId, format, configText, operator); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NamespaceTextModel {\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" env: ").append(toIndentedString(env)).append("\n"); - sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); - sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); - sb.append(" namespaceId: ").append(toIndentedString(namespaceId)).append("\n"); - sb.append(" format: ").append(toIndentedString(format)).append("\n"); - sb.append(" configText: ").append(toIndentedString(configText)).append("\n"); - sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - 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 68364312..95e89405 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 @@ -4,7 +4,6 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -20,30 +19,30 @@ */ @Schema(name = "OpenAppDTO", description = "Apollo应用信息数据传输对象,包含应用的基本信息和元数据") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") public class OpenAppDTO { - private @Nullable String dataChangeCreatedBy; + private String dataChangeCreatedBy; - private @Nullable String dataChangeLastModifiedBy; + private String dataChangeLastModifiedBy; - private @Nullable String dataChangeCreatedTime; + private String dataChangeCreatedTime; - private @Nullable String dataChangeLastModifiedTime; + private String dataChangeLastModifiedTime; - private @Nullable String name; + private String name; - private @Nullable String appId; + private String appId; - private @Nullable String orgId; + private String orgId; - private @Nullable String orgName; + private String orgName; - private @Nullable String ownerName; + private String ownerName; - private @Nullable String ownerEmail; + private String ownerEmail; - public OpenAppDTO dataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { + public OpenAppDTO dataChangeCreatedBy(String dataChangeCreatedBy) { this.dataChangeCreatedBy = dataChangeCreatedBy; return this; } @@ -51,19 +50,19 @@ public OpenAppDTO dataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { /** * 数据创建者用户名,记录是谁创建了这个应用 * @return dataChangeCreatedBy - */ - + */ + @Schema(name = "dataChangeCreatedBy", description = "数据创建者用户名,记录是谁创建了这个应用", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedBy") - public @Nullable String getDataChangeCreatedBy() { + public String getDataChangeCreatedBy() { return dataChangeCreatedBy; } - public void setDataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { + public void setDataChangeCreatedBy(String dataChangeCreatedBy) { this.dataChangeCreatedBy = dataChangeCreatedBy; } - public OpenAppDTO dataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { + public OpenAppDTO dataChangeLastModifiedBy(String dataChangeLastModifiedBy) { this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; return this; } @@ -71,19 +70,19 @@ public OpenAppDTO dataChangeLastModifiedBy(@Nullable String dataChangeLastModifi /** * 数据最后修改者用户名,记录最后一次修改应用信息的用户 * @return dataChangeLastModifiedBy - */ - + */ + @Schema(name = "dataChangeLastModifiedBy", description = "数据最后修改者用户名,记录最后一次修改应用信息的用户", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedBy") - public @Nullable String getDataChangeLastModifiedBy() { + public String getDataChangeLastModifiedBy() { return dataChangeLastModifiedBy; } - public void setDataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { + public void setDataChangeLastModifiedBy(String dataChangeLastModifiedBy) { this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; } - public OpenAppDTO dataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { + public OpenAppDTO dataChangeCreatedTime(String dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; return this; } @@ -91,19 +90,19 @@ public OpenAppDTO dataChangeCreatedTime(@Nullable String dataChangeCreatedTime) /** * 数据创建时间,ISO 8601格式的时间戳 * @return dataChangeCreatedTime - */ - - @Schema(name = "dataChangeCreatedTime", description = "数据创建时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "dataChangeCreatedTime", example = "2025-09-29T12:34:56Z", description = "数据创建时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedTime") - public @Nullable String getDataChangeCreatedTime() { + public String getDataChangeCreatedTime() { return dataChangeCreatedTime; } - public void setDataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { + public void setDataChangeCreatedTime(String dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; } - public OpenAppDTO dataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { + public OpenAppDTO dataChangeLastModifiedTime(String dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; return this; } @@ -111,19 +110,19 @@ public OpenAppDTO dataChangeLastModifiedTime(@Nullable String dataChangeLastModi /** * 数据最后修改时间,ISO 8601格式的时间戳 * @return dataChangeLastModifiedTime - */ - - @Schema(name = "dataChangeLastModifiedTime", description = "数据最后修改时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "dataChangeLastModifiedTime", example = "2025-09-29T12:34:56Z", description = "数据最后修改时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedTime") - public @Nullable String getDataChangeLastModifiedTime() { + public String getDataChangeLastModifiedTime() { return dataChangeLastModifiedTime; } - public void setDataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { + public void setDataChangeLastModifiedTime(String dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; } - public OpenAppDTO name(@Nullable String name) { + public OpenAppDTO name(String name) { this.name = name; return this; } @@ -131,19 +130,19 @@ public OpenAppDTO name(@Nullable String name) { /** * 应用名称,用于显示的友好名称 * @return name - */ - + */ + @Schema(name = "name", description = "应用名称,用于显示的友好名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") - public @Nullable String getName() { + public String getName() { return name; } - public void setName(@Nullable String name) { + public void setName(String name) { this.name = name; } - public OpenAppDTO appId(@Nullable String appId) { + public OpenAppDTO appId(String appId) { this.appId = appId; return this; } @@ -151,19 +150,19 @@ public OpenAppDTO appId(@Nullable String appId) { /** * 应用唯一标识符,全局唯一的应用ID * @return appId - */ - + */ + @Schema(name = "appId", description = "应用唯一标识符,全局唯一的应用ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("appId") - public @Nullable String getAppId() { + public String getAppId() { return appId; } - public void setAppId(@Nullable String appId) { + public void setAppId(String appId) { this.appId = appId; } - public OpenAppDTO orgId(@Nullable String orgId) { + public OpenAppDTO orgId(String orgId) { this.orgId = orgId; return this; } @@ -171,19 +170,19 @@ public OpenAppDTO orgId(@Nullable String orgId) { /** * 组织ID,应用所属组织的唯一标识 * @return orgId - */ - + */ + @Schema(name = "orgId", description = "组织ID,应用所属组织的唯一标识", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("orgId") - public @Nullable String getOrgId() { + public String getOrgId() { return orgId; } - public void setOrgId(@Nullable String orgId) { + public void setOrgId(String orgId) { this.orgId = orgId; } - public OpenAppDTO orgName(@Nullable String orgName) { + public OpenAppDTO orgName(String orgName) { this.orgName = orgName; return this; } @@ -191,19 +190,19 @@ public OpenAppDTO orgName(@Nullable String orgName) { /** * 组织名称,应用所属组织的显示名称 * @return orgName - */ - + */ + @Schema(name = "orgName", description = "组织名称,应用所属组织的显示名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("orgName") - public @Nullable String getOrgName() { + public String getOrgName() { return orgName; } - public void setOrgName(@Nullable String orgName) { + public void setOrgName(String orgName) { this.orgName = orgName; } - public OpenAppDTO ownerName(@Nullable String ownerName) { + public OpenAppDTO ownerName(String ownerName) { this.ownerName = ownerName; return this; } @@ -211,19 +210,19 @@ public OpenAppDTO ownerName(@Nullable String ownerName) { /** * 应用负责人姓名,应用的主要负责人 * @return ownerName - */ - + */ + @Schema(name = "ownerName", description = "应用负责人姓名,应用的主要负责人", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("ownerName") - public @Nullable String getOwnerName() { + public String getOwnerName() { return ownerName; } - public void setOwnerName(@Nullable String ownerName) { + public void setOwnerName(String ownerName) { this.ownerName = ownerName; } - public OpenAppDTO ownerEmail(@Nullable String ownerEmail) { + public OpenAppDTO ownerEmail(String ownerEmail) { this.ownerEmail = ownerEmail; return this; } @@ -231,15 +230,15 @@ public OpenAppDTO ownerEmail(@Nullable String ownerEmail) { /** * 应用负责人邮箱地址,用于接收应用相关通知 * @return ownerEmail - */ - + */ + @Schema(name = "ownerEmail", description = "应用负责人邮箱地址,用于接收应用相关通知", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("ownerEmail") - public @Nullable String getOwnerEmail() { + public String getOwnerEmail() { return ownerEmail; } - public void setOwnerEmail(@Nullable String ownerEmail) { + public void setOwnerEmail(String ownerEmail) { this.ownerEmail = ownerEmail; } @@ -298,4 +297,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppNamespaceDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppNamespaceDTO.java index 86e05774..57ebe2a7 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppNamespaceDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppNamespaceDTO.java @@ -4,7 +4,6 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -20,30 +19,30 @@ */ @Schema(name = "OpenAppNamespaceDTO", description = "Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") public class OpenAppNamespaceDTO { - private @Nullable String dataChangeCreatedBy; + private String dataChangeCreatedBy; - private @Nullable String dataChangeLastModifiedBy; + private String dataChangeLastModifiedBy; - private @Nullable String dataChangeCreatedTime; + private String dataChangeCreatedTime; - private @Nullable String dataChangeLastModifiedTime; + private String dataChangeLastModifiedTime; - private @Nullable String name; + private String name; - private @Nullable String appId; + private String appId; - private @Nullable String format; + private String format; - private @Nullable Boolean isPublic; + private Boolean isPublic; private Boolean appendNamespacePrefix = true; - private @Nullable String comment; + private String comment; - public OpenAppNamespaceDTO dataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { + public OpenAppNamespaceDTO dataChangeCreatedBy(String dataChangeCreatedBy) { this.dataChangeCreatedBy = dataChangeCreatedBy; return this; } @@ -51,19 +50,19 @@ public OpenAppNamespaceDTO dataChangeCreatedBy(@Nullable String dataChangeCreate /** * 命名空间创建者用户名,记录是谁创建了这个应用命名空间 * @return dataChangeCreatedBy - */ - + */ + @Schema(name = "dataChangeCreatedBy", description = "命名空间创建者用户名,记录是谁创建了这个应用命名空间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedBy") - public @Nullable String getDataChangeCreatedBy() { + public String getDataChangeCreatedBy() { return dataChangeCreatedBy; } - public void setDataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { + public void setDataChangeCreatedBy(String dataChangeCreatedBy) { this.dataChangeCreatedBy = dataChangeCreatedBy; } - public OpenAppNamespaceDTO dataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { + public OpenAppNamespaceDTO dataChangeLastModifiedBy(String dataChangeLastModifiedBy) { this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; return this; } @@ -71,19 +70,19 @@ public OpenAppNamespaceDTO dataChangeLastModifiedBy(@Nullable String dataChangeL /** * 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 * @return dataChangeLastModifiedBy - */ - + */ + @Schema(name = "dataChangeLastModifiedBy", description = "命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedBy") - public @Nullable String getDataChangeLastModifiedBy() { + public String getDataChangeLastModifiedBy() { return dataChangeLastModifiedBy; } - public void setDataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { + public void setDataChangeLastModifiedBy(String dataChangeLastModifiedBy) { this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; } - public OpenAppNamespaceDTO dataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { + public OpenAppNamespaceDTO dataChangeCreatedTime(String dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; return this; } @@ -91,19 +90,19 @@ public OpenAppNamespaceDTO dataChangeCreatedTime(@Nullable String dataChangeCrea /** * 命名空间创建时间,ISO 8601格式的时间戳 * @return dataChangeCreatedTime - */ - - @Schema(name = "dataChangeCreatedTime", description = "命名空间创建时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "dataChangeCreatedTime", example = "2025-09-29T12:34:56Z", description = "命名空间创建时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedTime") - public @Nullable String getDataChangeCreatedTime() { + public String getDataChangeCreatedTime() { return dataChangeCreatedTime; } - public void setDataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { + public void setDataChangeCreatedTime(String dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; } - public OpenAppNamespaceDTO dataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { + public OpenAppNamespaceDTO dataChangeLastModifiedTime(String dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; return this; } @@ -111,19 +110,19 @@ public OpenAppNamespaceDTO dataChangeLastModifiedTime(@Nullable String dataChang /** * 命名空间最后修改时间,ISO 8601格式的时间戳 * @return dataChangeLastModifiedTime - */ - - @Schema(name = "dataChangeLastModifiedTime", description = "命名空间最后修改时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "dataChangeLastModifiedTime", example = "2025-09-29T12:34:56Z", description = "命名空间最后修改时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedTime") - public @Nullable String getDataChangeLastModifiedTime() { + public String getDataChangeLastModifiedTime() { return dataChangeLastModifiedTime; } - public void setDataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { + public void setDataChangeLastModifiedTime(String dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; } - public OpenAppNamespaceDTO name(@Nullable String name) { + public OpenAppNamespaceDTO name(String name) { this.name = name; return this; } @@ -131,19 +130,19 @@ public OpenAppNamespaceDTO name(@Nullable String name) { /** * 命名空间名称,在同一应用内唯一标识一个命名空间 * @return name - */ - + */ + @Schema(name = "name", description = "命名空间名称,在同一应用内唯一标识一个命名空间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") - public @Nullable String getName() { + public String getName() { return name; } - public void setName(@Nullable String name) { + public void setName(String name) { this.name = name; } - public OpenAppNamespaceDTO appId(@Nullable String appId) { + public OpenAppNamespaceDTO appId(String appId) { this.appId = appId; return this; } @@ -151,19 +150,19 @@ public OpenAppNamespaceDTO appId(@Nullable String appId) { /** * 所属应用的唯一标识符 * @return appId - */ - + */ + @Schema(name = "appId", description = "所属应用的唯一标识符", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("appId") - public @Nullable String getAppId() { + public String getAppId() { return appId; } - public void setAppId(@Nullable String appId) { + public void setAppId(String appId) { this.appId = appId; } - public OpenAppNamespaceDTO format(@Nullable String format) { + public OpenAppNamespaceDTO format(String format) { this.format = format; return this; } @@ -171,19 +170,19 @@ public OpenAppNamespaceDTO format(@Nullable String format) { /** * 命名空间格式类型,如properties、xml、json、yml等 * @return format - */ - + */ + @Schema(name = "format", description = "命名空间格式类型,如properties、xml、json、yml等", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("format") - public @Nullable String getFormat() { + public String getFormat() { return format; } - public void setFormat(@Nullable String format) { + public void setFormat(String format) { this.format = format; } - public OpenAppNamespaceDTO isPublic(@Nullable Boolean isPublic) { + public OpenAppNamespaceDTO isPublic(Boolean isPublic) { this.isPublic = isPublic; return this; } @@ -191,15 +190,15 @@ public OpenAppNamespaceDTO isPublic(@Nullable Boolean isPublic) { /** * 是否为公共命名空间,公共命名空间可以被其他应用关联使用 * @return isPublic - */ - + */ + @Schema(name = "isPublic", description = "是否为公共命名空间,公共命名空间可以被其他应用关联使用", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("isPublic") - public @Nullable Boolean getIsPublic() { + public Boolean getIsPublic() { return isPublic; } - public void setIsPublic(@Nullable Boolean isPublic) { + public void setIsPublic(Boolean isPublic) { this.isPublic = isPublic; } @@ -211,8 +210,8 @@ public OpenAppNamespaceDTO appendNamespacePrefix(Boolean appendNamespacePrefix) /** * 对于公共命名空间,是否在命名空间名称前添加前缀 * @return appendNamespacePrefix - */ - + */ + @Schema(name = "appendNamespacePrefix", description = "对于公共命名空间,是否在命名空间名称前添加前缀", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("appendNamespacePrefix") public Boolean getAppendNamespacePrefix() { @@ -223,7 +222,7 @@ public void setAppendNamespacePrefix(Boolean appendNamespacePrefix) { this.appendNamespacePrefix = appendNamespacePrefix; } - public OpenAppNamespaceDTO comment(@Nullable String comment) { + public OpenAppNamespaceDTO comment(String comment) { this.comment = comment; return this; } @@ -231,15 +230,15 @@ public OpenAppNamespaceDTO comment(@Nullable String comment) { /** * 命名空间备注说明,描述命名空间的用途和包含的配置类型 * @return comment - */ - + */ + @Schema(name = "comment", description = "命名空间备注说明,描述命名空间的用途和包含的配置类型", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("comment") - public @Nullable String getComment() { + public String getComment() { return comment; } - public void setComment(@Nullable String comment) { + public void setComment(String comment) { this.comment = comment; } @@ -298,4 +297,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenClusterDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenClusterDTO.java index b4d9f9fa..b3a3330e 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenClusterDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenClusterDTO.java @@ -4,7 +4,6 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -20,22 +19,22 @@ */ @Schema(name = "OpenClusterDTO", description = "Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") public class OpenClusterDTO { - private @Nullable String dataChangeCreatedBy; + private String dataChangeCreatedBy; - private @Nullable String dataChangeLastModifiedBy; + private String dataChangeLastModifiedBy; - private @Nullable String dataChangeCreatedTime; + private String dataChangeCreatedTime; - private @Nullable String dataChangeLastModifiedTime; + private String dataChangeLastModifiedTime; - private @Nullable String name; + private String name; - private @Nullable String appId; + private String appId; - public OpenClusterDTO dataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { + public OpenClusterDTO dataChangeCreatedBy(String dataChangeCreatedBy) { this.dataChangeCreatedBy = dataChangeCreatedBy; return this; } @@ -43,19 +42,19 @@ public OpenClusterDTO dataChangeCreatedBy(@Nullable String dataChangeCreatedBy) /** * 集群创建者用户名,记录是谁创建了这个集群 * @return dataChangeCreatedBy - */ - + */ + @Schema(name = "dataChangeCreatedBy", description = "集群创建者用户名,记录是谁创建了这个集群", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedBy") - public @Nullable String getDataChangeCreatedBy() { + public String getDataChangeCreatedBy() { return dataChangeCreatedBy; } - public void setDataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { + public void setDataChangeCreatedBy(String dataChangeCreatedBy) { this.dataChangeCreatedBy = dataChangeCreatedBy; } - public OpenClusterDTO dataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { + public OpenClusterDTO dataChangeLastModifiedBy(String dataChangeLastModifiedBy) { this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; return this; } @@ -63,19 +62,19 @@ public OpenClusterDTO dataChangeLastModifiedBy(@Nullable String dataChangeLastMo /** * 集群最后修改者用户名,记录最后一次修改集群信息的用户 * @return dataChangeLastModifiedBy - */ - + */ + @Schema(name = "dataChangeLastModifiedBy", description = "集群最后修改者用户名,记录最后一次修改集群信息的用户", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedBy") - public @Nullable String getDataChangeLastModifiedBy() { + public String getDataChangeLastModifiedBy() { return dataChangeLastModifiedBy; } - public void setDataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { + public void setDataChangeLastModifiedBy(String dataChangeLastModifiedBy) { this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; } - public OpenClusterDTO dataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { + public OpenClusterDTO dataChangeCreatedTime(String dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; return this; } @@ -83,19 +82,19 @@ public OpenClusterDTO dataChangeCreatedTime(@Nullable String dataChangeCreatedTi /** * 集群创建时间,ISO 8601格式的时间戳 * @return dataChangeCreatedTime - */ - - @Schema(name = "dataChangeCreatedTime", description = "集群创建时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "dataChangeCreatedTime", example = "2025-09-29T12:34:56Z", description = "集群创建时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedTime") - public @Nullable String getDataChangeCreatedTime() { + public String getDataChangeCreatedTime() { return dataChangeCreatedTime; } - public void setDataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { + public void setDataChangeCreatedTime(String dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; } - public OpenClusterDTO dataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { + public OpenClusterDTO dataChangeLastModifiedTime(String dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; return this; } @@ -103,19 +102,19 @@ public OpenClusterDTO dataChangeLastModifiedTime(@Nullable String dataChangeLast /** * 集群最后修改时间,ISO 8601格式的时间戳 * @return dataChangeLastModifiedTime - */ - - @Schema(name = "dataChangeLastModifiedTime", description = "集群最后修改时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "dataChangeLastModifiedTime", example = "2025-09-29T12:34:56Z", description = "集群最后修改时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedTime") - public @Nullable String getDataChangeLastModifiedTime() { + public String getDataChangeLastModifiedTime() { return dataChangeLastModifiedTime; } - public void setDataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { + public void setDataChangeLastModifiedTime(String dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; } - public OpenClusterDTO name(@Nullable String name) { + public OpenClusterDTO name(String name) { this.name = name; return this; } @@ -123,19 +122,19 @@ public OpenClusterDTO name(@Nullable String name) { /** * 集群名称,在同一应用和环境下唯一标识一个集群 * @return name - */ - + */ + @Schema(name = "name", description = "集群名称,在同一应用和环境下唯一标识一个集群", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") - public @Nullable String getName() { + public String getName() { return name; } - public void setName(@Nullable String name) { + public void setName(String name) { this.name = name; } - public OpenClusterDTO appId(@Nullable String appId) { + public OpenClusterDTO appId(String appId) { this.appId = appId; return this; } @@ -143,15 +142,15 @@ public OpenClusterDTO appId(@Nullable String appId) { /** * 所属应用的唯一标识符 * @return appId - */ - + */ + @Schema(name = "appId", description = "所属应用的唯一标识符", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("appId") - public @Nullable String getAppId() { + public String getAppId() { return appId; } - public void setAppId(@Nullable String appId) { + public void setAppId(String appId) { this.appId = appId; } @@ -202,4 +201,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenCreateAppDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenCreateAppDTO.java index 71c37b34..7d566dd8 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 @@ -6,9 +6,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; -import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -24,17 +22,17 @@ */ @Schema(name = "OpenCreateAppDTO", description = "创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") public class OpenCreateAppDTO { - private @Nullable Boolean assignAppRoleToSelf; + private Boolean assignAppRoleToSelf; @Valid - private List admins = new ArrayList<>(); + private List admins; - private @Nullable OpenAppDTO app; + private OpenAppDTO app; - public OpenCreateAppDTO assignAppRoleToSelf(@Nullable Boolean assignAppRoleToSelf) { + public OpenCreateAppDTO assignAppRoleToSelf(Boolean assignAppRoleToSelf) { this.assignAppRoleToSelf = assignAppRoleToSelf; return this; } @@ -42,15 +40,15 @@ public OpenCreateAppDTO assignAppRoleToSelf(@Nullable Boolean assignAppRoleToSel /** * 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 * @return assignAppRoleToSelf - */ - + */ + @Schema(name = "assignAppRoleToSelf", description = "是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("assignAppRoleToSelf") - public @Nullable Boolean getAssignAppRoleToSelf() { + public Boolean getAssignAppRoleToSelf() { return assignAppRoleToSelf; } - public void setAssignAppRoleToSelf(@Nullable Boolean assignAppRoleToSelf) { + public void setAssignAppRoleToSelf(Boolean assignAppRoleToSelf) { this.assignAppRoleToSelf = assignAppRoleToSelf; } @@ -70,8 +68,8 @@ public OpenCreateAppDTO addAdminsItem(String adminsItem) { /** * 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 * @return admins - */ - + */ + @Schema(name = "admins", description = "应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("admins") public List getAdmins() { @@ -82,7 +80,7 @@ public void setAdmins(List admins) { this.admins = admins; } - public OpenCreateAppDTO app(@Nullable OpenAppDTO app) { + public OpenCreateAppDTO app(OpenAppDTO app) { this.app = app; return this; } @@ -90,15 +88,15 @@ public OpenCreateAppDTO app(@Nullable OpenAppDTO app) { /** * Get app * @return app - */ - @Valid + */ + @Valid @Schema(name = "app", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("app") - public @Nullable OpenAppDTO getApp() { + public OpenAppDTO getApp() { return app; } - public void setApp(@Nullable OpenAppDTO app) { + public void setApp(OpenAppDTO app) { this.app = app; } @@ -143,4 +141,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvClusterDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvClusterDTO.java index 48ff056f..8bd091e6 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvClusterDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvClusterDTO.java @@ -5,9 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; -import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -22,31 +20,31 @@ * OpenEnvClusterDTO */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") public class OpenEnvClusterDTO { - private @Nullable String env; + private String env; @Valid - private List clusters = new ArrayList<>(); + private List clusters; - public OpenEnvClusterDTO env(@Nullable String env) { + public OpenEnvClusterDTO env(String env) { this.env = env; return this; } /** - * + * 环境标识,例如 DEV、FAT、UAT、PROD * @return env - */ - - @Schema(name = "env", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "env", description = "环境标识,例如 DEV、FAT、UAT、PROD", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("env") - public @Nullable String getEnv() { + public String getEnv() { return env; } - public void setEnv(@Nullable String env) { + public void setEnv(String env) { this.env = env; } @@ -64,11 +62,11 @@ public OpenEnvClusterDTO addClustersItem(String clustersItem) { } /** - * + * 该环境下的集群名称列表 * @return clusters - */ - - @Schema(name = "clusters", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "clusters", description = "该环境下的集群名称列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("clusters") public List getClusters() { return clusters; @@ -117,4 +115,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/EnvClusterInfo.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvClusterInfo.java similarity index 60% rename from spring-boot2/src/main/java/com/apollo/openapi/server/model/EnvClusterInfo.java rename to spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvClusterInfo.java index 57838cab..76882271 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/EnvClusterInfo.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvClusterInfo.java @@ -2,13 +2,11 @@ import java.net.URI; import java.util.Objects; -import com.apollo.openapi.server.model.ClusterDTO; +import com.apollo.openapi.server.model.OpenClusterDTO; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; -import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -20,43 +18,43 @@ import javax.annotation.Generated; /** - * EnvClusterInfo + * OpenEnvClusterInfo */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class EnvClusterInfo { +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +public class OpenEnvClusterInfo { - private @Nullable String env; + private String env; @Valid - private List<@Valid ClusterDTO> clusters = new ArrayList<>(); + private List<@Valid OpenClusterDTO> clusters; - public EnvClusterInfo env(@Nullable String env) { + public OpenEnvClusterInfo env(String env) { this.env = env; return this; } /** - * + * 环境标识 * @return env - */ - - @Schema(name = "env", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "env", description = "环境标识", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("env") - public @Nullable String getEnv() { + public String getEnv() { return env; } - public void setEnv(@Nullable String env) { + public void setEnv(String env) { this.env = env; } - public EnvClusterInfo clusters(List<@Valid ClusterDTO> clusters) { + public OpenEnvClusterInfo clusters(List<@Valid OpenClusterDTO> clusters) { this.clusters = clusters; return this; } - public EnvClusterInfo addClustersItem(ClusterDTO clustersItem) { + public OpenEnvClusterInfo addClustersItem(OpenClusterDTO clustersItem) { if (this.clusters == null) { this.clusters = new ArrayList<>(); } @@ -65,17 +63,17 @@ public EnvClusterInfo addClustersItem(ClusterDTO clustersItem) { } /** - * + * 集群信息列表 * @return clusters - */ - @Valid - @Schema(name = "clusters", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + @Valid + @Schema(name = "clusters", description = "集群信息列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("clusters") - public List<@Valid ClusterDTO> getClusters() { + public List<@Valid OpenClusterDTO> getClusters() { return clusters; } - public void setClusters(List<@Valid ClusterDTO> clusters) { + public void setClusters(List<@Valid OpenClusterDTO> clusters) { this.clusters = clusters; } @@ -87,9 +85,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - EnvClusterInfo envClusterInfo = (EnvClusterInfo) o; - return Objects.equals(this.env, envClusterInfo.env) && - Objects.equals(this.clusters, envClusterInfo.clusters); + OpenEnvClusterInfo openEnvClusterInfo = (OpenEnvClusterInfo) o; + return Objects.equals(this.env, openEnvClusterInfo.env) && + Objects.equals(this.clusters, openEnvClusterInfo.clusters); } @Override @@ -100,7 +98,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class EnvClusterInfo {\n"); + sb.append("class OpenEnvClusterInfo {\n"); sb.append(" env: ").append(toIndentedString(env)).append("\n"); sb.append(" clusters: ").append(toIndentedString(clusters)).append("\n"); sb.append("}"); @@ -118,4 +116,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleDTO.java index 12495a4f..e0c1ee19 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleDTO.java @@ -6,9 +6,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; -import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -24,29 +22,29 @@ */ @Schema(name = "OpenGrayReleaseRuleDTO", description = "Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") public class OpenGrayReleaseRuleDTO { - private @Nullable String dataChangeCreatedBy; + private String dataChangeCreatedBy; - private @Nullable String dataChangeLastModifiedBy; + private String dataChangeLastModifiedBy; - private @Nullable String dataChangeCreatedTime; + private String dataChangeCreatedTime; - private @Nullable String dataChangeLastModifiedTime; + private String dataChangeLastModifiedTime; - private @Nullable String appId; + private String appId; - private @Nullable String clusterName; + private String clusterName; - private @Nullable String namespaceName; + private String namespaceName; - private @Nullable String branchName; + private String branchName; @Valid - private List<@Valid OpenGrayReleaseRuleItemDTO> ruleItems = new ArrayList<>(); + private List<@Valid OpenGrayReleaseRuleItemDTO> ruleItems; - public OpenGrayReleaseRuleDTO dataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { + public OpenGrayReleaseRuleDTO dataChangeCreatedBy(String dataChangeCreatedBy) { this.dataChangeCreatedBy = dataChangeCreatedBy; return this; } @@ -54,19 +52,19 @@ public OpenGrayReleaseRuleDTO dataChangeCreatedBy(@Nullable String dataChangeCre /** * 灰度规则创建者用户名,记录是谁创建了这个灰度发布规则 * @return dataChangeCreatedBy - */ - + */ + @Schema(name = "dataChangeCreatedBy", description = "灰度规则创建者用户名,记录是谁创建了这个灰度发布规则", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedBy") - public @Nullable String getDataChangeCreatedBy() { + public String getDataChangeCreatedBy() { return dataChangeCreatedBy; } - public void setDataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { + public void setDataChangeCreatedBy(String dataChangeCreatedBy) { this.dataChangeCreatedBy = dataChangeCreatedBy; } - public OpenGrayReleaseRuleDTO dataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { + public OpenGrayReleaseRuleDTO dataChangeLastModifiedBy(String dataChangeLastModifiedBy) { this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; return this; } @@ -74,19 +72,19 @@ public OpenGrayReleaseRuleDTO dataChangeLastModifiedBy(@Nullable String dataChan /** * 灰度规则最后修改者用户名,记录最后一次修改规则的用户 * @return dataChangeLastModifiedBy - */ - + */ + @Schema(name = "dataChangeLastModifiedBy", description = "灰度规则最后修改者用户名,记录最后一次修改规则的用户", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedBy") - public @Nullable String getDataChangeLastModifiedBy() { + public String getDataChangeLastModifiedBy() { return dataChangeLastModifiedBy; } - public void setDataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { + public void setDataChangeLastModifiedBy(String dataChangeLastModifiedBy) { this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; } - public OpenGrayReleaseRuleDTO dataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { + public OpenGrayReleaseRuleDTO dataChangeCreatedTime(String dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; return this; } @@ -94,19 +92,19 @@ public OpenGrayReleaseRuleDTO dataChangeCreatedTime(@Nullable String dataChangeC /** * 灰度规则创建时间,ISO 8601格式的时间戳 * @return dataChangeCreatedTime - */ - - @Schema(name = "dataChangeCreatedTime", description = "灰度规则创建时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "dataChangeCreatedTime", example = "2025-09-29T12:34:56Z", description = "灰度规则创建时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedTime") - public @Nullable String getDataChangeCreatedTime() { + public String getDataChangeCreatedTime() { return dataChangeCreatedTime; } - public void setDataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { + public void setDataChangeCreatedTime(String dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; } - public OpenGrayReleaseRuleDTO dataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { + public OpenGrayReleaseRuleDTO dataChangeLastModifiedTime(String dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; return this; } @@ -114,19 +112,19 @@ public OpenGrayReleaseRuleDTO dataChangeLastModifiedTime(@Nullable String dataCh /** * 灰度规则最后修改时间,ISO 8601格式的时间戳 * @return dataChangeLastModifiedTime - */ - - @Schema(name = "dataChangeLastModifiedTime", description = "灰度规则最后修改时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "dataChangeLastModifiedTime", example = "2025-09-29T12:34:56Z", description = "灰度规则最后修改时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedTime") - public @Nullable String getDataChangeLastModifiedTime() { + public String getDataChangeLastModifiedTime() { return dataChangeLastModifiedTime; } - public void setDataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { + public void setDataChangeLastModifiedTime(String dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; } - public OpenGrayReleaseRuleDTO appId(@Nullable String appId) { + public OpenGrayReleaseRuleDTO appId(String appId) { this.appId = appId; return this; } @@ -134,19 +132,19 @@ public OpenGrayReleaseRuleDTO appId(@Nullable String appId) { /** * 所属应用的唯一标识符 * @return appId - */ - + */ + @Schema(name = "appId", description = "所属应用的唯一标识符", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("appId") - public @Nullable String getAppId() { + public String getAppId() { return appId; } - public void setAppId(@Nullable String appId) { + public void setAppId(String appId) { this.appId = appId; } - public OpenGrayReleaseRuleDTO clusterName(@Nullable String clusterName) { + public OpenGrayReleaseRuleDTO clusterName(String clusterName) { this.clusterName = clusterName; return this; } @@ -154,19 +152,19 @@ public OpenGrayReleaseRuleDTO clusterName(@Nullable String clusterName) { /** * 所属集群的名称 * @return clusterName - */ - + */ + @Schema(name = "clusterName", description = "所属集群的名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("clusterName") - public @Nullable String getClusterName() { + public String getClusterName() { return clusterName; } - public void setClusterName(@Nullable String clusterName) { + public void setClusterName(String clusterName) { this.clusterName = clusterName; } - public OpenGrayReleaseRuleDTO namespaceName(@Nullable String namespaceName) { + public OpenGrayReleaseRuleDTO namespaceName(String namespaceName) { this.namespaceName = namespaceName; return this; } @@ -174,19 +172,19 @@ public OpenGrayReleaseRuleDTO namespaceName(@Nullable String namespaceName) { /** * 所属命名空间的名称 * @return namespaceName - */ - + */ + @Schema(name = "namespaceName", description = "所属命名空间的名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespaceName") - public @Nullable String getNamespaceName() { + public String getNamespaceName() { return namespaceName; } - public void setNamespaceName(@Nullable String namespaceName) { + public void setNamespaceName(String namespaceName) { this.namespaceName = namespaceName; } - public OpenGrayReleaseRuleDTO branchName(@Nullable String branchName) { + public OpenGrayReleaseRuleDTO branchName(String branchName) { this.branchName = branchName; return this; } @@ -194,15 +192,15 @@ public OpenGrayReleaseRuleDTO branchName(@Nullable String branchName) { /** * 灰度分支名称,标识灰度发布的分支 * @return branchName - */ - + */ + @Schema(name = "branchName", description = "灰度分支名称,标识灰度发布的分支", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("branchName") - public @Nullable String getBranchName() { + public String getBranchName() { return branchName; } - public void setBranchName(@Nullable String branchName) { + public void setBranchName(String branchName) { this.branchName = branchName; } @@ -222,8 +220,8 @@ public OpenGrayReleaseRuleDTO addRuleItemsItem(OpenGrayReleaseRuleItemDTO ruleIt /** * 灰度发布规则项列表,包含具体的灰度规则条件 * @return ruleItems - */ - @Valid + */ + @Valid @Schema(name = "ruleItems", description = "灰度发布规则项列表,包含具体的灰度规则条件", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("ruleItems") public List<@Valid OpenGrayReleaseRuleItemDTO> getRuleItems() { @@ -287,4 +285,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleItemDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleItemDTO.java index 0a8362cb..8d49b0b9 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleItemDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleItemDTO.java @@ -5,9 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; -import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -23,18 +21,18 @@ */ @Schema(name = "OpenGrayReleaseRuleItemDTO", description = "Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") public class OpenGrayReleaseRuleItemDTO { - private @Nullable String clientAppId; + private String clientAppId; @Valid - private List clientIpList = new ArrayList<>(); + private List clientIpList; @Valid - private List clientLabelList = new ArrayList<>(); + private List clientLabelList; - public OpenGrayReleaseRuleItemDTO clientAppId(@Nullable String clientAppId) { + public OpenGrayReleaseRuleItemDTO clientAppId(String clientAppId) { this.clientAppId = clientAppId; return this; } @@ -42,15 +40,15 @@ public OpenGrayReleaseRuleItemDTO clientAppId(@Nullable String clientAppId) { /** * 客户端应用ID,指定哪个应用可以获取灰度配置 * @return clientAppId - */ - + */ + @Schema(name = "clientAppId", description = "客户端应用ID,指定哪个应用可以获取灰度配置", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("clientAppId") - public @Nullable String getClientAppId() { + public String getClientAppId() { return clientAppId; } - public void setClientAppId(@Nullable String clientAppId) { + public void setClientAppId(String clientAppId) { this.clientAppId = clientAppId; } @@ -70,8 +68,8 @@ public OpenGrayReleaseRuleItemDTO addClientIpListItem(String clientIpListItem) { /** * 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 * @return clientIpList - */ - + */ + @Schema(name = "clientIpList", description = "客户端IP地址列表,指定哪些IP地址可以获取灰度配置", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("clientIpList") public List getClientIpList() { @@ -98,8 +96,8 @@ public OpenGrayReleaseRuleItemDTO addClientLabelListItem(String clientLabelListI /** * 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 * @return clientLabelList - */ - + */ + @Schema(name = "clientLabelList", description = "客户端标签列表,通过标签来识别可以获取灰度配置的客户端", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("clientLabelList") public List getClientLabelList() { @@ -151,4 +149,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstanceConfigDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstanceConfigDTO.java index 20c060b3..7b2e3c47 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstanceConfigDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstanceConfigDTO.java @@ -5,7 +5,6 @@ import com.apollo.openapi.server.model.OpenReleaseDTO; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -20,16 +19,16 @@ * OpenInstanceConfigDTO */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") public class OpenInstanceConfigDTO { - private @Nullable OpenReleaseDTO release; + private OpenReleaseDTO release; - private @Nullable String releaseDeliveryTime; + private String releaseDeliveryTime; - private @Nullable String dataChangeLastModifiedTime; + private String dataChangeLastModifiedTime; - public OpenInstanceConfigDTO release(@Nullable OpenReleaseDTO release) { + public OpenInstanceConfigDTO release(OpenReleaseDTO release) { this.release = release; return this; } @@ -37,55 +36,55 @@ public OpenInstanceConfigDTO release(@Nullable OpenReleaseDTO release) { /** * Get release * @return release - */ - @Valid + */ + @Valid @Schema(name = "release", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("release") - public @Nullable OpenReleaseDTO getRelease() { + public OpenReleaseDTO getRelease() { return release; } - public void setRelease(@Nullable OpenReleaseDTO release) { + public void setRelease(OpenReleaseDTO release) { this.release = release; } - public OpenInstanceConfigDTO releaseDeliveryTime(@Nullable String releaseDeliveryTime) { + public OpenInstanceConfigDTO releaseDeliveryTime(String releaseDeliveryTime) { this.releaseDeliveryTime = releaseDeliveryTime; return this; } /** - * + * 配置下发时间(ISO 8601) * @return releaseDeliveryTime - */ - - @Schema(name = "releaseDeliveryTime", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "releaseDeliveryTime", example = "2025-09-29T12:34:56Z", description = "配置下发时间(ISO 8601)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("releaseDeliveryTime") - public @Nullable String getReleaseDeliveryTime() { + public String getReleaseDeliveryTime() { return releaseDeliveryTime; } - public void setReleaseDeliveryTime(@Nullable String releaseDeliveryTime) { + public void setReleaseDeliveryTime(String releaseDeliveryTime) { this.releaseDeliveryTime = releaseDeliveryTime; } - public OpenInstanceConfigDTO dataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { + public OpenInstanceConfigDTO dataChangeLastModifiedTime(String dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; return this; } /** - * + * 最后修改时间(ISO 8601) * @return dataChangeLastModifiedTime - */ - - @Schema(name = "dataChangeLastModifiedTime", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "dataChangeLastModifiedTime", example = "2025-09-29T12:34:56Z", description = "最后修改时间(ISO 8601)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedTime") - public @Nullable String getDataChangeLastModifiedTime() { + public String getDataChangeLastModifiedTime() { return dataChangeLastModifiedTime; } - public void setDataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { + public void setDataChangeLastModifiedTime(String dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; } @@ -130,4 +129,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstanceDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstanceDTO.java index d2cb7c24..19bca9a0 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstanceDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstanceDTO.java @@ -6,9 +6,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; -import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -23,121 +21,121 @@ * OpenInstanceDTO */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") public class OpenInstanceDTO { - private @Nullable Long id; + private Long id; - private @Nullable String appId; + private String appId; - private @Nullable String clusterName; + private String clusterName; - private @Nullable String dataCenter; + private String dataCenter; - private @Nullable String ip; + private String ip; @Valid - private List<@Valid OpenInstanceConfigDTO> configs = new ArrayList<>(); + private List<@Valid OpenInstanceConfigDTO> configs; - private @Nullable String dataChangeCreatedTime; + private String dataChangeCreatedTime; - public OpenInstanceDTO id(@Nullable Long id) { + public OpenInstanceDTO id(Long id) { this.id = id; return this; } /** - * + * 实例ID * @return id - */ - - @Schema(name = "id", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "id", description = "实例ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") - public @Nullable Long getId() { + public Long getId() { return id; } - public void setId(@Nullable Long id) { + public void setId(Long id) { this.id = id; } - public OpenInstanceDTO appId(@Nullable String appId) { + public OpenInstanceDTO appId(String appId) { this.appId = appId; return this; } /** - * + * 实例所属应用ID * @return appId - */ - - @Schema(name = "appId", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "appId", description = "实例所属应用ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("appId") - public @Nullable String getAppId() { + public String getAppId() { return appId; } - public void setAppId(@Nullable String appId) { + public void setAppId(String appId) { this.appId = appId; } - public OpenInstanceDTO clusterName(@Nullable String clusterName) { + public OpenInstanceDTO clusterName(String clusterName) { this.clusterName = clusterName; return this; } /** - * + * 实例所属集群名称 * @return clusterName - */ - - @Schema(name = "clusterName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "clusterName", description = "实例所属集群名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("clusterName") - public @Nullable String getClusterName() { + public String getClusterName() { return clusterName; } - public void setClusterName(@Nullable String clusterName) { + public void setClusterName(String clusterName) { this.clusterName = clusterName; } - public OpenInstanceDTO dataCenter(@Nullable String dataCenter) { + public OpenInstanceDTO dataCenter(String dataCenter) { this.dataCenter = dataCenter; return this; } /** - * + * 数据中心/机房标识 * @return dataCenter - */ - - @Schema(name = "dataCenter", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "dataCenter", description = "数据中心/机房标识", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataCenter") - public @Nullable String getDataCenter() { + public String getDataCenter() { return dataCenter; } - public void setDataCenter(@Nullable String dataCenter) { + public void setDataCenter(String dataCenter) { this.dataCenter = dataCenter; } - public OpenInstanceDTO ip(@Nullable String ip) { + public OpenInstanceDTO ip(String ip) { this.ip = ip; return this; } /** - * + * 实例IP地址 * @return ip - */ - - @Schema(name = "ip", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "ip", description = "实例IP地址", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("ip") - public @Nullable String getIp() { + public String getIp() { return ip; } - public void setIp(@Nullable String ip) { + public void setIp(String ip) { this.ip = ip; } @@ -155,11 +153,11 @@ public OpenInstanceDTO addConfigsItem(OpenInstanceConfigDTO configsItem) { } /** - * + * 实例当前生效的配置列表 * @return configs - */ - @Valid - @Schema(name = "configs", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + @Valid + @Schema(name = "configs", description = "实例当前生效的配置列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("configs") public List<@Valid OpenInstanceConfigDTO> getConfigs() { return configs; @@ -169,23 +167,23 @@ public void setConfigs(List<@Valid OpenInstanceConfigDTO> configs) { this.configs = configs; } - public OpenInstanceDTO dataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { + public OpenInstanceDTO dataChangeCreatedTime(String dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; return this; } /** - * + * 数据创建时间(ISO 8601) * @return dataChangeCreatedTime - */ - - @Schema(name = "dataChangeCreatedTime", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "dataChangeCreatedTime", example = "2025-09-29T12:34:56Z", description = "数据创建时间(ISO 8601)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedTime") - public @Nullable String getDataChangeCreatedTime() { + public String getDataChangeCreatedTime() { return dataChangeCreatedTime; } - public void setDataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { + public void setDataChangeCreatedTime(String dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; } @@ -238,4 +236,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemChangeSets.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemChangeSets.java new file mode 100644 index 00000000..87bec2f2 --- /dev/null +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemChangeSets.java @@ -0,0 +1,304 @@ +package com.apollo.openapi.server.model; + +import java.net.URI; +import java.util.Objects; +import com.apollo.openapi.server.model.OpenItemDTO; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * OpenItemChangeSets + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +public class OpenItemChangeSets { + + private String dataChangeCreatedBy; + + private String dataChangeLastModifiedBy; + + private String dataChangeCreatedByDisplayName; + + private String dataChangeLastModifiedByDisplayName; + + private String dataChangeCreatedTime; + + private String dataChangeLastModifiedTime; + + @Valid + private List<@Valid OpenItemDTO> createItems = null; + + @Valid + private List<@Valid OpenItemDTO> updateItems = null; + + @Valid + private List<@Valid OpenItemDTO> deleteItems = null; + + public OpenItemChangeSets dataChangeCreatedBy(String dataChangeCreatedBy) { + this.dataChangeCreatedBy = dataChangeCreatedBy; + return this; + } + + /** + * 变更集合创建者用户名 + * @return dataChangeCreatedBy + */ + + @Schema(name = "dataChangeCreatedBy", description = "变更集合创建者用户名", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("dataChangeCreatedBy") + public String getDataChangeCreatedBy() { + return dataChangeCreatedBy; + } + + public void setDataChangeCreatedBy(String dataChangeCreatedBy) { + this.dataChangeCreatedBy = dataChangeCreatedBy; + } + + public OpenItemChangeSets dataChangeLastModifiedBy(String dataChangeLastModifiedBy) { + this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; + return this; + } + + /** + * 变更集合最后修改者用户名 + * @return dataChangeLastModifiedBy + */ + + @Schema(name = "dataChangeLastModifiedBy", description = "变更集合最后修改者用户名", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("dataChangeLastModifiedBy") + public String getDataChangeLastModifiedBy() { + return dataChangeLastModifiedBy; + } + + public void setDataChangeLastModifiedBy(String dataChangeLastModifiedBy) { + this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; + } + + public OpenItemChangeSets dataChangeCreatedByDisplayName(String dataChangeCreatedByDisplayName) { + this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; + return this; + } + + /** + * 创建者显示名 + * @return dataChangeCreatedByDisplayName + */ + + @Schema(name = "dataChangeCreatedByDisplayName", description = "创建者显示名", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("dataChangeCreatedByDisplayName") + public String getDataChangeCreatedByDisplayName() { + return dataChangeCreatedByDisplayName; + } + + public void setDataChangeCreatedByDisplayName(String dataChangeCreatedByDisplayName) { + this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; + } + + public OpenItemChangeSets dataChangeLastModifiedByDisplayName(String dataChangeLastModifiedByDisplayName) { + this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; + return this; + } + + /** + * 最后修改者显示名 + * @return dataChangeLastModifiedByDisplayName + */ + + @Schema(name = "dataChangeLastModifiedByDisplayName", description = "最后修改者显示名", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("dataChangeLastModifiedByDisplayName") + public String getDataChangeLastModifiedByDisplayName() { + return dataChangeLastModifiedByDisplayName; + } + + public void setDataChangeLastModifiedByDisplayName(String dataChangeLastModifiedByDisplayName) { + this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; + } + + public OpenItemChangeSets dataChangeCreatedTime(String dataChangeCreatedTime) { + this.dataChangeCreatedTime = dataChangeCreatedTime; + return this; + } + + /** + * 变更集合创建时间(ISO 8601) + * @return dataChangeCreatedTime + */ + + @Schema(name = "dataChangeCreatedTime", example = "2025-09-29T12:34:56Z", description = "变更集合创建时间(ISO 8601)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("dataChangeCreatedTime") + public String getDataChangeCreatedTime() { + return dataChangeCreatedTime; + } + + public void setDataChangeCreatedTime(String dataChangeCreatedTime) { + this.dataChangeCreatedTime = dataChangeCreatedTime; + } + + public OpenItemChangeSets dataChangeLastModifiedTime(String dataChangeLastModifiedTime) { + this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; + return this; + } + + /** + * 变更集合最后修改时间(ISO 8601) + * @return dataChangeLastModifiedTime + */ + + @Schema(name = "dataChangeLastModifiedTime", example = "2025-09-29T12:34:56Z", description = "变更集合最后修改时间(ISO 8601)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("dataChangeLastModifiedTime") + public String getDataChangeLastModifiedTime() { + return dataChangeLastModifiedTime; + } + + public void setDataChangeLastModifiedTime(String dataChangeLastModifiedTime) { + this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; + } + + public OpenItemChangeSets createItems(List<@Valid OpenItemDTO> createItems) { + this.createItems = createItems; + return this; + } + + public OpenItemChangeSets addCreateItemsItem(OpenItemDTO createItemsItem) { + if (this.createItems == null) { + this.createItems = null; + } + this.createItems.add(createItemsItem); + return this; + } + + /** + * 待创建的配置项列表 + * @return createItems + */ + @Valid + @Schema(name = "createItems", description = "待创建的配置项列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("createItems") + public List<@Valid OpenItemDTO> getCreateItems() { + return createItems; + } + + public void setCreateItems(List<@Valid OpenItemDTO> createItems) { + this.createItems = createItems; + } + + public OpenItemChangeSets updateItems(List<@Valid OpenItemDTO> updateItems) { + this.updateItems = updateItems; + return this; + } + + public OpenItemChangeSets addUpdateItemsItem(OpenItemDTO updateItemsItem) { + if (this.updateItems == null) { + this.updateItems = null; + } + this.updateItems.add(updateItemsItem); + return this; + } + + /** + * 待更新的配置项列表 + * @return updateItems + */ + @Valid + @Schema(name = "updateItems", description = "待更新的配置项列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("updateItems") + public List<@Valid OpenItemDTO> getUpdateItems() { + return updateItems; + } + + public void setUpdateItems(List<@Valid OpenItemDTO> updateItems) { + this.updateItems = updateItems; + } + + public OpenItemChangeSets deleteItems(List<@Valid OpenItemDTO> deleteItems) { + this.deleteItems = deleteItems; + return this; + } + + public OpenItemChangeSets addDeleteItemsItem(OpenItemDTO deleteItemsItem) { + if (this.deleteItems == null) { + this.deleteItems = null; + } + this.deleteItems.add(deleteItemsItem); + return this; + } + + /** + * 待删除的配置项列表 + * @return deleteItems + */ + @Valid + @Schema(name = "deleteItems", description = "待删除的配置项列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("deleteItems") + public List<@Valid OpenItemDTO> getDeleteItems() { + return deleteItems; + } + + public void setDeleteItems(List<@Valid OpenItemDTO> deleteItems) { + this.deleteItems = deleteItems; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenItemChangeSets openItemChangeSets = (OpenItemChangeSets) o; + return Objects.equals(this.dataChangeCreatedBy, openItemChangeSets.dataChangeCreatedBy) && + Objects.equals(this.dataChangeLastModifiedBy, openItemChangeSets.dataChangeLastModifiedBy) && + Objects.equals(this.dataChangeCreatedByDisplayName, openItemChangeSets.dataChangeCreatedByDisplayName) && + Objects.equals(this.dataChangeLastModifiedByDisplayName, openItemChangeSets.dataChangeLastModifiedByDisplayName) && + Objects.equals(this.dataChangeCreatedTime, openItemChangeSets.dataChangeCreatedTime) && + Objects.equals(this.dataChangeLastModifiedTime, openItemChangeSets.dataChangeLastModifiedTime) && + Objects.equals(this.createItems, openItemChangeSets.createItems) && + Objects.equals(this.updateItems, openItemChangeSets.updateItems) && + Objects.equals(this.deleteItems, openItemChangeSets.deleteItems); + } + + @Override + public int hashCode() { + return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, createItems, updateItems, deleteItems); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenItemChangeSets {\n"); + sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); + sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).append("\n"); + sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); + sb.append(" dataChangeLastModifiedByDisplayName: ").append(toIndentedString(dataChangeLastModifiedByDisplayName)).append("\n"); + sb.append(" dataChangeCreatedTime: ").append(toIndentedString(dataChangeCreatedTime)).append("\n"); + sb.append(" dataChangeLastModifiedTime: ").append(toIndentedString(dataChangeLastModifiedTime)).append("\n"); + sb.append(" createItems: ").append(toIndentedString(createItems)).append("\n"); + sb.append(" updateItems: ").append(toIndentedString(updateItems)).append("\n"); + sb.append(" deleteItems: ").append(toIndentedString(deleteItems)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDTO.java index 825828ad..8e6b2720 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDTO.java @@ -4,7 +4,6 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -20,26 +19,26 @@ */ @Schema(name = "OpenItemDTO", description = "Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") public class OpenItemDTO { - private @Nullable String dataChangeCreatedBy; + private String dataChangeCreatedBy; - private @Nullable String dataChangeLastModifiedBy; + private String dataChangeLastModifiedBy; - private @Nullable String dataChangeCreatedTime; + private String dataChangeCreatedTime; - private @Nullable String dataChangeLastModifiedTime; + private String dataChangeLastModifiedTime; - private @Nullable String key; + private String key; - private @Nullable Integer type; + private Integer type; - private @Nullable String value; + private String value; - private @Nullable String comment; + private String comment; - public OpenItemDTO dataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { + public OpenItemDTO dataChangeCreatedBy(String dataChangeCreatedBy) { this.dataChangeCreatedBy = dataChangeCreatedBy; return this; } @@ -47,19 +46,19 @@ public OpenItemDTO dataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { /** * 配置项创建者用户名,记录是谁创建了这个配置项 * @return dataChangeCreatedBy - */ - + */ + @Schema(name = "dataChangeCreatedBy", description = "配置项创建者用户名,记录是谁创建了这个配置项", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedBy") - public @Nullable String getDataChangeCreatedBy() { + public String getDataChangeCreatedBy() { return dataChangeCreatedBy; } - public void setDataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { + public void setDataChangeCreatedBy(String dataChangeCreatedBy) { this.dataChangeCreatedBy = dataChangeCreatedBy; } - public OpenItemDTO dataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { + public OpenItemDTO dataChangeLastModifiedBy(String dataChangeLastModifiedBy) { this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; return this; } @@ -67,19 +66,19 @@ public OpenItemDTO dataChangeLastModifiedBy(@Nullable String dataChangeLastModif /** * 配置项最后修改者用户名,记录最后一次修改配置的用户 * @return dataChangeLastModifiedBy - */ - + */ + @Schema(name = "dataChangeLastModifiedBy", description = "配置项最后修改者用户名,记录最后一次修改配置的用户", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedBy") - public @Nullable String getDataChangeLastModifiedBy() { + public String getDataChangeLastModifiedBy() { return dataChangeLastModifiedBy; } - public void setDataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { + public void setDataChangeLastModifiedBy(String dataChangeLastModifiedBy) { this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; } - public OpenItemDTO dataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { + public OpenItemDTO dataChangeCreatedTime(String dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; return this; } @@ -87,19 +86,19 @@ public OpenItemDTO dataChangeCreatedTime(@Nullable String dataChangeCreatedTime) /** * 配置项创建时间,ISO 8601格式的时间戳 * @return dataChangeCreatedTime - */ - - @Schema(name = "dataChangeCreatedTime", description = "配置项创建时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "dataChangeCreatedTime", example = "2025-09-29T12:34:56Z", description = "配置项创建时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedTime") - public @Nullable String getDataChangeCreatedTime() { + public String getDataChangeCreatedTime() { return dataChangeCreatedTime; } - public void setDataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { + public void setDataChangeCreatedTime(String dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; } - public OpenItemDTO dataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { + public OpenItemDTO dataChangeLastModifiedTime(String dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; return this; } @@ -107,19 +106,19 @@ public OpenItemDTO dataChangeLastModifiedTime(@Nullable String dataChangeLastMod /** * 配置项最后修改时间,ISO 8601格式的时间戳 * @return dataChangeLastModifiedTime - */ - - @Schema(name = "dataChangeLastModifiedTime", description = "配置项最后修改时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "dataChangeLastModifiedTime", example = "2025-09-29T12:34:56Z", description = "配置项最后修改时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedTime") - public @Nullable String getDataChangeLastModifiedTime() { + public String getDataChangeLastModifiedTime() { return dataChangeLastModifiedTime; } - public void setDataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { + public void setDataChangeLastModifiedTime(String dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; } - public OpenItemDTO key(@Nullable String key) { + public OpenItemDTO key(String key) { this.key = key; return this; } @@ -127,19 +126,19 @@ public OpenItemDTO key(@Nullable String key) { /** * 配置项的键名,在同一命名空间内唯一标识一个配置项 * @return key - */ - + */ + @Schema(name = "key", description = "配置项的键名,在同一命名空间内唯一标识一个配置项", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("key") - public @Nullable String getKey() { + public String getKey() { return key; } - public void setKey(@Nullable String key) { + public void setKey(String key) { this.key = key; } - public OpenItemDTO type(@Nullable Integer type) { + public OpenItemDTO type(Integer type) { this.type = type; return this; } @@ -147,19 +146,19 @@ public OpenItemDTO type(@Nullable Integer type) { /** * 配置项类型,0表示普通配置项,1表示文件类型配置项 * @return type - */ - + */ + @Schema(name = "type", description = "配置项类型,0表示普通配置项,1表示文件类型配置项", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("type") - public @Nullable Integer getType() { + public Integer getType() { return type; } - public void setType(@Nullable Integer type) { + public void setType(Integer type) { this.type = type; } - public OpenItemDTO value(@Nullable String value) { + public OpenItemDTO value(String value) { this.value = value; return this; } @@ -167,19 +166,19 @@ public OpenItemDTO value(@Nullable String value) { /** * 配置项的值,可以是字符串、数字、JSON等格式 * @return value - */ - + */ + @Schema(name = "value", description = "配置项的值,可以是字符串、数字、JSON等格式", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("value") - public @Nullable String getValue() { + public String getValue() { return value; } - public void setValue(@Nullable String value) { + public void setValue(String value) { this.value = value; } - public OpenItemDTO comment(@Nullable String comment) { + public OpenItemDTO comment(String comment) { this.comment = comment; return this; } @@ -187,15 +186,15 @@ public OpenItemDTO comment(@Nullable String comment) { /** * 配置项的注释说明,用于描述配置项的用途和含义 * @return comment - */ - + */ + @Schema(name = "comment", description = "配置项的注释说明,用于描述配置项的用途和含义", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("comment") - public @Nullable String getComment() { + public String getComment() { return comment; } - public void setComment(@Nullable String comment) { + public void setComment(String comment) { this.comment = comment; } @@ -250,4 +249,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/ListItemDiffs.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDiffs.java similarity index 60% rename from spring-boot2/src/main/java/com/apollo/openapi/server/model/ListItemDiffs.java rename to spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDiffs.java index 85e84a03..e5f98e51 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/ListItemDiffs.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDiffs.java @@ -2,11 +2,10 @@ import java.net.URI; import java.util.Objects; -import com.apollo.openapi.server.model.ItemChangeSets; -import com.apollo.openapi.server.model.NamespaceIdentifier; +import com.apollo.openapi.server.model.OpenItemChangeSets; +import com.apollo.openapi.server.model.OpenNamespaceIdentifier; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,19 +17,19 @@ import javax.annotation.Generated; /** - * ListItemDiffs + * OpenItemDiffs */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class ListItemDiffs { +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +public class OpenItemDiffs { - private @Nullable NamespaceIdentifier namespace; + private OpenNamespaceIdentifier namespace; - private @Nullable ItemChangeSets diffs; + private OpenItemChangeSets diffs; - private @Nullable String extInfo; + private String extInfo; - public ListItemDiffs namespace(@Nullable NamespaceIdentifier namespace) { + public OpenItemDiffs namespace(OpenNamespaceIdentifier namespace) { this.namespace = namespace; return this; } @@ -38,19 +37,19 @@ public ListItemDiffs namespace(@Nullable NamespaceIdentifier namespace) { /** * Get namespace * @return namespace - */ - @Valid + */ + @Valid @Schema(name = "namespace", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace") - public @Nullable NamespaceIdentifier getNamespace() { + public OpenNamespaceIdentifier getNamespace() { return namespace; } - public void setNamespace(@Nullable NamespaceIdentifier namespace) { + public void setNamespace(OpenNamespaceIdentifier namespace) { this.namespace = namespace; } - public ListItemDiffs diffs(@Nullable ItemChangeSets diffs) { + public OpenItemDiffs diffs(OpenItemChangeSets diffs) { this.diffs = diffs; return this; } @@ -58,35 +57,35 @@ public ListItemDiffs diffs(@Nullable ItemChangeSets diffs) { /** * Get diffs * @return diffs - */ - @Valid + */ + @Valid @Schema(name = "diffs", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("diffs") - public @Nullable ItemChangeSets getDiffs() { + public OpenItemChangeSets getDiffs() { return diffs; } - public void setDiffs(@Nullable ItemChangeSets diffs) { + public void setDiffs(OpenItemChangeSets diffs) { this.diffs = diffs; } - public ListItemDiffs extInfo(@Nullable String extInfo) { + public OpenItemDiffs extInfo(String extInfo) { this.extInfo = extInfo; return this; } /** - * + * 扩展信息 * @return extInfo - */ - - @Schema(name = "extInfo", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "extInfo", description = "扩展信息", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("extInfo") - public @Nullable String getExtInfo() { + public String getExtInfo() { return extInfo; } - public void setExtInfo(@Nullable String extInfo) { + public void setExtInfo(String extInfo) { this.extInfo = extInfo; } @@ -98,10 +97,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ListItemDiffs listItemDiffs = (ListItemDiffs) o; - return Objects.equals(this.namespace, listItemDiffs.namespace) && - Objects.equals(this.diffs, listItemDiffs.diffs) && - Objects.equals(this.extInfo, listItemDiffs.extInfo); + OpenItemDiffs openItemDiffs = (OpenItemDiffs) o; + return Objects.equals(this.namespace, openItemDiffs.namespace) && + Objects.equals(this.diffs, openItemDiffs.diffs) && + Objects.equals(this.extInfo, openItemDiffs.extInfo); } @Override @@ -112,7 +111,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ListItemDiffs {\n"); + sb.append("class OpenItemDiffs {\n"); sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); sb.append(" diffs: ").append(toIndentedString(diffs)).append("\n"); sb.append(" extInfo: ").append(toIndentedString(extInfo)).append("\n"); @@ -131,4 +130,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceDTO.java index b1105938..d9edef01 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceDTO.java @@ -6,9 +6,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; -import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -24,33 +22,33 @@ */ @Schema(name = "OpenNamespaceDTO", description = "Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") public class OpenNamespaceDTO { - private @Nullable String dataChangeCreatedBy; + private String dataChangeCreatedBy; - private @Nullable String dataChangeLastModifiedBy; + private String dataChangeLastModifiedBy; - private @Nullable String dataChangeCreatedTime; + private String dataChangeCreatedTime; - private @Nullable String dataChangeLastModifiedTime; + private String dataChangeLastModifiedTime; - private @Nullable String appId; + private String appId; - private @Nullable String clusterName; + private String clusterName; - private @Nullable String namespaceName; + private String namespaceName; - private @Nullable String comment; + private String comment; - private @Nullable String format; + private String format; - private @Nullable Boolean isPublic; + private Boolean isPublic; @Valid - private List<@Valid OpenItemDTO> items = new ArrayList<>(); + private List<@Valid OpenItemDTO> items; - public OpenNamespaceDTO dataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { + public OpenNamespaceDTO dataChangeCreatedBy(String dataChangeCreatedBy) { this.dataChangeCreatedBy = dataChangeCreatedBy; return this; } @@ -58,19 +56,19 @@ public OpenNamespaceDTO dataChangeCreatedBy(@Nullable String dataChangeCreatedBy /** * 命名空间创建者用户名,记录是谁创建了这个命名空间 * @return dataChangeCreatedBy - */ - + */ + @Schema(name = "dataChangeCreatedBy", description = "命名空间创建者用户名,记录是谁创建了这个命名空间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedBy") - public @Nullable String getDataChangeCreatedBy() { + public String getDataChangeCreatedBy() { return dataChangeCreatedBy; } - public void setDataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { + public void setDataChangeCreatedBy(String dataChangeCreatedBy) { this.dataChangeCreatedBy = dataChangeCreatedBy; } - public OpenNamespaceDTO dataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { + public OpenNamespaceDTO dataChangeLastModifiedBy(String dataChangeLastModifiedBy) { this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; return this; } @@ -78,19 +76,19 @@ public OpenNamespaceDTO dataChangeLastModifiedBy(@Nullable String dataChangeLast /** * 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 * @return dataChangeLastModifiedBy - */ - + */ + @Schema(name = "dataChangeLastModifiedBy", description = "命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedBy") - public @Nullable String getDataChangeLastModifiedBy() { + public String getDataChangeLastModifiedBy() { return dataChangeLastModifiedBy; } - public void setDataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { + public void setDataChangeLastModifiedBy(String dataChangeLastModifiedBy) { this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; } - public OpenNamespaceDTO dataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { + public OpenNamespaceDTO dataChangeCreatedTime(String dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; return this; } @@ -98,19 +96,19 @@ public OpenNamespaceDTO dataChangeCreatedTime(@Nullable String dataChangeCreated /** * 命名空间创建时间,ISO 8601格式的时间戳 * @return dataChangeCreatedTime - */ - - @Schema(name = "dataChangeCreatedTime", description = "命名空间创建时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "dataChangeCreatedTime", example = "2025-09-29T12:34:56Z", description = "命名空间创建时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedTime") - public @Nullable String getDataChangeCreatedTime() { + public String getDataChangeCreatedTime() { return dataChangeCreatedTime; } - public void setDataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { + public void setDataChangeCreatedTime(String dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; } - public OpenNamespaceDTO dataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { + public OpenNamespaceDTO dataChangeLastModifiedTime(String dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; return this; } @@ -118,19 +116,19 @@ public OpenNamespaceDTO dataChangeLastModifiedTime(@Nullable String dataChangeLa /** * 命名空间最后修改时间,ISO 8601格式的时间戳 * @return dataChangeLastModifiedTime - */ - - @Schema(name = "dataChangeLastModifiedTime", description = "命名空间最后修改时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "dataChangeLastModifiedTime", example = "2025-09-29T12:34:56Z", description = "命名空间最后修改时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedTime") - public @Nullable String getDataChangeLastModifiedTime() { + public String getDataChangeLastModifiedTime() { return dataChangeLastModifiedTime; } - public void setDataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { + public void setDataChangeLastModifiedTime(String dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; } - public OpenNamespaceDTO appId(@Nullable String appId) { + public OpenNamespaceDTO appId(String appId) { this.appId = appId; return this; } @@ -138,19 +136,19 @@ public OpenNamespaceDTO appId(@Nullable String appId) { /** * 所属应用的唯一标识符 * @return appId - */ - + */ + @Schema(name = "appId", description = "所属应用的唯一标识符", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("appId") - public @Nullable String getAppId() { + public String getAppId() { return appId; } - public void setAppId(@Nullable String appId) { + public void setAppId(String appId) { this.appId = appId; } - public OpenNamespaceDTO clusterName(@Nullable String clusterName) { + public OpenNamespaceDTO clusterName(String clusterName) { this.clusterName = clusterName; return this; } @@ -158,19 +156,19 @@ public OpenNamespaceDTO clusterName(@Nullable String clusterName) { /** * 所属集群的名称 * @return clusterName - */ - + */ + @Schema(name = "clusterName", description = "所属集群的名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("clusterName") - public @Nullable String getClusterName() { + public String getClusterName() { return clusterName; } - public void setClusterName(@Nullable String clusterName) { + public void setClusterName(String clusterName) { this.clusterName = clusterName; } - public OpenNamespaceDTO namespaceName(@Nullable String namespaceName) { + public OpenNamespaceDTO namespaceName(String namespaceName) { this.namespaceName = namespaceName; return this; } @@ -178,19 +176,19 @@ public OpenNamespaceDTO namespaceName(@Nullable String namespaceName) { /** * 命名空间名称,在同一应用和集群下唯一标识一个命名空间 * @return namespaceName - */ - + */ + @Schema(name = "namespaceName", description = "命名空间名称,在同一应用和集群下唯一标识一个命名空间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespaceName") - public @Nullable String getNamespaceName() { + public String getNamespaceName() { return namespaceName; } - public void setNamespaceName(@Nullable String namespaceName) { + public void setNamespaceName(String namespaceName) { this.namespaceName = namespaceName; } - public OpenNamespaceDTO comment(@Nullable String comment) { + public OpenNamespaceDTO comment(String comment) { this.comment = comment; return this; } @@ -198,19 +196,19 @@ public OpenNamespaceDTO comment(@Nullable String comment) { /** * 命名空间备注说明,描述命名空间的用途 * @return comment - */ - + */ + @Schema(name = "comment", description = "命名空间备注说明,描述命名空间的用途", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("comment") - public @Nullable String getComment() { + public String getComment() { return comment; } - public void setComment(@Nullable String comment) { + public void setComment(String comment) { this.comment = comment; } - public OpenNamespaceDTO format(@Nullable String format) { + public OpenNamespaceDTO format(String format) { this.format = format; return this; } @@ -218,19 +216,19 @@ public OpenNamespaceDTO format(@Nullable String format) { /** * 命名空间格式类型,如properties、xml、json、yml等 * @return format - */ - + */ + @Schema(name = "format", description = "命名空间格式类型,如properties、xml、json、yml等", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("format") - public @Nullable String getFormat() { + public String getFormat() { return format; } - public void setFormat(@Nullable String format) { + public void setFormat(String format) { this.format = format; } - public OpenNamespaceDTO isPublic(@Nullable Boolean isPublic) { + public OpenNamespaceDTO isPublic(Boolean isPublic) { this.isPublic = isPublic; return this; } @@ -238,15 +236,15 @@ public OpenNamespaceDTO isPublic(@Nullable Boolean isPublic) { /** * 是否为公共命名空间,公共命名空间可以被其他应用关联使用 * @return isPublic - */ - + */ + @Schema(name = "isPublic", description = "是否为公共命名空间,公共命名空间可以被其他应用关联使用", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("isPublic") - public @Nullable Boolean getIsPublic() { + public Boolean getIsPublic() { return isPublic; } - public void setIsPublic(@Nullable Boolean isPublic) { + public void setIsPublic(Boolean isPublic) { this.isPublic = isPublic; } @@ -266,8 +264,8 @@ public OpenNamespaceDTO addItemsItem(OpenItemDTO itemsItem) { /** * 命名空间包含的配置项列表 * @return items - */ - @Valid + */ + @Valid @Schema(name = "items", description = "命名空间包含的配置项列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("items") public List<@Valid OpenItemDTO> getItems() { @@ -335,4 +333,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceIdentifier.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceIdentifier.java similarity index 54% rename from spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceIdentifier.java rename to spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceIdentifier.java index 567a787b..94502b4c 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceIdentifier.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceIdentifier.java @@ -4,7 +4,6 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -16,97 +15,97 @@ import javax.annotation.Generated; /** - * NamespaceIdentifier + * OpenNamespaceIdentifier */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class NamespaceIdentifier { +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +public class OpenNamespaceIdentifier { - private @Nullable String appId; + private String appId; - private @Nullable String env; + private String env; - private @Nullable String clusterName; + private String clusterName; - private @Nullable String namespaceName; + private String namespaceName; - public NamespaceIdentifier appId(@Nullable String appId) { + public OpenNamespaceIdentifier appId(String appId) { this.appId = appId; return this; } /** - * + * 应用唯一标识 * @return appId - */ - - @Schema(name = "appId", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "appId", description = "应用唯一标识", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("appId") - public @Nullable String getAppId() { + public String getAppId() { return appId; } - public void setAppId(@Nullable String appId) { + public void setAppId(String appId) { this.appId = appId; } - public NamespaceIdentifier env(@Nullable String env) { + public OpenNamespaceIdentifier env(String env) { this.env = env; return this; } /** - * + * 环境标识 * @return env - */ - - @Schema(name = "env", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "env", description = "环境标识", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("env") - public @Nullable String getEnv() { + public String getEnv() { return env; } - public void setEnv(@Nullable String env) { + public void setEnv(String env) { this.env = env; } - public NamespaceIdentifier clusterName(@Nullable String clusterName) { + public OpenNamespaceIdentifier clusterName(String clusterName) { this.clusterName = clusterName; return this; } /** - * + * 集群名称 * @return clusterName - */ - - @Schema(name = "clusterName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "clusterName", description = "集群名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("clusterName") - public @Nullable String getClusterName() { + public String getClusterName() { return clusterName; } - public void setClusterName(@Nullable String clusterName) { + public void setClusterName(String clusterName) { this.clusterName = clusterName; } - public NamespaceIdentifier namespaceName(@Nullable String namespaceName) { + public OpenNamespaceIdentifier namespaceName(String namespaceName) { this.namespaceName = namespaceName; return this; } /** - * + * 命名空间名称 * @return namespaceName - */ - - @Schema(name = "namespaceName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "namespaceName", description = "命名空间名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespaceName") - public @Nullable String getNamespaceName() { + public String getNamespaceName() { return namespaceName; } - public void setNamespaceName(@Nullable String namespaceName) { + public void setNamespaceName(String namespaceName) { this.namespaceName = namespaceName; } @@ -118,11 +117,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NamespaceIdentifier namespaceIdentifier = (NamespaceIdentifier) o; - return Objects.equals(this.appId, namespaceIdentifier.appId) && - Objects.equals(this.env, namespaceIdentifier.env) && - Objects.equals(this.clusterName, namespaceIdentifier.clusterName) && - Objects.equals(this.namespaceName, namespaceIdentifier.namespaceName); + OpenNamespaceIdentifier openNamespaceIdentifier = (OpenNamespaceIdentifier) o; + return Objects.equals(this.appId, openNamespaceIdentifier.appId) && + Objects.equals(this.env, openNamespaceIdentifier.env) && + Objects.equals(this.clusterName, openNamespaceIdentifier.clusterName) && + Objects.equals(this.namespaceName, openNamespaceIdentifier.namespaceName); } @Override @@ -133,7 +132,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class NamespaceIdentifier {\n"); + sb.append("class OpenNamespaceIdentifier {\n"); sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); sb.append(" env: ").append(toIndentedString(env)).append("\n"); sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); @@ -153,4 +152,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceLockDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceLockDTO.java index cbb263c3..c94bac89 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceLockDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceLockDTO.java @@ -4,7 +4,6 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -20,16 +19,16 @@ */ @Schema(name = "OpenNamespaceLockDTO", description = "Apollo命名空间锁状态数据传输对象") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") public class OpenNamespaceLockDTO { - private @Nullable String namespaceName; + private String namespaceName; - private @Nullable Boolean isLocked; + private Boolean isLocked; - private @Nullable String lockedBy; + private String lockedBy; - public OpenNamespaceLockDTO namespaceName(@Nullable String namespaceName) { + public OpenNamespaceLockDTO namespaceName(String namespaceName) { this.namespaceName = namespaceName; return this; } @@ -37,19 +36,19 @@ public OpenNamespaceLockDTO namespaceName(@Nullable String namespaceName) { /** * 命名空间名称 * @return namespaceName - */ - + */ + @Schema(name = "namespaceName", description = "命名空间名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespaceName") - public @Nullable String getNamespaceName() { + public String getNamespaceName() { return namespaceName; } - public void setNamespaceName(@Nullable String namespaceName) { + public void setNamespaceName(String namespaceName) { this.namespaceName = namespaceName; } - public OpenNamespaceLockDTO isLocked(@Nullable Boolean isLocked) { + public OpenNamespaceLockDTO isLocked(Boolean isLocked) { this.isLocked = isLocked; return this; } @@ -57,19 +56,19 @@ public OpenNamespaceLockDTO isLocked(@Nullable Boolean isLocked) { /** * 是否被锁定 * @return isLocked - */ - + */ + @Schema(name = "isLocked", description = "是否被锁定", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("isLocked") - public @Nullable Boolean getIsLocked() { + public Boolean getIsLocked() { return isLocked; } - public void setIsLocked(@Nullable Boolean isLocked) { + public void setIsLocked(Boolean isLocked) { this.isLocked = isLocked; } - public OpenNamespaceLockDTO lockedBy(@Nullable String lockedBy) { + public OpenNamespaceLockDTO lockedBy(String lockedBy) { this.lockedBy = lockedBy; return this; } @@ -77,15 +76,15 @@ public OpenNamespaceLockDTO lockedBy(@Nullable String lockedBy) { /** * 锁定者用户名 * @return lockedBy - */ - + */ + @Schema(name = "lockedBy", description = "锁定者用户名", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("lockedBy") - public @Nullable String getLockedBy() { + public String getLockedBy() { return lockedBy; } - public void setLockedBy(@Nullable String lockedBy) { + public void setLockedBy(String lockedBy) { this.lockedBy = lockedBy; } @@ -130,4 +129,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceSyncModel.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceSyncModel.java similarity index 56% rename from spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceSyncModel.java rename to spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceSyncModel.java index eab42b31..0ba3c7d0 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceSyncModel.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceSyncModel.java @@ -2,14 +2,12 @@ import java.net.URI; import java.util.Objects; -import com.apollo.openapi.server.model.ItemDTO; -import com.apollo.openapi.server.model.NamespaceIdentifier; +import com.apollo.openapi.server.model.OpenItemDTO; +import com.apollo.openapi.server.model.OpenNamespaceIdentifier; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; -import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -21,24 +19,24 @@ import javax.annotation.Generated; /** - * NamespaceSyncModel + * OpenNamespaceSyncModel */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class NamespaceSyncModel { +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +public class OpenNamespaceSyncModel { @Valid - private List<@Valid NamespaceIdentifier> syncToNamespaces = new ArrayList<>(); + private List<@Valid OpenNamespaceIdentifier> syncToNamespaces; @Valid - private List<@Valid ItemDTO> syncItems = new ArrayList<>(); + private List<@Valid OpenItemDTO> syncItems; - public NamespaceSyncModel syncToNamespaces(List<@Valid NamespaceIdentifier> syncToNamespaces) { + public OpenNamespaceSyncModel syncToNamespaces(List<@Valid OpenNamespaceIdentifier> syncToNamespaces) { this.syncToNamespaces = syncToNamespaces; return this; } - public NamespaceSyncModel addSyncToNamespacesItem(NamespaceIdentifier syncToNamespacesItem) { + public OpenNamespaceSyncModel addSyncToNamespacesItem(OpenNamespaceIdentifier syncToNamespacesItem) { if (this.syncToNamespaces == null) { this.syncToNamespaces = new ArrayList<>(); } @@ -47,26 +45,26 @@ public NamespaceSyncModel addSyncToNamespacesItem(NamespaceIdentifier syncToName } /** - * + * 目标命名空间标识列表 * @return syncToNamespaces - */ - @Valid - @Schema(name = "syncToNamespaces", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + @Valid + @Schema(name = "syncToNamespaces", description = "目标命名空间标识列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("syncToNamespaces") - public List<@Valid NamespaceIdentifier> getSyncToNamespaces() { + public List<@Valid OpenNamespaceIdentifier> getSyncToNamespaces() { return syncToNamespaces; } - public void setSyncToNamespaces(List<@Valid NamespaceIdentifier> syncToNamespaces) { + public void setSyncToNamespaces(List<@Valid OpenNamespaceIdentifier> syncToNamespaces) { this.syncToNamespaces = syncToNamespaces; } - public NamespaceSyncModel syncItems(List<@Valid ItemDTO> syncItems) { + public OpenNamespaceSyncModel syncItems(List<@Valid OpenItemDTO> syncItems) { this.syncItems = syncItems; return this; } - public NamespaceSyncModel addSyncItemsItem(ItemDTO syncItemsItem) { + public OpenNamespaceSyncModel addSyncItemsItem(OpenItemDTO syncItemsItem) { if (this.syncItems == null) { this.syncItems = new ArrayList<>(); } @@ -75,17 +73,17 @@ public NamespaceSyncModel addSyncItemsItem(ItemDTO syncItemsItem) { } /** - * + * 需要同步的配置项列表 * @return syncItems - */ - @Valid - @Schema(name = "syncItems", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + @Valid + @Schema(name = "syncItems", description = "需要同步的配置项列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("syncItems") - public List<@Valid ItemDTO> getSyncItems() { + public List<@Valid OpenItemDTO> getSyncItems() { return syncItems; } - public void setSyncItems(List<@Valid ItemDTO> syncItems) { + public void setSyncItems(List<@Valid OpenItemDTO> syncItems) { this.syncItems = syncItems; } @@ -97,9 +95,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NamespaceSyncModel namespaceSyncModel = (NamespaceSyncModel) o; - return Objects.equals(this.syncToNamespaces, namespaceSyncModel.syncToNamespaces) && - Objects.equals(this.syncItems, namespaceSyncModel.syncItems); + OpenNamespaceSyncModel openNamespaceSyncModel = (OpenNamespaceSyncModel) o; + return Objects.equals(this.syncToNamespaces, openNamespaceSyncModel.syncToNamespaces) && + Objects.equals(this.syncItems, openNamespaceSyncModel.syncItems); } @Override @@ -110,7 +108,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class NamespaceSyncModel {\n"); + sb.append("class OpenNamespaceSyncModel {\n"); sb.append(" syncToNamespaces: ").append(toIndentedString(syncToNamespaces)).append("\n"); sb.append(" syncItems: ").append(toIndentedString(syncItems)).append("\n"); sb.append("}"); @@ -128,4 +126,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceTextModel.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceTextModel.java new file mode 100644 index 00000000..a6c923c3 --- /dev/null +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceTextModel.java @@ -0,0 +1,250 @@ +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; + +/** + * OpenNamespaceTextModel + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +public class OpenNamespaceTextModel { + + private String appId; + + private String env; + + private String clusterName; + + private String namespaceName; + + private Long namespaceId; + + private String format; + + private String configText; + + private String operator; + + public OpenNamespaceTextModel appId(String appId) { + this.appId = appId; + return this; + } + + /** + * 应用唯一标识 + * @return appId + */ + + @Schema(name = "appId", description = "应用唯一标识", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("appId") + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public OpenNamespaceTextModel env(String env) { + this.env = env; + return this; + } + + /** + * 环境标识 + * @return env + */ + + @Schema(name = "env", description = "环境标识", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("env") + public String getEnv() { + return env; + } + + public void setEnv(String env) { + this.env = env; + } + + public OpenNamespaceTextModel clusterName(String clusterName) { + this.clusterName = clusterName; + return this; + } + + /** + * 集群名称 + * @return clusterName + */ + + @Schema(name = "clusterName", description = "集群名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("clusterName") + public String getClusterName() { + return clusterName; + } + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + public OpenNamespaceTextModel namespaceName(String namespaceName) { + this.namespaceName = namespaceName; + return this; + } + + /** + * 命名空间名称 + * @return namespaceName + */ + + @Schema(name = "namespaceName", description = "命名空间名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("namespaceName") + public String getNamespaceName() { + return namespaceName; + } + + public void setNamespaceName(String namespaceName) { + this.namespaceName = namespaceName; + } + + public OpenNamespaceTextModel namespaceId(Long namespaceId) { + this.namespaceId = namespaceId; + return this; + } + + /** + * 命名空间ID + * @return namespaceId + */ + + @Schema(name = "namespaceId", description = "命名空间ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("namespaceId") + public Long getNamespaceId() { + return namespaceId; + } + + public void setNamespaceId(Long namespaceId) { + this.namespaceId = namespaceId; + } + + public OpenNamespaceTextModel format(String format) { + this.format = format; + return this; + } + + /** + * 命名空间格式类型(properties/xml/json/yml等) + * @return format + */ + + @Schema(name = "format", description = "命名空间格式类型(properties/xml/json/yml等)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("format") + public String getFormat() { + return format; + } + + public void setFormat(String format) { + this.format = format; + } + + public OpenNamespaceTextModel configText(String configText) { + this.configText = configText; + return this; + } + + /** + * 配置内容的原始文本 + * @return configText + */ + + @Schema(name = "configText", description = "配置内容的原始文本", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("configText") + public String getConfigText() { + return configText; + } + + public void setConfigText(String configText) { + this.configText = configText; + } + + public OpenNamespaceTextModel operator(String operator) { + this.operator = operator; + return this; + } + + /** + * 操作者用户名 + * @return operator + */ + + @Schema(name = "operator", description = "操作者用户名", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("operator") + public String getOperator() { + return operator; + } + + public void setOperator(String operator) { + this.operator = operator; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenNamespaceTextModel openNamespaceTextModel = (OpenNamespaceTextModel) o; + return Objects.equals(this.appId, openNamespaceTextModel.appId) && + Objects.equals(this.env, openNamespaceTextModel.env) && + Objects.equals(this.clusterName, openNamespaceTextModel.clusterName) && + Objects.equals(this.namespaceName, openNamespaceTextModel.namespaceName) && + Objects.equals(this.namespaceId, openNamespaceTextModel.namespaceId) && + Objects.equals(this.format, openNamespaceTextModel.format) && + Objects.equals(this.configText, openNamespaceTextModel.configText) && + Objects.equals(this.operator, openNamespaceTextModel.operator); + } + + @Override + public int hashCode() { + return Objects.hash(appId, env, clusterName, namespaceName, namespaceId, format, configText, operator); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenNamespaceTextModel {\n"); + sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); + sb.append(" env: ").append(toIndentedString(env)).append("\n"); + sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); + sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); + sb.append(" namespaceId: ").append(toIndentedString(namespaceId)).append("\n"); + sb.append(" format: ").append(toIndentedString(format)).append("\n"); + sb.append(" configText: ").append(toIndentedString(configText)).append("\n"); + sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenOrganizationDto.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenOrganizationDto.java index 893c574b..084d9035 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenOrganizationDto.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenOrganizationDto.java @@ -4,7 +4,6 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,50 +18,50 @@ * OpenOrganizationDto */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") public class OpenOrganizationDto { - private @Nullable String orgId; + private String orgId; - private @Nullable String orgName; + private String orgName; - public OpenOrganizationDto orgId(@Nullable String orgId) { + public OpenOrganizationDto orgId(String orgId) { this.orgId = orgId; return this; } /** - * + * 组织ID * @return orgId - */ - - @Schema(name = "orgId", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "orgId", description = "组织ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("orgId") - public @Nullable String getOrgId() { + public String getOrgId() { return orgId; } - public void setOrgId(@Nullable String orgId) { + public void setOrgId(String orgId) { this.orgId = orgId; } - public OpenOrganizationDto orgName(@Nullable String orgName) { + public OpenOrganizationDto orgName(String orgName) { this.orgName = orgName; return this; } /** - * + * 组织名称 * @return orgName - */ - - @Schema(name = "orgName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "orgName", description = "组织名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("orgName") - public @Nullable String getOrgName() { + public String getOrgName() { return orgName; } - public void setOrgName(@Nullable String orgName) { + public void setOrgName(String orgName) { this.orgName = orgName; } @@ -105,4 +104,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenInstanceDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenInstanceDTO.java index e0f3a305..8421d5a1 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenInstanceDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenInstanceDTO.java @@ -6,9 +6,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; -import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -24,19 +22,19 @@ */ @Schema(name = "OpenPageDTOOpenInstanceDTO", description = "分页实例数据传输对象,用于返回分页查询的实例列表结果") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") public class OpenPageDTOOpenInstanceDTO { - private @Nullable Integer page; + private Integer page; - private @Nullable Integer size; + private Integer size; - private @Nullable Long total; + private Long total; @Valid - private List<@Valid OpenInstanceDTO> content = new ArrayList<>(); + private List<@Valid OpenInstanceDTO> content; - public OpenPageDTOOpenInstanceDTO page(@Nullable Integer page) { + public OpenPageDTOOpenInstanceDTO page(Integer page) { this.page = page; return this; } @@ -44,19 +42,19 @@ public OpenPageDTOOpenInstanceDTO page(@Nullable Integer page) { /** * 当前页码,从0开始计数 * @return page - */ - + */ + @Schema(name = "page", description = "当前页码,从0开始计数", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("page") - public @Nullable Integer getPage() { + public Integer getPage() { return page; } - public void setPage(@Nullable Integer page) { + public void setPage(Integer page) { this.page = page; } - public OpenPageDTOOpenInstanceDTO size(@Nullable Integer size) { + public OpenPageDTOOpenInstanceDTO size(Integer size) { this.size = size; return this; } @@ -64,19 +62,19 @@ public OpenPageDTOOpenInstanceDTO size(@Nullable Integer size) { /** * 每页显示的记录数量 * @return size - */ - + */ + @Schema(name = "size", description = "每页显示的记录数量", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("size") - public @Nullable Integer getSize() { + public Integer getSize() { return size; } - public void setSize(@Nullable Integer size) { + public void setSize(Integer size) { this.size = size; } - public OpenPageDTOOpenInstanceDTO total(@Nullable Long total) { + public OpenPageDTOOpenInstanceDTO total(Long total) { this.total = total; return this; } @@ -84,15 +82,15 @@ public OpenPageDTOOpenInstanceDTO total(@Nullable Long total) { /** * 总记录数,符合查询条件的实例总数量 * @return total - */ - + */ + @Schema(name = "total", description = "总记录数,符合查询条件的实例总数量", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("total") - public @Nullable Long getTotal() { + public Long getTotal() { return total; } - public void setTotal(@Nullable Long total) { + public void setTotal(Long total) { this.total = total; } @@ -112,8 +110,8 @@ public OpenPageDTOOpenInstanceDTO addContentItem(OpenInstanceDTO contentItem) { /** * 当前页的实例列表,包含具体的实例数据 * @return content - */ - @Valid + */ + @Valid @Schema(name = "content", description = "当前页的实例列表,包含具体的实例数据", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("content") public List<@Valid OpenInstanceDTO> getContent() { @@ -167,4 +165,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenItemDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenItemDTO.java index 4241a019..eb3f58b6 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenItemDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenItemDTO.java @@ -6,9 +6,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; -import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -24,19 +22,19 @@ */ @Schema(name = "OpenPageDTOOpenItemDTO", description = "分页配置项数据传输对象,用于返回分页查询的配置项列表结果") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") public class OpenPageDTOOpenItemDTO { - private @Nullable Integer page; + private Integer page; - private @Nullable Integer size; + private Integer size; - private @Nullable Long total; + private Long total; @Valid - private List<@Valid OpenItemDTO> content = new ArrayList<>(); + private List<@Valid OpenItemDTO> content; - public OpenPageDTOOpenItemDTO page(@Nullable Integer page) { + public OpenPageDTOOpenItemDTO page(Integer page) { this.page = page; return this; } @@ -44,19 +42,19 @@ public OpenPageDTOOpenItemDTO page(@Nullable Integer page) { /** * 当前页码,从0开始计数 * @return page - */ - + */ + @Schema(name = "page", description = "当前页码,从0开始计数", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("page") - public @Nullable Integer getPage() { + public Integer getPage() { return page; } - public void setPage(@Nullable Integer page) { + public void setPage(Integer page) { this.page = page; } - public OpenPageDTOOpenItemDTO size(@Nullable Integer size) { + public OpenPageDTOOpenItemDTO size(Integer size) { this.size = size; return this; } @@ -64,19 +62,19 @@ public OpenPageDTOOpenItemDTO size(@Nullable Integer size) { /** * 每页显示的记录数量 * @return size - */ - + */ + @Schema(name = "size", description = "每页显示的记录数量", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("size") - public @Nullable Integer getSize() { + public Integer getSize() { return size; } - public void setSize(@Nullable Integer size) { + public void setSize(Integer size) { this.size = size; } - public OpenPageDTOOpenItemDTO total(@Nullable Long total) { + public OpenPageDTOOpenItemDTO total(Long total) { this.total = total; return this; } @@ -84,15 +82,15 @@ public OpenPageDTOOpenItemDTO total(@Nullable Long total) { /** * 总记录数,符合查询条件的配置项总数量 * @return total - */ - + */ + @Schema(name = "total", description = "总记录数,符合查询条件的配置项总数量", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("total") - public @Nullable Long getTotal() { + public Long getTotal() { return total; } - public void setTotal(@Nullable Long total) { + public void setTotal(Long total) { this.total = total; } @@ -112,8 +110,8 @@ public OpenPageDTOOpenItemDTO addContentItem(OpenItemDTO contentItem) { /** * 当前页的配置项列表,包含具体的配置项数据 * @return content - */ - @Valid + */ + @Valid @Schema(name = "content", description = "当前页的配置项列表,包含具体的配置项数据", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("content") public List<@Valid OpenItemDTO> getContent() { @@ -167,4 +165,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/ListReleaseBO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseBO.java similarity index 67% rename from spring-boot2/src/main/java/com/apollo/openapi/server/model/ListReleaseBO.java rename to spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseBO.java index 0ea08c0f..c9644d0f 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/ListReleaseBO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseBO.java @@ -3,13 +3,11 @@ import java.net.URI; import java.util.Objects; import com.apollo.openapi.server.model.KVEntity; -import com.apollo.openapi.server.model.ReleaseDTO; +import com.apollo.openapi.server.model.OpenReleaseDTO; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; -import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -21,18 +19,18 @@ import javax.annotation.Generated; /** - * ListReleaseBO + * OpenReleaseBO */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class ListReleaseBO { +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +public class OpenReleaseBO { - private @Nullable ReleaseDTO baseInfo; + private OpenReleaseDTO baseInfo; @Valid - private List<@Valid KVEntity> items = new ArrayList<>(); + private List<@Valid KVEntity> items; - public ListReleaseBO baseInfo(@Nullable ReleaseDTO baseInfo) { + public OpenReleaseBO baseInfo(OpenReleaseDTO baseInfo) { this.baseInfo = baseInfo; return this; } @@ -40,24 +38,24 @@ public ListReleaseBO baseInfo(@Nullable ReleaseDTO baseInfo) { /** * Get baseInfo * @return baseInfo - */ - @Valid + */ + @Valid @Schema(name = "baseInfo", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("baseInfo") - public @Nullable ReleaseDTO getBaseInfo() { + public OpenReleaseDTO getBaseInfo() { return baseInfo; } - public void setBaseInfo(@Nullable ReleaseDTO baseInfo) { + public void setBaseInfo(OpenReleaseDTO baseInfo) { this.baseInfo = baseInfo; } - public ListReleaseBO items(List<@Valid KVEntity> items) { + public OpenReleaseBO items(List<@Valid KVEntity> items) { this.items = items; return this; } - public ListReleaseBO addItemsItem(KVEntity itemsItem) { + public OpenReleaseBO addItemsItem(KVEntity itemsItem) { if (this.items == null) { this.items = new ArrayList<>(); } @@ -66,11 +64,11 @@ public ListReleaseBO addItemsItem(KVEntity itemsItem) { } /** - * + * Get items * @return items - */ - @Valid - @Schema(name = "items", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + @Valid + @Schema(name = "items", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("items") public List<@Valid KVEntity> getItems() { return items; @@ -88,9 +86,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ListReleaseBO listReleaseBO = (ListReleaseBO) o; - return Objects.equals(this.baseInfo, listReleaseBO.baseInfo) && - Objects.equals(this.items, listReleaseBO.items); + OpenReleaseBO openReleaseBO = (OpenReleaseBO) o; + return Objects.equals(this.baseInfo, openReleaseBO.baseInfo) && + Objects.equals(this.items, openReleaseBO.items); } @Override @@ -101,7 +99,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ListReleaseBO {\n"); + sb.append("class OpenReleaseBO {\n"); sb.append(" baseInfo: ").append(toIndentedString(baseInfo)).append("\n"); sb.append(" items: ").append(toIndentedString(items)).append("\n"); sb.append("}"); @@ -119,4 +117,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseDTO.java index 78527ae9..28fa0bfa 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseDTO.java @@ -2,10 +2,10 @@ import java.net.URI; import java.util.Objects; -import com.apollo.openapi.server.model.MapString; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; +import java.util.HashMap; +import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -21,32 +21,33 @@ */ @Schema(name = "OpenReleaseDTO", description = "Apollo发布信息数据传输对象,表示一次配置发布的完整信息") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") public class OpenReleaseDTO { - private @Nullable String dataChangeCreatedBy; + private String dataChangeCreatedBy; - private @Nullable String dataChangeLastModifiedBy; + private String dataChangeLastModifiedBy; - private @Nullable String dataChangeCreatedTime; + private String dataChangeCreatedTime; - private @Nullable String dataChangeLastModifiedTime; + private String dataChangeLastModifiedTime; - private @Nullable Long id; + private Long id; - private @Nullable String appId; + private String appId; - private @Nullable String clusterName; + private String clusterName; - private @Nullable String namespaceName; + private String namespaceName; - private @Nullable String name; + private String name; - private @Nullable MapString configurations; + @Valid + private Map configurations = new HashMap<>(); - private @Nullable String comment; + private String comment; - public OpenReleaseDTO dataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { + public OpenReleaseDTO dataChangeCreatedBy(String dataChangeCreatedBy) { this.dataChangeCreatedBy = dataChangeCreatedBy; return this; } @@ -54,19 +55,19 @@ public OpenReleaseDTO dataChangeCreatedBy(@Nullable String dataChangeCreatedBy) /** * 发布创建者用户名,记录是谁创建了这次发布 * @return dataChangeCreatedBy - */ - + */ + @Schema(name = "dataChangeCreatedBy", description = "发布创建者用户名,记录是谁创建了这次发布", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedBy") - public @Nullable String getDataChangeCreatedBy() { + public String getDataChangeCreatedBy() { return dataChangeCreatedBy; } - public void setDataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { + public void setDataChangeCreatedBy(String dataChangeCreatedBy) { this.dataChangeCreatedBy = dataChangeCreatedBy; } - public OpenReleaseDTO dataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { + public OpenReleaseDTO dataChangeLastModifiedBy(String dataChangeLastModifiedBy) { this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; return this; } @@ -74,19 +75,19 @@ public OpenReleaseDTO dataChangeLastModifiedBy(@Nullable String dataChangeLastMo /** * 发布最后修改者用户名,记录最后一次修改发布信息的用户 * @return dataChangeLastModifiedBy - */ - + */ + @Schema(name = "dataChangeLastModifiedBy", description = "发布最后修改者用户名,记录最后一次修改发布信息的用户", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedBy") - public @Nullable String getDataChangeLastModifiedBy() { + public String getDataChangeLastModifiedBy() { return dataChangeLastModifiedBy; } - public void setDataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { + public void setDataChangeLastModifiedBy(String dataChangeLastModifiedBy) { this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; } - public OpenReleaseDTO dataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { + public OpenReleaseDTO dataChangeCreatedTime(String dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; return this; } @@ -94,19 +95,19 @@ public OpenReleaseDTO dataChangeCreatedTime(@Nullable String dataChangeCreatedTi /** * 发布创建时间,ISO 8601格式的时间戳 * @return dataChangeCreatedTime - */ - - @Schema(name = "dataChangeCreatedTime", description = "发布创建时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "dataChangeCreatedTime", example = "2025-09-29T12:34:56Z", description = "发布创建时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedTime") - public @Nullable String getDataChangeCreatedTime() { + public String getDataChangeCreatedTime() { return dataChangeCreatedTime; } - public void setDataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { + public void setDataChangeCreatedTime(String dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; } - public OpenReleaseDTO dataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { + public OpenReleaseDTO dataChangeLastModifiedTime(String dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; return this; } @@ -114,19 +115,19 @@ public OpenReleaseDTO dataChangeLastModifiedTime(@Nullable String dataChangeLast /** * 发布最后修改时间,ISO 8601格式的时间戳 * @return dataChangeLastModifiedTime - */ - - @Schema(name = "dataChangeLastModifiedTime", description = "发布最后修改时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + */ + + @Schema(name = "dataChangeLastModifiedTime", example = "2025-09-29T12:34:56Z", description = "发布最后修改时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedTime") - public @Nullable String getDataChangeLastModifiedTime() { + public String getDataChangeLastModifiedTime() { return dataChangeLastModifiedTime; } - public void setDataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { + public void setDataChangeLastModifiedTime(String dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; } - public OpenReleaseDTO id(@Nullable Long id) { + public OpenReleaseDTO id(Long id) { this.id = id; return this; } @@ -134,19 +135,19 @@ public OpenReleaseDTO id(@Nullable Long id) { /** * 发布记录的唯一标识符,系统自动生成 * @return id - */ - + */ + @Schema(name = "id", description = "发布记录的唯一标识符,系统自动生成", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") - public @Nullable Long getId() { + public Long getId() { return id; } - public void setId(@Nullable Long id) { + public void setId(Long id) { this.id = id; } - public OpenReleaseDTO appId(@Nullable String appId) { + public OpenReleaseDTO appId(String appId) { this.appId = appId; return this; } @@ -154,19 +155,19 @@ public OpenReleaseDTO appId(@Nullable String appId) { /** * 所属应用的唯一标识符 * @return appId - */ - + */ + @Schema(name = "appId", description = "所属应用的唯一标识符", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("appId") - public @Nullable String getAppId() { + public String getAppId() { return appId; } - public void setAppId(@Nullable String appId) { + public void setAppId(String appId) { this.appId = appId; } - public OpenReleaseDTO clusterName(@Nullable String clusterName) { + public OpenReleaseDTO clusterName(String clusterName) { this.clusterName = clusterName; return this; } @@ -174,19 +175,19 @@ public OpenReleaseDTO clusterName(@Nullable String clusterName) { /** * 所属集群的名称 * @return clusterName - */ - + */ + @Schema(name = "clusterName", description = "所属集群的名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("clusterName") - public @Nullable String getClusterName() { + public String getClusterName() { return clusterName; } - public void setClusterName(@Nullable String clusterName) { + public void setClusterName(String clusterName) { this.clusterName = clusterName; } - public OpenReleaseDTO namespaceName(@Nullable String namespaceName) { + public OpenReleaseDTO namespaceName(String namespaceName) { this.namespaceName = namespaceName; return this; } @@ -194,19 +195,19 @@ public OpenReleaseDTO namespaceName(@Nullable String namespaceName) { /** * 所属命名空间的名称 * @return namespaceName - */ - + */ + @Schema(name = "namespaceName", description = "所属命名空间的名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespaceName") - public @Nullable String getNamespaceName() { + public String getNamespaceName() { return namespaceName; } - public void setNamespaceName(@Nullable String namespaceName) { + public void setNamespaceName(String namespaceName) { this.namespaceName = namespaceName; } - public OpenReleaseDTO name(@Nullable String name) { + public OpenReleaseDTO name(String name) { this.name = name; return this; } @@ -214,39 +215,47 @@ public OpenReleaseDTO name(@Nullable String name) { /** * 发布名称,用于标识这次发布的版本或描述 * @return name - */ - + */ + @Schema(name = "name", description = "发布名称,用于标识这次发布的版本或描述", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") - public @Nullable String getName() { + public String getName() { return name; } - public void setName(@Nullable String name) { + public void setName(String name) { this.name = name; } - public OpenReleaseDTO configurations(@Nullable MapString configurations) { + public OpenReleaseDTO configurations(Map configurations) { this.configurations = configurations; return this; } + public OpenReleaseDTO putConfigurationsItem(String key, String configurationsItem) { + if (this.configurations == null) { + this.configurations = new HashMap<>(); + } + this.configurations.put(key, configurationsItem); + return this; + } + /** * Get configurations * @return configurations - */ - @Valid + */ + @Schema(name = "configurations", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("configurations") - public @Nullable MapString getConfigurations() { + public Map getConfigurations() { return configurations; } - public void setConfigurations(@Nullable MapString configurations) { + public void setConfigurations(Map configurations) { this.configurations = configurations; } - public OpenReleaseDTO comment(@Nullable String comment) { + public OpenReleaseDTO comment(String comment) { this.comment = comment; return this; } @@ -254,15 +263,15 @@ public OpenReleaseDTO comment(@Nullable String comment) { /** * 发布备注,描述本次发布的变更内容和目的 * @return comment - */ - + */ + @Schema(name = "comment", description = "发布备注,描述本次发布的变更内容和目的", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("comment") - public @Nullable String getComment() { + public String getComment() { return comment; } - public void setComment(@Nullable String comment) { + public void setComment(String comment) { this.comment = comment; } @@ -323,4 +332,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsGet401Response.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsGet401Response.java deleted file mode 100644 index 33342b20..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsGet401Response.java +++ /dev/null @@ -1,86 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * OpenapiV1AppsGet401Response - */ - -@JsonTypeName("_openapi_v1_apps_get_401_response") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenapiV1AppsGet401Response { - - private @Nullable String message; - - public OpenapiV1AppsGet401Response message(@Nullable String message) { - this.message = message; - return this; - } - - /** - * Get message - * @return message - */ - - @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("message") - public @Nullable String getMessage() { - return message; - } - - public void setMessage(@Nullable String message) { - this.message = message; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenapiV1AppsGet401Response openapiV1AppsGet401Response = (OpenapiV1AppsGet401Response) o; - return Objects.equals(this.message, openapiV1AppsGet401Response.message); - } - - @Override - public int hashCode() { - return Objects.hash(message); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenapiV1AppsGet401Response {\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsPost400Response.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsPost400Response.java deleted file mode 100644 index 7f72276b..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsPost400Response.java +++ /dev/null @@ -1,110 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * OpenapiV1AppsPost400Response - */ - -@JsonTypeName("_openapi_v1_apps_post_400_response") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenapiV1AppsPost400Response { - - private @Nullable String message; - - private @Nullable String exception; - - public OpenapiV1AppsPost400Response message(@Nullable String message) { - this.message = message; - return this; - } - - /** - * Get message - * @return message - */ - - @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("message") - public @Nullable String getMessage() { - return message; - } - - public void setMessage(@Nullable String message) { - this.message = message; - } - - public OpenapiV1AppsPost400Response exception(@Nullable String exception) { - this.exception = exception; - return this; - } - - /** - * Get exception - * @return exception - */ - - @Schema(name = "exception", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("exception") - public @Nullable String getException() { - return exception; - } - - public void setException(@Nullable String exception) { - this.exception = exception; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenapiV1AppsPost400Response openapiV1AppsPost400Response = (OpenapiV1AppsPost400Response) o; - return Objects.equals(this.message, openapiV1AppsPost400Response.message) && - Objects.equals(this.exception, openapiV1AppsPost400Response.exception); - } - - @Override - public int hashCode() { - return Objects.hash(message, exception); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenapiV1AppsPost400Response {\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" exception: ").append(toIndentedString(exception)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsPostRequest.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsPostRequest.java deleted file mode 100644 index 1f9d2647..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsPostRequest.java +++ /dev/null @@ -1,161 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.apollo.openapi.server.model.OpenAppDTO; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * - */ - -@Schema(name = "_openapi_v1_apps_post_request", description = "") -@JsonTypeName("_openapi_v1_apps_post_request") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenapiV1AppsPostRequest { - - private OpenAppDTO app; - - private Boolean assignAppRoleToSelf; - - @Valid - private List admins = new ArrayList<>(); - - public OpenapiV1AppsPostRequest() { - super(); - } - - /** - * Constructor with only required parameters - */ - public OpenapiV1AppsPostRequest(OpenAppDTO app, Boolean assignAppRoleToSelf, List admins) { - this.app = app; - this.assignAppRoleToSelf = assignAppRoleToSelf; - this.admins = admins; - } - - public OpenapiV1AppsPostRequest app(OpenAppDTO app) { - this.app = app; - return this; - } - - /** - * Get app - * @return app - */ - @NotNull @Valid - @Schema(name = "app", requiredMode = Schema.RequiredMode.REQUIRED) - @JsonProperty("app") - public OpenAppDTO getApp() { - return app; - } - - public void setApp(OpenAppDTO app) { - this.app = app; - } - - public OpenapiV1AppsPostRequest assignAppRoleToSelf(Boolean assignAppRoleToSelf) { - this.assignAppRoleToSelf = assignAppRoleToSelf; - return this; - } - - /** - * 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 - * @return assignAppRoleToSelf - */ - @NotNull - @Schema(name = "assignAppRoleToSelf", description = "是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限", requiredMode = Schema.RequiredMode.REQUIRED) - @JsonProperty("assignAppRoleToSelf") - public Boolean getAssignAppRoleToSelf() { - return assignAppRoleToSelf; - } - - public void setAssignAppRoleToSelf(Boolean assignAppRoleToSelf) { - this.assignAppRoleToSelf = assignAppRoleToSelf; - } - - public OpenapiV1AppsPostRequest admins(List admins) { - this.admins = admins; - return this; - } - - public OpenapiV1AppsPostRequest addAdminsItem(String adminsItem) { - if (this.admins == null) { - this.admins = new ArrayList<>(); - } - this.admins.add(adminsItem); - return this; - } - - /** - * 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 - * @return admins - */ - @NotNull - @Schema(name = "admins", description = "应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限", requiredMode = Schema.RequiredMode.REQUIRED) - @JsonProperty("admins") - public List getAdmins() { - return admins; - } - - public void setAdmins(List admins) { - this.admins = admins; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenapiV1AppsPostRequest openapiV1AppsPostRequest = (OpenapiV1AppsPostRequest) o; - return Objects.equals(this.app, openapiV1AppsPostRequest.app) && - Objects.equals(this.assignAppRoleToSelf, openapiV1AppsPostRequest.assignAppRoleToSelf) && - Objects.equals(this.admins, openapiV1AppsPostRequest.admins); - } - - @Override - public int hashCode() { - return Objects.hash(app, assignAppRoleToSelf, admins); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenapiV1AppsPostRequest {\n"); - sb.append(" app: ").append(toIndentedString(app)).append("\n"); - sb.append(" assignAppRoleToSelf: ").append(toIndentedString(assignAppRoleToSelf)).append("\n"); - sb.append(" admins: ").append(toIndentedString(admins)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.java deleted file mode 100644 index 6551ff39..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.java +++ /dev/null @@ -1,110 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - */ - -@JsonTypeName("_openapi_v1_envs__env__apps__appId__clusters__clusterName__namespaces__namespaceName__items_validate_post_200_response") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response { - - private @Nullable Boolean valid; - - private @Nullable String message; - - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response valid(@Nullable Boolean valid) { - this.valid = valid; - return this; - } - - /** - * Get valid - * @return valid - */ - - @Schema(name = "valid", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("valid") - public @Nullable Boolean getValid() { - return valid; - } - - public void setValid(@Nullable Boolean valid) { - this.valid = valid; - } - - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response message(@Nullable String message) { - this.message = message; - return this; - } - - /** - * Get message - * @return message - */ - - @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("message") - public @Nullable String getMessage() { - return message; - } - - public void setMessage(@Nullable String message) { - this.message = message; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response = (OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response) o; - return Objects.equals(this.valid, openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.valid) && - Objects.equals(this.message, openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.message); - } - - @Override - public int hashCode() { - return Objects.hash(valid, message); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response {\n"); - sb.append(" valid: ").append(toIndentedString(valid)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.java deleted file mode 100644 index fdca2f06..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.java +++ /dev/null @@ -1,146 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - */ - -@JsonTypeName("_openapi_v1_envs__env__apps__appId__clusters__clusterName__namespaces__namespaceName__items_validate_post_400_response") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response { - - private @Nullable Boolean valid; - - private @Nullable String message; - - @Valid - private List errors = new ArrayList<>(); - - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response valid(@Nullable Boolean valid) { - this.valid = valid; - return this; - } - - /** - * Get valid - * @return valid - */ - - @Schema(name = "valid", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("valid") - public @Nullable Boolean getValid() { - return valid; - } - - public void setValid(@Nullable Boolean valid) { - this.valid = valid; - } - - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response message(@Nullable String message) { - this.message = message; - return this; - } - - /** - * Get message - * @return message - */ - - @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("message") - public @Nullable String getMessage() { - return message; - } - - public void setMessage(@Nullable String message) { - this.message = message; - } - - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response errors(List errors) { - this.errors = errors; - return this; - } - - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response addErrorsItem(String errorsItem) { - if (this.errors == null) { - this.errors = new ArrayList<>(); - } - this.errors.add(errorsItem); - return this; - } - - /** - * Get errors - * @return errors - */ - - @Schema(name = "errors", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("errors") - public List getErrors() { - return errors; - } - - public void setErrors(List errors) { - this.errors = errors; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response = (OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response) o; - return Objects.equals(this.valid, openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.valid) && - Objects.equals(this.message, openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.message) && - Objects.equals(this.errors, openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.errors); - } - - @Override - public int hashCode() { - return Objects.hash(valid, message, errors); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response {\n"); - sb.append(" valid: ").append(toIndentedString(valid)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1EnvsEnvReleasesCompareGet200Response.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1EnvsEnvReleasesCompareGet200Response.java deleted file mode 100644 index bafb4a58..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1EnvsEnvReleasesCompareGet200Response.java +++ /dev/null @@ -1,99 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.apollo.openapi.server.model.Change; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * OpenapiV1EnvsEnvReleasesCompareGet200Response - */ - -@JsonTypeName("_openapi_v1_envs__env__releases_compare_get_200_response") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenapiV1EnvsEnvReleasesCompareGet200Response { - - @Valid - private List<@Valid Change> changes = new ArrayList<>(); - - public OpenapiV1EnvsEnvReleasesCompareGet200Response changes(List<@Valid Change> changes) { - this.changes = changes; - return this; - } - - public OpenapiV1EnvsEnvReleasesCompareGet200Response addChangesItem(Change changesItem) { - if (this.changes == null) { - this.changes = new ArrayList<>(); - } - this.changes.add(changesItem); - return this; - } - - /** - * Get changes - * @return changes - */ - @Valid - @Schema(name = "changes", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("changes") - public List<@Valid Change> getChanges() { - return changes; - } - - public void setChanges(List<@Valid Change> changes) { - this.changes = changes; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenapiV1EnvsEnvReleasesCompareGet200Response openapiV1EnvsEnvReleasesCompareGet200Response = (OpenapiV1EnvsEnvReleasesCompareGet200Response) o; - return Objects.equals(this.changes, openapiV1EnvsEnvReleasesCompareGet200Response.changes); - } - - @Override - public int hashCode() { - return Objects.hash(changes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenapiV1EnvsEnvReleasesCompareGet200Response {\n"); - sb.append(" changes: ").append(toIndentedString(changes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/ReleaseDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/ReleaseDTO.java deleted file mode 100644 index b4c2dc45..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/ReleaseDTO.java +++ /dev/null @@ -1,420 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * ReleaseDTO - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class ReleaseDTO { - - private @Nullable String dataChangeCreatedBy; - - private @Nullable String dataChangeLastModifiedBy; - - private @Nullable String dataChangeCreatedByDisplayName; - - private @Nullable String dataChangeLastModifiedByDisplayName; - - private @Nullable String dataChangeCreatedTime; - - private @Nullable String dataChangeLastModifiedTime; - - private @Nullable Long id; - - private @Nullable String releaseKey; - - private @Nullable String name; - - private @Nullable String appId; - - private @Nullable String clusterName; - - private @Nullable String namespaceName; - - private @Nullable String configurations; - - private @Nullable String comment; - - private @Nullable Boolean isAbandoned; - - public ReleaseDTO dataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * - * @return dataChangeCreatedBy - */ - - @Schema(name = "dataChangeCreatedBy", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeCreatedBy") - public @Nullable String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - public void setDataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - public ReleaseDTO dataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * - * @return dataChangeLastModifiedBy - */ - - @Schema(name = "dataChangeLastModifiedBy", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeLastModifiedBy") - public @Nullable String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - public void setDataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - public ReleaseDTO dataChangeCreatedByDisplayName(@Nullable String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - return this; - } - - /** - * - * @return dataChangeCreatedByDisplayName - */ - - @Schema(name = "dataChangeCreatedByDisplayName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeCreatedByDisplayName") - public @Nullable String getDataChangeCreatedByDisplayName() { - return dataChangeCreatedByDisplayName; - } - - public void setDataChangeCreatedByDisplayName(@Nullable String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - } - - public ReleaseDTO dataChangeLastModifiedByDisplayName(@Nullable String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - return this; - } - - /** - * - * @return dataChangeLastModifiedByDisplayName - */ - - @Schema(name = "dataChangeLastModifiedByDisplayName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeLastModifiedByDisplayName") - public @Nullable String getDataChangeLastModifiedByDisplayName() { - return dataChangeLastModifiedByDisplayName; - } - - public void setDataChangeLastModifiedByDisplayName(@Nullable String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - } - - public ReleaseDTO dataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - return this; - } - - /** - * - * @return dataChangeCreatedTime - */ - - @Schema(name = "dataChangeCreatedTime", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeCreatedTime") - public @Nullable String getDataChangeCreatedTime() { - return dataChangeCreatedTime; - } - - public void setDataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - public ReleaseDTO dataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - return this; - } - - /** - * - * @return dataChangeLastModifiedTime - */ - - @Schema(name = "dataChangeLastModifiedTime", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeLastModifiedTime") - public @Nullable String getDataChangeLastModifiedTime() { - return dataChangeLastModifiedTime; - } - - public void setDataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - public ReleaseDTO id(@Nullable Long id) { - this.id = id; - return this; - } - - /** - * - * @return id - */ - - @Schema(name = "id", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("id") - public @Nullable Long getId() { - return id; - } - - public void setId(@Nullable Long id) { - this.id = id; - } - - public ReleaseDTO releaseKey(@Nullable String releaseKey) { - this.releaseKey = releaseKey; - return this; - } - - /** - * - * @return releaseKey - */ - - @Schema(name = "releaseKey", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("releaseKey") - public @Nullable String getReleaseKey() { - return releaseKey; - } - - public void setReleaseKey(@Nullable String releaseKey) { - this.releaseKey = releaseKey; - } - - public ReleaseDTO name(@Nullable String name) { - this.name = name; - return this; - } - - /** - * - * @return name - */ - - @Schema(name = "name", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("name") - public @Nullable String getName() { - return name; - } - - public void setName(@Nullable String name) { - this.name = name; - } - - public ReleaseDTO appId(@Nullable String appId) { - this.appId = appId; - return this; - } - - /** - * - * @return appId - */ - - @Schema(name = "appId", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("appId") - public @Nullable String getAppId() { - return appId; - } - - public void setAppId(@Nullable String appId) { - this.appId = appId; - } - - public ReleaseDTO clusterName(@Nullable String clusterName) { - this.clusterName = clusterName; - return this; - } - - /** - * - * @return clusterName - */ - - @Schema(name = "clusterName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("clusterName") - public @Nullable String getClusterName() { - return clusterName; - } - - public void setClusterName(@Nullable String clusterName) { - this.clusterName = clusterName; - } - - public ReleaseDTO namespaceName(@Nullable String namespaceName) { - this.namespaceName = namespaceName; - return this; - } - - /** - * - * @return namespaceName - */ - - @Schema(name = "namespaceName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("namespaceName") - public @Nullable String getNamespaceName() { - return namespaceName; - } - - public void setNamespaceName(@Nullable String namespaceName) { - this.namespaceName = namespaceName; - } - - public ReleaseDTO configurations(@Nullable String configurations) { - this.configurations = configurations; - return this; - } - - /** - * - * @return configurations - */ - - @Schema(name = "configurations", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("configurations") - public @Nullable String getConfigurations() { - return configurations; - } - - public void setConfigurations(@Nullable String configurations) { - this.configurations = configurations; - } - - public ReleaseDTO comment(@Nullable String comment) { - this.comment = comment; - return this; - } - - /** - * - * @return comment - */ - - @Schema(name = "comment", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("comment") - public @Nullable String getComment() { - return comment; - } - - public void setComment(@Nullable String comment) { - this.comment = comment; - } - - public ReleaseDTO isAbandoned(@Nullable Boolean isAbandoned) { - this.isAbandoned = isAbandoned; - return this; - } - - /** - * - * @return isAbandoned - */ - - @Schema(name = "isAbandoned", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("isAbandoned") - public @Nullable Boolean getIsAbandoned() { - return isAbandoned; - } - - public void setIsAbandoned(@Nullable Boolean isAbandoned) { - this.isAbandoned = isAbandoned; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReleaseDTO releaseDTO = (ReleaseDTO) o; - return Objects.equals(this.dataChangeCreatedBy, releaseDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeLastModifiedBy, releaseDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, releaseDTO.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, releaseDTO.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, releaseDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, releaseDTO.dataChangeLastModifiedTime) && - Objects.equals(this.id, releaseDTO.id) && - Objects.equals(this.releaseKey, releaseDTO.releaseKey) && - Objects.equals(this.name, releaseDTO.name) && - Objects.equals(this.appId, releaseDTO.appId) && - Objects.equals(this.clusterName, releaseDTO.clusterName) && - Objects.equals(this.namespaceName, releaseDTO.namespaceName) && - Objects.equals(this.configurations, releaseDTO.configurations) && - Objects.equals(this.comment, releaseDTO.comment) && - Objects.equals(this.isAbandoned, releaseDTO.isAbandoned); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, id, releaseKey, name, appId, clusterName, namespaceName, configurations, comment, isAbandoned); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReleaseDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).append("\n"); - sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); - sb.append(" dataChangeLastModifiedByDisplayName: ").append(toIndentedString(dataChangeLastModifiedByDisplayName)).append("\n"); - sb.append(" dataChangeCreatedTime: ").append(toIndentedString(dataChangeCreatedTime)).append("\n"); - sb.append(" dataChangeLastModifiedTime: ").append(toIndentedString(dataChangeLastModifiedTime)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" releaseKey: ").append(toIndentedString(releaseKey)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); - sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); - sb.append(" configurations: ").append(toIndentedString(configurations)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append(" isAbandoned: ").append(toIndentedString(isAbandoned)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/RichResponseEntity.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/RichResponseEntity.java new file mode 100644 index 00000000..ff1497c5 --- /dev/null +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/RichResponseEntity.java @@ -0,0 +1,148 @@ +package com.apollo.openapi.server.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * A wrapper for a single response entity with code, message, and body + */ + +@Schema(name = "RichResponseEntity", description = "A wrapper for a single response entity with code, message, and body") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +public class RichResponseEntity { + + private Integer code; + + private Object message; + + private Object body; + + /** + * Default constructor + * @deprecated Use {@link RichResponseEntity#RichResponseEntity(Integer, Object)} + */ + @Deprecated + public RichResponseEntity() { + super(); + } + + /** + * Constructor with only required parameters + */ + public RichResponseEntity(Integer code, Object message) { + this.code = code; + this.message = message; + } + + public RichResponseEntity code(Integer code) { + this.code = code; + return this; + } + + /** + * HTTP status code + * @return code + */ + @NotNull + @Schema(name = "code", example = "200", description = "HTTP status code", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("code") + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public RichResponseEntity message(Object message) { + this.message = message; + return this; + } + + /** + * Response message (can be string or object) + * @return message + */ + @NotNull + @Schema(name = "message", example = "OK", description = "Response message (can be string or object)", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("message") + public Object getMessage() { + return message; + } + + public void setMessage(Object message) { + this.message = message; + } + + public RichResponseEntity body(Object body) { + this.body = body; + return this; + } + + /** + * Response payload (generic type T) + * @return body + */ + + @Schema(name = "body", description = "Response payload (generic type T)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("body") + public Object getBody() { + return body; + } + + public void setBody(Object body) { + this.body = body; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RichResponseEntity richResponseEntity = (RichResponseEntity) o; + return Objects.equals(this.code, richResponseEntity.code) && + Objects.equals(this.message, richResponseEntity.message) && + Objects.equals(this.body, richResponseEntity.body); + } + + @Override + public int hashCode() { + return Objects.hash(code, message, body); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RichResponseEntity {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" body: ").append(toIndentedString(body)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/spring-boot2/src/main/resources/openapi.yaml b/spring-boot2/src/main/resources/openapi.yaml index 4efa588f..3dd6d6b6 100644 --- a/spring-boot2/src/main/resources/openapi.yaml +++ b/spring-boot2/src/main/resources/openapi.yaml @@ -1,34 +1,21 @@ openapi: 3.0.1 info: description: | - Apollo配置中心OpenAPI接口文档 +

Apollo配置中心OpenAPI接口文档

- ## 认证方式 +

认证方式

+

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

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

获取 Token 的方式:

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

使用示例

+
curl -X GET "http://localhost:8070/openapi/v1/apps" \
+    -H "Authorization: your_token_here"
title: Apollo OpenAPI version: 1.0.0 servers: @@ -56,13 +43,14 @@ paths: /openapi/v1/apps: get: deprecated: false - description: GET /openapi/v1/apps?authorized=true + description: POST /openapi/v1/apps + operationId: findApps parameters: - - description: 是否只返回授权的应用 - example: "true" + - description: 查找应用 + example: "123" explode: true in: query - name: authorized + name: appIds required: false schema: type: string @@ -94,39 +82,74 @@ paths: ownerEmail: dev@company.com schema: items: - $ref: "#/components/schemas/OpenAppDTO" + $ref: '#/components/schemas/OpenAppDTO' type: array - description: 成功获取授权应用列表 + description: 成功获取应用列表 "401": content: application/json: - example: - message: Unauthorized schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 未授权访问 - summary: 获取当前Consumer授权的应用列表 + summary: 查找应用 (original openapi) tags: - App Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: App Management post: deprecated: false description: POST /openapi/v1/apps + operationId: createApp requestBody: content: application/json: schema: - $ref: "#/components/schemas/_openapi_v1_apps_post_request" + $ref: '#/components/schemas/OpenCreateAppDTO' required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessEmptyResponse' + description: 应用创建成功 + "400": + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object + description: 请求参数错误 + "403": + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object + description: 权限不足 + summary: 创建应用 (original openapi) + tags: + - App Management + x-content-type: application/json + x-accepts: application/json + x-tags: + - tag: App Management + /openapi/v1/apps/authorized: + get: + deprecated: false + description: GET /openapi/v1/apps/authorized + operationId: findAppsAuthorized responses: "200": content: application/json: example: - dataChangeCreatedBy: apollo + - dataChangeCreatedBy: apollo dataChangeLastModifiedBy: apollo dataChangeCreatedTime: 2024-01-15T10:30:00.000Z dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z @@ -136,40 +159,42 @@ paths: orgName: Default Organization ownerName: Apollo Admin ownerEmail: admin@apollo.com + - dataChangeCreatedBy: apollo + dataChangeLastModifiedBy: apollo + dataChangeCreatedTime: 2024-01-10T14:20:00.000Z + dataChangeLastModifiedTime: 2024-01-12T16:45:00.000Z + name: User Service + appId: user-service + orgId: microservices + orgName: Microservices Team + ownerName: Dev Team + ownerEmail: dev@company.com schema: - $ref: "#/components/schemas/OpenAppDTO" - description: 应用创建成功 - "400": - content: - application/json: - example: - message: App is null - exception: BadRequestException - schema: - $ref: "#/components/schemas/_openapi_v1_apps_post_400_response" - description: 请求参数错误 - "403": + items: + $ref: '#/components/schemas/OpenAppDTO' + type: array + description: 成功获取授权应用列表 + "401": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 权限不足 - summary: 创建应用 + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object + description: 未授权访问 + summary: 获取当前Consumer授权的应用列表 (original openapi) tags: - App Management - x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: App Management - /openapi/v1/apps/{appId}/env-clusters: + /openapi/v1/apps/{appId}/envclusters: get: deprecated: false - description: "GET /openapi/v1/apps/{appId}/env-clusters" + description: "GET /openapi/v1/apps/{appId}/envclusters" + operationId: getEnvClusterInfo parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -195,30 +220,30 @@ paths: - backup schema: items: - $ref: "#/components/schemas/OpenEnvClusterDTO" + $ref: '#/components/schemas/OpenEnvClusterDTO' type: array description: 成功获取应用环境集群信息 "404": content: application/json: - example: - message: "App not found: invalid-app-id" schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 应用不存在 - summary: 获取应用的环境集群信息 + summary: 获取应用的环境集群信息 (original openapi) tags: - App Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: App Management /openapi/v1/apps/{appId}: delete: deprecated: false description: "DELETE /openapi/v1/apps/{appId}" + operationId: deleteApp parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -226,41 +251,49 @@ paths: schema: type: string style: simple + - description: 操作人用户名 + explode: true + in: query + name: operator + required: true + schema: + type: string + style: form responses: "200": content: application/json: - example: - message: App deleted successfully schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' + type: object description: 应用删除成功 "403": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 权限不足,需要超级管理员权限 "404": content: application/json: - example: - message: "App not found: invalid-app-id" schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 应用不存在 - summary: 删除应用 + summary: 删除应用(new added) tags: - App Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: App Management get: deprecated: false description: "GET /openapi/v1/apps/{appId}" + operationId: getApp parameters: - description: "" explode: false @@ -286,28 +319,28 @@ paths: ownerName: Apollo Admin ownerEmail: admin@apollo.com schema: - $ref: "#/components/schemas/OpenAppDTO" + $ref: '#/components/schemas/OpenAppDTO' description: 成功获取应用信息 "404": content: application/json: - example: - message: "App not found: invalid-app-id" schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 应用不存在 - summary: 获取单个应用信息 + summary: 获取单个应用信息(new added) tags: - App Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: App Management put: deprecated: false description: "PUT /openapi/v1/apps/{appId}" + operationId: updateApp parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -315,20 +348,19 @@ paths: schema: type: string style: simple + - description: 操作人用户名 + explode: true + in: query + name: operator + required: true + schema: + type: string + style: form requestBody: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/OpenAppDTO" - description: "" - required: - - appId - - name - - orgId - - orgName - - ownerName - type: object + $ref: '#/components/schemas/OpenAppDTO' required: true responses: "200": @@ -346,36 +378,55 @@ paths: ownerName: Apollo Admin ownerEmail: admin@apollo.com schema: - $ref: "#/components/schemas/OpenAppDTO" - description: "" + $ref: '#/components/schemas/OpenAppDTO' + description: 应用更新成功 "400": content: application/json: - example: - message: Invalid app data schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 请求参数错误 "403": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 权限不足 - summary: 更新应用 + summary: 更新应用(new added) tags: - App Management x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: App Management /openapi/v1/apps/by-self: get: deprecated: false description: GET /openapi/v1/apps/by-self + operationId: getAppsBySelf + parameters: + - description: 页数 + explode: true + in: query + name: page + required: true + schema: + minimum: 0 + type: integer + style: form + - description: 页大小 + explode: true + in: query + name: size + required: true + schema: + minimum: 0 + type: integer + style: form responses: "200": content: @@ -403,30 +454,30 @@ paths: ownerEmail: business@company.com schema: items: - $ref: "#/components/schemas/OpenAppDTO" + $ref: '#/components/schemas/OpenAppDTO' type: array description: 成功获取Consumer的应用列表 "401": content: application/json: - example: - message: Unauthorized schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 未授权访问 - summary: 获取当前Consumer的应用列表(分页) + summary: 获取当前Consumer的应用列表(分页)(new added) tags: - App Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: App Management /openapi/v1/apps/{appId}/navtree: get: deprecated: false description: "GET /openapi/v1/apps/{appId}/navtree" + operationId: getAppNavTree parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -453,23 +504,21 @@ paths: parentClusterId: 0 comment: Default cluster schema: - items: - $ref: "#/components/schemas/EnvClusterInfo" - type: array + $ref: '#/components/schemas/MultiResponseEntity' description: 成功获取应用导航树 - summary: 获取应用导航树 + summary: 获取应用导航树(new added) tags: - App Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: App Management /openapi/v1/apps/envs/{env}: post: deprecated: false description: "POST /openapi/v1/apps/envs/{env}" + operationId: createAppInEnv parameters: - - description: "" + - description: 环境标识,例如 DEV、FAT、UAT、PROD explode: false in: path name: env @@ -477,60 +526,59 @@ paths: schema: type: string style: simple + - description: 操作人用户名 + explode: true + in: query + name: operator + required: true + schema: + type: string + style: form requestBody: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/OpenAppDTO" - description: "" - required: - - appId - - name - - orgId - - orgName - - ownerName - type: object + $ref: '#/components/schemas/OpenAppDTO' required: true responses: "200": content: application/json: - example: - message: App created in environment successfully schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' + type: object description: 应用在指定环境创建成功 "400": content: application/json: - example: - message: appId should not be null or empty schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 请求参数错误 "403": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 权限不足 - summary: 在指定环境创建应用 + summary: 在指定环境创建应用(new added) tags: - App Management x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: App Management /openapi/v1/apps/{appId}/miss_envs: get: deprecated: false description: "GET /openapi/v1/apps/{appId}/miss_envs" + operationId: findMissEnvs parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -542,35 +590,30 @@ paths: "200": content: application/json: - example: - - UAT - - PRO schema: - items: - type: string - type: array + $ref: '#/components/schemas/MultiResponseEntity' description: 成功获取应用缺失的环境列表 "404": content: application/json: - example: - message: App not found schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 应用不存在 - summary: 查找缺失的环境 + summary: 查找缺失的环境(new added) tags: - App Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: App Management /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}: delete: deprecated: false - description: "DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" + description: "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" + operationId: deleteItem parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -578,7 +621,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -586,7 +629,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -594,7 +637,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -602,7 +645,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 配置项键名 explode: false in: path name: key @@ -610,7 +653,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 操作人用户名 explode: true in: query name: operator @@ -623,21 +666,22 @@ paths: content: application/json: schema: - properties: {} + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' type: object - description: "" - summary: 删除配置项 + description: 配置项删除成功 + summary: 删除配置项 (original openapi) tags: - Item Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Item Management get: deprecated: false - description: "GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" + description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" + operationId: getItem parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -645,7 +689,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -653,7 +697,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -661,7 +705,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -669,7 +713,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 配置项键名 explode: false in: path name: key @@ -691,26 +735,26 @@ paths: value: "8080" comment: 服务器端口配置 schema: - $ref: "#/components/schemas/OpenItemDTO" + $ref: '#/components/schemas/OpenItemDTO' description: 成功获取配置项 "404": content: application/json: - example: - message: Configuration item not found schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 配置项不存在 - summary: 获取单个配置项 + summary: 获取单个配置项 (original openapi) tags: - Item Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Item Management put: deprecated: false - description: "PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" + description: "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" + operationId: updateItem parameters: - description: "" explode: false @@ -720,7 +764,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -728,7 +772,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -736,7 +780,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -759,69 +803,62 @@ paths: name: createIfNotExists required: true schema: + default: false type: boolean style: form requestBody: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/OpenItemDTO" - description: "" - required: - - dataChangeLastModifiedBy - - key - - value - type: object + $ref: '#/components/schemas/OpenItemDTO' required: true responses: "200": content: application/json: - example: - message: Configuration item updated successfully schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' + type: object description: 配置项更新成功 "400": content: application/json: - example: - message: "key, value and dataChangeLastModifiedBy should not be null\ - \ or empty" schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 请求参数错误 "403": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 权限不足 "404": content: application/json: - example: - message: Configuration item not found schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 配置项不存在 - summary: 更新配置项 + summary: 更新配置项 (original openapi) tags: - Item Management x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Item Management /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: get: deprecated: false - description: "" + description: 获取指定命名空间的配置项列表,支持分页 + operationId: findItemsByNamespace parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -829,7 +866,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -837,7 +874,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -845,7 +882,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -853,22 +890,24 @@ paths: schema: type: string style: simple - - description: "" + - description: 页码,从0开始 example: 0 explode: true in: query name: page required: true schema: + minimum: 0 type: integer style: form - - description: "" + - description: 每页数量 example: 50 explode: true in: query name: size required: true schema: + minimum: 0 type: integer style: form responses: @@ -905,28 +944,28 @@ paths: value: INFO comment: 日志级别配置 schema: - $ref: "#/components/schemas/OpenPageDTOOpenItemDTO" + $ref: '#/components/schemas/OpenPageDTOOpenItemDTO' description: 成功获取配置项列表 "404": content: application/json: - example: - message: Namespace not found schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 命名空间不存在 - summary: 获取命名空间下的配置项列表 + summary: 获取命名空间下的配置项列表 (original openapi) tags: - Item Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Item Management post: deprecated: false - description: "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items" + description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items" + operationId: createItem parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -934,7 +973,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -942,7 +981,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -950,7 +989,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -958,18 +997,19 @@ paths: schema: type: string style: simple + - description: 操作人用户名 + explode: true + in: query + name: operator + required: true + schema: + type: string + style: form requestBody: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/OpenItemDTO" - description: "" - required: - - dataChangeCreatedBy - - key - - value - type: object + $ref: '#/components/schemas/OpenItemDTO' required: true responses: "200": @@ -985,36 +1025,36 @@ paths: value: "8080" comment: 服务器端口配置 schema: - $ref: "#/components/schemas/OpenItemDTO" + $ref: '#/components/schemas/OpenItemDTO' description: 配置项创建成功 "400": content: application/json: - example: - message: key and dataChangeCreatedBy should not be null or empty schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 请求参数错误 "403": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 权限不足 - summary: 创建新的配置项 + summary: 创建新的配置项 (original openapi) tags: - Item Management x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Item Management /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}: delete: deprecated: false - description: "DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" + description: "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" + operationId: deleteItemByEncodedKey parameters: - description: "" explode: false @@ -1069,19 +1109,20 @@ paths: content: application/json: schema: - properties: {} + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' type: object description: "" - summary: 通过编码的key删除配置项 + summary: 通过编码的key删除配置项 (original openapi) tags: - Item Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Item Management get: deprecated: false - description: "GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false}" + description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" + operationId: getItemByEncodedKey parameters: - description: "" explode: false @@ -1091,7 +1132,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -1099,7 +1140,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -1107,7 +1148,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -1115,7 +1156,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 配置项键名(需要URL编码) explode: false in: path name: key @@ -1137,28 +1178,28 @@ paths: value: jdbc:mysql://localhost:3306/apollo?useUnicode=true&characterEncoding=utf8 comment: 数据库连接地址,包含特殊字符 schema: - $ref: "#/components/schemas/OpenItemDTO" + $ref: '#/components/schemas/OpenItemDTO' description: 成功获取配置项(支持编码key) "404": content: application/json: - example: - message: Configuration item not found schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 配置项不存在 - summary: 通过查询参数获取配置项(支持编码的key) + summary: 通过查询参数获取配置项(支持编码的key) (original openapi) tags: - Item Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Item Management put: deprecated: false - description: "PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" + description: "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" + operationId: updateItemByEncodedKey parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -1166,7 +1207,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -1174,7 +1215,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -1182,7 +1223,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -1190,7 +1231,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 配置项键名(需要URL编码) explode: false in: path name: key @@ -1198,74 +1239,67 @@ paths: schema: type: string style: simple - - description: "" + - description: 若不存在则创建(true/false) example: "false" explode: true in: query name: createIfNotExists required: true schema: + default: false type: boolean style: form requestBody: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/OpenItemDTO" - description: "" - required: - - dataChangeLastModifiedBy - - key - - value - type: object + $ref: '#/components/schemas/OpenItemDTO' required: true responses: "200": content: application/json: - example: - message: Configuration item updated successfully schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' + type: object description: 配置项更新成功(编码key) "400": content: application/json: - example: - message: "key, value and dataChangeLastModifiedBy should not be null\ - \ or empty" schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 请求参数错误 "403": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 权限不足 "404": content: application/json: - example: - message: Configuration item not found schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 配置项不存在 - summary: 通过编码的key更新配置项 + summary: 通过编码的key更新配置项 (original openapi) tags: - Item Management x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Item Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate: put: deprecated: false - description: "PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate" + description: "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate:" + operationId: batchUpdateItemsByText parameters: - description: "" explode: false @@ -1299,58 +1333,51 @@ paths: schema: type: string style: simple + - description: 操作人用户名 + explode: true + in: query + name: operator + required: true + schema: + type: string + style: form requestBody: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/NamespaceTextModel" - description: "" - required: - - configText - - format - - operator - type: object + $ref: '#/components/schemas/OpenNamespaceTextModel' required: true responses: "200": content: application/json: - example: - message: Batch update configuration items successfully schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' + type: object description: 批量更新配置项成功 - "400": - content: - application/json: - example: - message: operator should not be null or empty - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 请求参数错误 "403": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 权限不足 - summary: 通过文本批量修改配置项 + summary: 通过文本批量修改配置项 (new added) tags: - Item Management x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Item Management /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: get: deprecated: false - description: "GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items" + description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items:" + operationId: getBranchItems parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -1358,7 +1385,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -1366,7 +1393,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -1374,7 +1401,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -1382,7 +1409,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 分支名称 explode: false in: path name: branchName @@ -1413,30 +1440,30 @@ paths: comment: 测试调试级别 schema: items: - $ref: "#/components/schemas/OpenItemDTO" + $ref: '#/components/schemas/OpenItemDTO' type: array description: 成功获取分支下的配置项列表 "404": content: application/json: - example: - message: Branch not found schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 分支不存在 - summary: 获取分支下的配置项 + summary: 获取分支下的配置项 (new added) tags: - - Namespace Branch Management - x-accepts: - - application/json + - Item Management + x-accepts: application/json x-tags: - - tag: Namespace Branch Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare: + - tag: Item Management + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare: post: deprecated: false - description: "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare" + description: "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare" + operationId: compareItems parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -1444,7 +1471,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -1452,7 +1479,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -1460,7 +1487,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -1472,13 +1499,7 @@ paths: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/NamespaceSyncModel" - description: "" - required: - - syncItems - - syncToNamespaces - type: object + $ref: '#/components/schemas/OpenNamespaceSyncModel' required: true responses: "200": @@ -1542,23 +1563,23 @@ paths: extInfo: "" schema: items: - $ref: "#/components/schemas/ListItemDiffs" + $ref: '#/components/schemas/OpenItemDiffs' type: array description: 成功对比命名空间配置差异 - summary: 对比命名空间配置差异 + summary: 对比命名空间配置差异 (new added) tags: - Item Management x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Item Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync: post: deprecated: false - description: "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync" + description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync:" + operationId: syncItems parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -1566,7 +1587,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -1590,55 +1611,57 @@ paths: schema: type: string style: simple + - description: 操作人用户名 + explode: true + in: query + name: operator + required: true + schema: + type: string + style: form requestBody: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/NamespaceSyncModel" - description: "" - required: - - syncItems - - syncToNamespaces - type: object + $ref: '#/components/schemas/OpenNamespaceSyncModel' required: true responses: "200": content: application/json: - example: - message: Configuration items synced successfully to target namespaces schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' + type: object description: 配置项同步成功 "400": content: application/json: - example: - message: syncToNamespaces should not be null or empty schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 请求参数错误 "403": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 权限不足 - summary: 同步配置项到多个命名空间 + summary: 同步配置项到多个命名空间 (new added) tags: - Item Management x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Item Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate: post: deprecated: false - description: "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate" + description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate" + operationId: validateItems parameters: - description: "" explode: false @@ -1676,48 +1699,37 @@ paths: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/NamespaceTextModel" - description: "" - required: - - configText - - format - type: object + $ref: '#/components/schemas/OpenNamespaceTextModel' required: true responses: "200": content: application/json: - example: - valid: true - message: Configuration syntax is valid schema: - $ref: "#/components/schemas/_openapi_v1_envs__env__apps__appId__clusters__clusterName__namespaces__namespaceName__items_validate_post_200_response" + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' + type: object description: 配置文本语法验证通过 "400": content: application/json: - example: - valid: false - message: Configuration syntax validation failed - errors: - - "Line 3: Invalid property format" - - "Line 7: Missing value for key \"database.port\"" schema: - $ref: "#/components/schemas/_openapi_v1_envs__env__apps__appId__clusters__clusterName__namespaces__namespaceName__items_validate_post_400_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 配置文本语法错误 - summary: 验证配置文本语法 + summary: 验证配置文本语法 (new added) tags: - Item Management x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Item Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert: post: deprecated: false - description: "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert" + description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert" + operationId: revertItems parameters: - description: "" explode: false @@ -1751,43 +1763,59 @@ paths: schema: type: string style: simple + - description: 操作人用户名 + explode: true + in: query + name: operator + required: true + schema: + type: string + style: form responses: "200": content: application/json: - example: - message: Configuration changes reverted successfully schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' + type: object description: 配置项更改撤销成功 "400": content: application/json: - example: - message: Invalid revert request schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 请求参数错误 "403": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 权限不足 - summary: 撤销配置项更改 + summary: 撤销配置项更改 (new added) tags: - Item Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Item Management - /openapi/v1/apps/{appId}/clusters/{clusterName}: - get: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}: + delete: deprecated: false - description: "GET /openapi/v1/apps/{appId}/clusters/{clusterName}" + description: "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}" + operationId: deleteCluster parameters: + - description: "" + explode: false + in: path + name: env + required: true + schema: + type: string + style: simple - description: "" explode: false in: path @@ -1804,39 +1832,57 @@ paths: schema: type: string style: simple + - description: 操作人用户名 + explode: true + in: query + name: operator + required: true + schema: + type: string + style: form responses: "200": content: application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: ops-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-18T09:15:00.000Z - name: production - appId: sample-app schema: - $ref: "#/components/schemas/OpenClusterDTO" - description: 成功获取集群信息 + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' + type: object + description: 集群删除成功 + "400": + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object + description: 删除失败,集群可能包含配置 + "403": + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object + description: 权限不足 "404": content: application/json: - example: - message: Cluster not found schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 集群不存在 - summary: 获取指定集群信息 + summary: 删除集群 (new added) tags: - Cluster Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Cluster Management - /openapi/v1/apps/{appId}/clusters: - post: + get: deprecated: false - description: "POST /openapi/v1/apps/{appId}/clusters" + description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}" + operationId: getCluster parameters: - description: "" explode: false @@ -1846,71 +1892,57 @@ paths: schema: type: string style: simple - requestBody: - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/OpenClusterDTO" - description: "" - required: - - appId - - dataChangeCreatedBy - - name - type: object + - description: "" + explode: false + in: path + name: clusterName + required: true + schema: + type: string + style: simple + - description: "" + explode: false + in: path + name: env required: true + schema: + type: string + style: simple responses: "200": content: application/json: example: dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo + dataChangeLastModifiedBy: ops-user dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - name: test-cluster + dataChangeLastModifiedTime: 2024-01-18T09:15:00.000Z + name: production appId: sample-app schema: - $ref: "#/components/schemas/OpenClusterDTO" - description: 集群创建成功 - "400": - content: - application/json: - example: - message: name and dataChangeCreatedBy should not be null or empty - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 请求参数错误 - "403": + $ref: '#/components/schemas/OpenClusterDTO' + description: 成功获取集群信息 + "404": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 权限不足 - summary: 创建集群 + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object + description: 集群不存在 + summary: 获取指定集群信息 (original openapi) tags: - Cluster Management - x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Cluster Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}: - delete: + /openapi/v1/envs/{env}/apps/{appId}/clusters: + post: deprecated: false - description: "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}" + description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters" + operationId: createCluster parameters: - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -1918,60 +1950,63 @@ paths: schema: type: string style: simple - - description: "" - explode: false + - explode: false in: path - name: clusterName + name: env required: true schema: type: string style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenClusterDTO' + required: true responses: "200": content: application/json: example: - message: Cluster deleted successfully + dataChangeCreatedBy: apollo + dataChangeLastModifiedBy: apollo + dataChangeCreatedTime: 2024-01-15T10:30:00.000Z + dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z + name: test-cluster + appId: sample-app schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 集群删除成功 + $ref: '#/components/schemas/OpenClusterDTO' + description: 集群创建成功 "400": content: application/json: - example: - message: Cannot delete cluster with existing configurations schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 删除失败,集群可能包含配置 + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object + description: 请求参数错误 "403": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 权限不足 - "404": - content: - application/json: - example: - message: Cluster not found - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 集群不存在 - summary: 删除集群 + summary: 创建集群 (original openapi) tags: - Cluster Management - x-accepts: - - application/json + x-content-type: application/json + x-accepts: application/json x-tags: - tag: Cluster Management /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases: post: deprecated: false - description: "" + description: 创建发布 + operationId: createRelease parameters: - - description: "" + - description: app标识 explode: false in: path name: appId @@ -1979,7 +2014,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -1995,7 +2030,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -2007,13 +2042,7 @@ paths: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/NamespaceReleaseDTO" - description: "" - required: - - releaseTitle - - releasedBy - type: object + $ref: '#/components/schemas/NamespaceReleaseDTO' required: true responses: "200": @@ -2035,38 +2064,38 @@ paths: logging.level.root: INFO comment: 首次发布,包含基础配置 schema: - $ref: "#/components/schemas/OpenReleaseDTO" + $ref: '#/components/schemas/OpenReleaseDTO' description: 发布创建成功 "400": content: application/json: - example: - message: Params(releaseTitle and releasedBy) can not be empty schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 发布参数错误 "403": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 权限不足 - summary: 创建发布 + summary: 创建发布 (original openapi) tags: - Release Management x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Release Management /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest: get: deprecated: false - description: "" + description: 查询命名空间最新活跃发布 + operationId: loadLatestActiveRelease parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -2074,7 +2103,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -2082,7 +2111,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -2090,7 +2119,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -2119,29 +2148,29 @@ paths: app.version: 1.2.0 comment: 最新生产发布版本,包含性能优化 schema: - $ref: "#/components/schemas/OpenReleaseDTO" + $ref: '#/components/schemas/OpenReleaseDTO' description: 成功获取最新活跃发布 "404": content: application/json: - example: - message: No active release found for this namespace schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 未找到活跃发布 - summary: 获取最新活跃发布 + summary: 获取最新活跃发布 (original openapi) tags: - Release Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Release Management /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge: post: deprecated: false - description: "" + description: 合并灰度分支并可选择删除分支 + operationId: merge parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -2149,7 +2178,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -2157,7 +2186,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -2165,7 +2194,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -2173,7 +2202,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 分支名称 explode: false in: path name: branchName @@ -2181,7 +2210,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 合并后是否删除分支(true/false) example: "true" explode: true in: query @@ -2194,13 +2223,7 @@ paths: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/NamespaceReleaseDTO" - description: "" - required: - - releaseTitle - - releasedBy - type: object + $ref: '#/components/schemas/NamespaceReleaseDTO' required: true responses: "200": @@ -2223,38 +2246,38 @@ paths: feature.new-feature: enabled comment: 合并功能分支到主分支,包含新功能配置 schema: - $ref: "#/components/schemas/OpenReleaseDTO" + $ref: '#/components/schemas/OpenReleaseDTO' description: 分支合并成功 "400": content: application/json: - example: - message: releaseTitle and releasedBy should not be null or empty schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 合并参数错误 "403": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 权限不足 - summary: 合并分支 + summary: 合并分支 (original openapi) tags: - - Namespace Branch Management + - Release Management x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json x-tags: - - tag: Namespace Branch Management + - tag: Release Management /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases: post: deprecated: false - description: "" + description: 创建灰度发布 + operationId: createGrayRelease parameters: - - description: "" + - description: app标识 explode: false in: path name: appId @@ -2262,7 +2285,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -2270,7 +2293,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -2278,7 +2301,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -2286,7 +2309,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 分支名称 explode: false in: path name: branchName @@ -2298,13 +2321,7 @@ paths: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/NamespaceReleaseDTO" - description: "" - required: - - releaseTitle - - releasedBy - type: object + $ref: '#/components/schemas/NamespaceReleaseDTO' required: true responses: "200": @@ -2325,20 +2342,20 @@ paths: : "" comment: "" schema: - $ref: "#/components/schemas/OpenReleaseDTO" - description: "" - summary: 创建灰度发布 + $ref: '#/components/schemas/OpenReleaseDTO' + description: 灰度发布创建成功 + summary: 创建灰度发布 (original openapi) tags: - - Namespace Branch Management + - Release Management x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json x-tags: - - tag: Namespace Branch Management + - tag: Release Management /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases: post: deprecated: false description: "" + operationId: createGrayDelRelease parameters: - description: "" explode: false @@ -2384,14 +2401,7 @@ paths: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/NamespaceGrayDelReleaseDTO" - description: "" - required: - - grayDelKeys - - releaseTitle - - releasedBy - type: object + $ref: '#/components/schemas/NamespaceGrayDelReleaseDTO' required: true responses: "200": @@ -2412,22 +2422,22 @@ paths: : "" comment: "" schema: - $ref: "#/components/schemas/OpenReleaseDTO" + $ref: '#/components/schemas/OpenReleaseDTO' description: "" - summary: 创建灰度删除发布 + summary: 创建灰度删除发布 (original openapi) tags: - - Namespace Branch Management + - Release Management x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json x-tags: - - tag: Namespace Branch Management + - tag: Release Management /openapi/v1/envs/{env}/releases/{releaseId}/rollback: put: deprecated: false - description: "" + description: 回滚到指定的发布版本 + operationId: rollback parameters: - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -2435,15 +2445,16 @@ paths: schema: type: string style: simple - - description: "" + - description: 发布ID explode: false in: path name: releaseId required: true schema: + format: int64 type: integer style: simple - - description: "" + - description: 操作人用户名 explode: true in: query name: operator @@ -2456,22 +2467,23 @@ paths: content: application/json: schema: - properties: {} + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' type: object - description: "" - summary: 回滚发布 + description: 发布回滚成功 + summary: 回滚发布 (original openapi) tags: - Release Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Release Management /openapi/v1/envs/{env}/releases/{releaseId}: get: deprecated: false description: "GET /openapi/v1/envs/{env}/releases/{releaseId}" + operationId: getReleaseById parameters: - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -2479,7 +2491,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 发布ID explode: false in: path name: releaseId @@ -2506,21 +2518,21 @@ paths: : "" comment: "" schema: - $ref: "#/components/schemas/OpenReleaseDTO" - description: "" - summary: 获取发布详情 + $ref: '#/components/schemas/OpenReleaseDTO' + description: 成功获取发布详情 + summary: 获取发布详情 (new added) tags: - Release Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Release Management /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all: get: deprecated: false description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all" + operationId: findAllReleases parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -2528,7 +2540,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -2536,7 +2548,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -2544,7 +2556,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -2552,7 +2564,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 页码,从0开始 example: 0 explode: true in: query @@ -2561,7 +2573,7 @@ paths: schema: type: integer style: form - - description: "" + - description: 每页数量 example: 5 explode: true in: query @@ -2596,22 +2608,22 @@ paths: value: "" schema: items: - $ref: "#/components/schemas/ListReleaseBO" + $ref: '#/components/schemas/OpenReleaseBO' type: array - description: "" - summary: 获取所有发布(分页) + description: 成功获取发布列表 + summary: 获取所有发布(分页) (new added) tags: - Release Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Release Management /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active: get: deprecated: false description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active" + operationId: findActiveReleases parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -2619,7 +2631,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -2627,7 +2639,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -2635,7 +2647,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -2643,7 +2655,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 页码,从0开始 example: 0 explode: true in: query @@ -2652,7 +2664,7 @@ paths: schema: type: integer style: form - - description: "" + - description: 每页数量 example: 5 explode: true in: query @@ -2681,75 +2693,29 @@ paths: comment: "" schema: items: - $ref: "#/components/schemas/OpenReleaseDTO" + $ref: '#/components/schemas/OpenReleaseDTO' type: array - description: "" - summary: 获取活跃发布(分页) + description: 成功获取活跃发布列表 + summary: 获取活跃发布(分页) (new added) tags: - Release Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Release Management - /openapi/v1/envs/{env}/releases/compare: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances: get: deprecated: false - description: "GET /openapi/v1/envs/{env}/releases/compare" + description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances" + operationId: getInstanceCountByNamespace parameters: - - description: "" - explode: false + - explode: false in: path name: env required: true schema: type: string style: simple - - description: "" - explode: true - in: query - name: baseReleaseId - required: true - schema: - type: integer - style: form - - description: "" - explode: true - in: query - name: toCompareReleaseId - required: true - schema: - type: integer - style: form - responses: - "200": - content: - application/json: - example: - changes: - - type: "" - entity: - firstEntity: - key: "" - value: "" - secondEntity: - key: "" - value: "" - schema: - $ref: "#/components/schemas/_openapi_v1_envs__env__releases_compare_get_200_response" - description: "" - summary: 对比发布 - tags: - - Release Management - x-accepts: - - application/json - x-tags: - - tag: Release Management - /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances" - parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -2757,7 +2723,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -2765,7 +2731,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -2779,12 +2745,11 @@ paths: application/json: schema: type: integer - description: "" - summary: 获取命名空间下的实例数量 + description: 成功返回实例数量 + summary: 获取命名空间下的实例数量 (original openapi) tags: - Instance Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Instance Management /openapi/v1/envs/{env}/releases/{releaseId}/instances: @@ -2859,21 +2824,20 @@ paths: dataChangeLastModifiedTime: "" dataChangeCreatedTime: "" schema: - $ref: "#/components/schemas/OpenPageDTOOpenInstanceDTO" + $ref: '#/components/schemas/OpenPageDTOOpenInstanceDTO' description: "" - summary: 根据发布版本查询实例(支持分页) + summary: 根据发布版本查询实例(支持分页) (new added) tags: - Instance Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Instance Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int: get: deprecated: false description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3" parameters: - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -2881,7 +2845,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -2889,7 +2853,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -2897,7 +2861,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -2943,20 +2907,20 @@ paths: dataChangeCreatedTime: "" schema: items: - $ref: "#/components/schemas/OpenInstanceDTO" + $ref: '#/components/schemas/OpenInstanceDTO' type: array description: "" - summary: 查询不在指定发布版本中的实例 + summary: 查询不在指定发布版本中的实例 (new added) tags: - Instance Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Instance Management /openapi/v1/apps/{appId}/appnamespaces: get: deprecated: false description: "GET /openapi/v1/apps/{appId}/appnamespaces" + operationId: getAppNamespacesByApp parameters: - description: "" explode: false @@ -2983,19 +2947,19 @@ paths: comment: "" schema: items: - $ref: "#/components/schemas/OpenAppNamespaceDTO" + $ref: '#/components/schemas/OpenAppNamespaceDTO' type: array description: "" - summary: 获取指定应用的AppNamespace + summary: 获取指定应用的AppNamespace (new added) tags: - Namespace Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Namespace Management post: deprecated: false description: "POST /openapi/v1/apps/{appId}/appnamespaces" + operationId: createNamespace parameters: - description: "" explode: false @@ -3009,15 +2973,7 @@ paths: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/OpenAppNamespaceDTO" - description: "" - required: - - appId - - dataChangeCreatedBy - - format - - name - type: object + $ref: '#/components/schemas/OpenAppNamespaceDTO' required: true responses: "200": @@ -3035,37 +2991,36 @@ paths: appendNamespacePrefix: true comment: 数据库相关配置命名空间 schema: - $ref: "#/components/schemas/OpenAppNamespaceDTO" + $ref: '#/components/schemas/OpenAppNamespaceDTO' description: AppNamespace创建成功 "400": content: application/json: - example: - message: "appId, name, format and dataChangeCreatedBy should not be\ - \ null or empty" schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 请求参数错误 "403": content: application/json: - example: - message: Access is denied schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 权限不足 - summary: 创建AppNamespace + summary: 创建AppNamespace (original openapi) tags: - Namespace Management x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Namespace Management /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces: get: deprecated: false description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces" + operationId: findNamespaces parameters: - description: "" explode: false @@ -3098,6 +3053,7 @@ paths: name: fillItemDetail required: true schema: + default: true type: boolean style: form responses: @@ -3126,20 +3082,20 @@ paths: comment: "" schema: items: - $ref: "#/components/schemas/OpenNamespaceDTO" + $ref: '#/components/schemas/OpenNamespaceDTO' type: array description: "" - summary: 获取指定集群下的所有Namespace + summary: 获取指定集群下的所有Namespace (original openapi) tags: - Namespace Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Namespace Management /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}: get: deprecated: false description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}" + operationId: loadNamespace parameters: - description: "" explode: false @@ -3180,6 +3136,7 @@ paths: name: fillItemDetail required: true schema: + default: true type: boolean style: form responses: @@ -3207,19 +3164,19 @@ paths: value: "" comment: "" schema: - $ref: "#/components/schemas/OpenNamespaceDTO" + $ref: '#/components/schemas/OpenNamespaceDTO' description: "" - summary: 获取指定的Namespace + summary: 获取指定的Namespace (original openapi) tags: - - Cluster Management - x-accepts: - - application/json + - Namespace Management + x-accepts: application/json x-tags: - - tag: Cluster Management + - tag: Namespace Management /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock: get: deprecated: false description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock" + operationId: getNamespaceLock parameters: - description: "" explode: false @@ -3262,19 +3219,19 @@ paths: isLocked: false lockedBy: "" schema: - $ref: "#/components/schemas/OpenNamespaceLockDTO" + $ref: '#/components/schemas/OpenNamespaceLockDTO' description: "" - summary: 获取Namespace的锁状态 + summary: 获取Namespace的锁状态 (original openapi) tags: - Namespace Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Namespace Management /openapi/v1/appnamespaces: get: deprecated: false description: GET /openapi/v1/appnamespaces?public=true + operationId: getAppNamespaces parameters: - description: "" example: "false" @@ -3302,22 +3259,22 @@ paths: comment: "" schema: items: - $ref: "#/components/schemas/OpenAppNamespaceDTO" + $ref: '#/components/schemas/OpenAppNamespaceDTO' type: array description: "" - summary: 获取所有公共AppNamespace + summary: 获取所有公共AppNamespace (new added) tags: - Namespace Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Namespace Management /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}: delete: deprecated: false description: "DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}" + operationId: deleteAppNamespace parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -3325,7 +3282,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -3333,26 +3290,35 @@ paths: schema: type: string style: simple + - description: 操作人用户名 + explode: true + in: query + name: operator + required: true + schema: + type: string + style: form responses: "200": content: application/json: schema: - properties: {} + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' type: object - description: "" - summary: 删除AppNamespace + description: AppNamespace删除成功 + summary: 删除AppNamespace (new added) tags: - - App Management - x-accepts: - - application/json + - Namespace Management + x-accepts: application/json x-tags: - - tag: App Management + - tag: Namespace Management get: deprecated: false description: "GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}" + operationId: getAppNamespace parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -3360,7 +3326,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -3384,21 +3350,21 @@ paths: appendNamespacePrefix: false comment: "" schema: - $ref: "#/components/schemas/OpenAppNamespaceDTO" - description: "" - summary: 获取指定的AppNamespace + $ref: '#/components/schemas/OpenAppNamespaceDTO' + description: 成功获取AppNamespace + summary: 获取指定的AppNamespace (new added) tags: - Namespace Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Namespace Management /openapi/v1/apps/{appId}/namespaces/releases/status: get: deprecated: false description: "GET /openapi/v1/apps/{appId}/namespaces/releases/status" + operationId: getNamespacesReleaseStatus parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -3410,30 +3376,22 @@ paths: "200": content: application/json: - example: - ? "" - : ? "" - : false schema: - additionalProperties: - additionalProperties: - type: boolean - type: object - type: object - description: "" - summary: 获取应用下所有Namespace的发布状态 + $ref: '#/components/schemas/StringToStringBoolMap' + description: 成功获取发布状态映射 + summary: 获取应用下所有Namespace的发布状态 (new added) tags: - - App Management - x-accepts: - - application/json + - Namespace Management + x-accepts: application/json x-tags: - - tag: App Management + - tag: Namespace Management /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances: get: deprecated: false description: "GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances" + operationId: getPublicAppNamespaceInstances parameters: - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -3441,7 +3399,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 公共命名空间名称 explode: false in: path name: publicNamespaceName @@ -3449,7 +3407,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 页码,从0开始 example: 0 explode: true in: query @@ -3458,7 +3416,7 @@ paths: schema: type: integer style: form - - description: "" + - description: 每页数量 example: 10 explode: true in: query @@ -3493,22 +3451,22 @@ paths: comment: "" schema: items: - $ref: "#/components/schemas/OpenNamespaceDTO" + $ref: '#/components/schemas/OpenNamespaceDTO' type: array - description: "" - summary: 获取公共AppNamespace的所有实例 + description: 成功获取实例列表 + summary: 获取公共AppNamespace的所有实例 (new added) tags: - Namespace Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Namespace Management /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association: get: deprecated: false description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association" + operationId: getPublicNamespaceAssociation parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -3516,7 +3474,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -3524,7 +3482,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -3532,7 +3490,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -3565,21 +3523,21 @@ paths: value: "" comment: "" schema: - $ref: "#/components/schemas/OpenNamespaceDTO" - description: "" - summary: 获取关联的公共Namespace + $ref: '#/components/schemas/OpenNamespaceDTO' + description: 成功获取关联的公共Namespace + summary: 获取关联的公共Namespace (new added) tags: - Namespace Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Namespace Management /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check: get: deprecated: false description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check" + operationId: checkNamespaceIntegrity parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -3587,7 +3545,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -3595,7 +3553,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -3613,20 +3571,20 @@ paths: items: type: string type: array - description: "" - summary: 检查缺失的Namespace + description: 缺失的命名空间名称列表 + summary: 检查缺失的Namespace (new added) tags: - Namespace Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Namespace Management /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links: delete: deprecated: false description: "DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links" + operationId: deleteNamespaceLinks parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -3634,7 +3592,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -3642,7 +3600,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -3650,7 +3608,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -3658,25 +3616,34 @@ paths: schema: type: string style: simple + - description: 操作人用户名 + explode: true + in: query + name: operator + required: true + schema: + type: string + style: form responses: "200": content: application/json: schema: - properties: {} + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' type: object - description: "" - summary: 删除关联的Namespace + description: 解除关联成功 + summary: 删除关联的Namespace (new added) tags: - - App Management - x-accepts: - - application/json + - Namespace Management + x-accepts: application/json x-tags: - - tag: App Management + - tag: Namespace Management /openapi/v1/organizations: get: deprecated: false description: GET /openapi/v1/organizations + operationId: getOrganization responses: "200": content: @@ -3691,30 +3658,30 @@ paths: schema: description: 组织列表 items: - $ref: "#/components/schemas/OpenOrganizationDto" + $ref: '#/components/schemas/OpenOrganizationDto' type: array description: 成功获取组织列表 "401": content: application/json: - example: - message: Unauthorized schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 未授权访问 - summary: 获取所有组织信息 + summary: 获取所有组织信息 (original openapi) tags: - Organization Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Organization Management /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches: get: deprecated: false description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches" + operationId: findBranch parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -3722,7 +3689,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -3730,7 +3697,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -3738,7 +3705,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -3779,29 +3746,28 @@ paths: value: debug comment: 测试模式配置 schema: - $ref: "#/components/schemas/OpenNamespaceDTO" - description: "" + $ref: '#/components/schemas/OpenNamespaceDTO' + description: 成功获取分支信息 "404": content: application/json: - example: - message: Branch not found for this namespace schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + allOf: + - $ref: '#/components/schemas/ExceptionResponse' + type: object description: 分支不存在 - summary: 获取命名空间分支信息 + summary: 获取命名空间分支信息 (original openapi) tags: - - Cluster Management - x-accepts: - - application/json + - Namespace Branch Management + x-accepts: application/json x-tags: - - tag: Cluster Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch: + - tag: Namespace Branch Management post: deprecated: false - description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch" + description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches" + operationId: createBranch parameters: - - description: "" + - description: app标识 explode: false in: path name: appId @@ -3809,7 +3775,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -3817,7 +3783,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -3825,7 +3791,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -3833,7 +3799,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 操作人用户名 explode: true in: query name: operator @@ -3866,21 +3832,21 @@ paths: value: "" comment: "" schema: - $ref: "#/components/schemas/OpenNamespaceDTO" - description: "" - summary: 创建命名空间分支 + $ref: '#/components/schemas/OpenNamespaceDTO' + description: 命名空间分支创建成功 + summary: 创建命名空间分支 (original openapi) tags: - Namespace Branch Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Namespace Branch Management /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}: delete: deprecated: false description: "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}" + operationId: deleteBranch parameters: - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -3888,7 +3854,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -3896,7 +3862,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -3904,7 +3870,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -3912,7 +3878,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 分支名称 explode: false in: path name: branchName @@ -3920,7 +3886,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 操作人用户名 explode: true in: query name: operator @@ -3933,14 +3899,14 @@ paths: content: application/json: schema: - properties: {} + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' type: object - description: "" - summary: 删除命名空间分支 + description: 分支删除成功 + summary: 删除命名空间分支 (original openapi) tags: - Namespace Branch Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Namespace Branch Management patch: @@ -3949,8 +3915,9 @@ paths: PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从"独立"更新为"合并") + operationId: mergeBranch parameters: - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -3958,7 +3925,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -3966,7 +3933,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -3974,7 +3941,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -3982,7 +3949,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 分支名称 explode: false in: path name: branchName @@ -3990,7 +3957,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 合并后是否删除分支(true/false) example: "true" explode: true in: query @@ -3999,25 +3966,19 @@ paths: schema: type: boolean style: form - - description: "" - explode: false - in: header - name: X-Apollo-Operator + - description: 操作人用户名 + explode: true + in: query + name: operator required: true schema: type: string - style: simple + style: form requestBody: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/NamespaceReleaseDTO" - description: "" - required: - - releaseTitle - - releasedBy - type: object + $ref: '#/components/schemas/NamespaceReleaseDTO' required: true responses: "200": @@ -4038,22 +3999,22 @@ paths: : "" comment: "" schema: - $ref: "#/components/schemas/OpenReleaseDTO" - description: "" - summary: 合并分支到主分支 + $ref: '#/components/schemas/OpenReleaseDTO' + description: 分支合并成功 + summary: 合并分支到主分支 (new added) tags: - Namespace Branch Management x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Namespace Branch Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules: get: deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules" + description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules" + operationId: getBranchGrayRules parameters: - - description: "" + - description: app标识 explode: false in: path name: appId @@ -4061,7 +4022,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -4069,7 +4030,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -4077,7 +4038,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -4085,7 +4046,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 分支名称 explode: false in: path name: branchName @@ -4113,20 +4074,20 @@ paths: clientLabelList: - "" schema: - $ref: "#/components/schemas/OpenGrayReleaseRuleDTO" - description: "" - summary: 获取分支灰度发布规则 + $ref: '#/components/schemas/OpenGrayReleaseRuleDTO' + description: 成功获取灰度发布规则 + summary: 获取分支灰度发布规则 (original openapi) tags: - Namespace Branch Management - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Namespace Branch Management put: deprecated: false - description: "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules" + description: "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules" + operationId: updateBranchRules parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -4134,7 +4095,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -4142,7 +4103,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -4150,7 +4111,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -4158,7 +4119,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 分支名称 explode: false in: path name: branchName @@ -4166,39 +4127,34 @@ paths: schema: type: string style: simple - - description: "" - explode: false - in: header + - description: 操作人用户名 + explode: true + in: query name: operator required: true schema: type: string - style: simple + style: form requestBody: content: application/json: schema: - allOf: - - $ref: "#/components/schemas/OpenGrayReleaseRuleDTO" - description: "" - required: - - ruleItems - type: object + $ref: '#/components/schemas/OpenGrayReleaseRuleDTO' required: true responses: "200": content: application/json: schema: - properties: {} + allOf: + - $ref: '#/components/schemas/SuccessEmptyResponse' type: object - description: "" - summary: 更新分支灰度发布规则 + description: 灰度规则更新成功 + summary: 更新分支灰度发布规则 (original openapi) tags: - Namespace Branch Management x-content-type: application/json - x-accepts: - - application/json + x-accepts: application/json x-tags: - tag: Namespace Branch Management components: @@ -4206,14 +4162,14 @@ components: OpenAppDTO: description: Apollo应用信息数据传输对象,包含应用的基本信息和元数据 example: - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z orgName: orgName dataChangeLastModifiedBy: dataChangeLastModifiedBy ownerName: ownerName appId: appId dataChangeCreatedBy: dataChangeCreatedBy name: name - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z orgId: orgId ownerEmail: ownerEmail properties: @@ -4225,9 +4181,11 @@ components: type: string dataChangeCreatedTime: description: 数据创建时间,ISO 8601格式的时间戳 + example: 2025-09-29T12:34:56Z type: string dataChangeLastModifiedTime: description: 数据最后修改时间,ISO 8601格式的时间戳 + example: 2025-09-29T12:34:56Z type: string name: description: 应用名称,用于显示的友好名称 @@ -4250,6 +4208,22 @@ components: type: object OpenCreateAppDTO: description: 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 + example: + app: + 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 + assignAppRoleToSelf: true + admins: + - admins + - admins properties: assignAppRoleToSelf: description: 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 @@ -4260,18 +4234,18 @@ components: type: string type: array app: - $ref: "#/components/schemas/OpenAppDTO" + $ref: '#/components/schemas/OpenAppDTO' type: object OpenItemDTO: description: Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 example: - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 value: value - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key properties: dataChangeCreatedBy: @@ -4282,9 +4256,11 @@ components: type: string dataChangeCreatedTime: description: 配置项创建时间,ISO 8601格式的时间戳 + example: 2025-09-29T12:34:56Z type: string dataChangeLastModifiedTime: description: 配置项最后修改时间,ISO 8601格式的时间戳 + example: 2025-09-29T12:34:56Z type: string key: description: 配置项的键名,在同一命名空间内唯一标识一个配置项 @@ -4306,21 +4282,21 @@ components: size: 6 page: 0 content: - - dataChangeCreatedTime: dataChangeCreatedTime + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 value: value - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key - - dataChangeCreatedTime: dataChangeCreatedTime + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 value: value - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key properties: page: @@ -4336,18 +4312,18 @@ components: content: description: 当前页的配置项列表,包含具体的配置项数据 items: - $ref: "#/components/schemas/OpenItemDTO" + $ref: '#/components/schemas/OpenItemDTO' type: array type: object OpenClusterDTO: description: Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 example: - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy appId: appId dataChangeCreatedBy: dataChangeCreatedBy name: name - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z properties: dataChangeCreatedBy: description: 集群创建者用户名,记录是谁创建了这个集群 @@ -4357,9 +4333,11 @@ components: type: string dataChangeCreatedTime: description: 集群创建时间,ISO 8601格式的时间戳 + example: 2025-09-29T12:34:56Z type: string dataChangeLastModifiedTime: description: 集群最后修改时间,ISO 8601格式的时间戳 + example: 2025-09-29T12:34:56Z type: string name: description: 集群名称,在同一应用和环境下唯一标识一个集群 @@ -4369,27 +4347,23 @@ components: type: string type: object MapString: - description: 字符串映射对象,用于表示键值对的配置数据结构 - example: - key: key - properties: - key: - type: string + additionalProperties: + type: string type: object OpenReleaseDTO: description: Apollo发布信息数据传输对象,表示一次配置发布的完整信息 example: - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy configurations: - key: key + key: configurations appId: appId clusterName: clusterName dataChangeCreatedBy: dataChangeCreatedBy name: name comment: comment id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z namespaceName: namespaceName properties: dataChangeCreatedBy: @@ -4400,9 +4374,11 @@ components: type: string dataChangeCreatedTime: description: 发布创建时间,ISO 8601格式的时间戳 + example: 2025-09-29T12:34:56Z type: string dataChangeLastModifiedTime: description: 发布最后修改时间,ISO 8601格式的时间戳 + example: 2025-09-29T12:34:56Z type: string id: description: 发布记录的唯一标识符,系统自动生成 @@ -4421,7 +4397,9 @@ components: description: 发布名称,用于标识这次发布的版本或描述 type: string configurations: - $ref: "#/components/schemas/MapString" + additionalProperties: + type: string + type: object comment: description: 发布备注,描述本次发布的变更内容和目的 type: string @@ -4479,7 +4457,7 @@ components: OpenAppNamespaceDTO: description: Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 example: - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy appendNamespacePrefix: true appId: appId @@ -4488,7 +4466,7 @@ components: format: format isPublic: true comment: comment - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z properties: dataChangeCreatedBy: description: 命名空间创建者用户名,记录是谁创建了这个应用命名空间 @@ -4498,9 +4476,11 @@ components: type: string dataChangeCreatedTime: description: 命名空间创建时间,ISO 8601格式的时间戳 + example: 2025-09-29T12:34:56Z type: string dataChangeLastModifiedTime: description: 命名空间最后修改时间,ISO 8601格式的时间戳 + example: 2025-09-29T12:34:56Z type: string name: description: 命名空间名称,在同一应用内唯一标识一个命名空间 @@ -4550,7 +4530,7 @@ components: OpenGrayReleaseRuleDTO: description: Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 example: - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy appId: appId clusterName: clusterName @@ -4571,7 +4551,7 @@ components: - clientLabelList - clientLabelList clientAppId: clientAppId - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z namespaceName: namespaceName properties: dataChangeCreatedBy: @@ -4582,9 +4562,11 @@ components: type: string dataChangeCreatedTime: description: 灰度规则创建时间,ISO 8601格式的时间戳 + example: 2025-09-29T12:34:56Z type: string dataChangeLastModifiedTime: description: 灰度规则最后修改时间,ISO 8601格式的时间戳 + example: 2025-09-29T12:34:56Z type: string appId: description: 所属应用的唯一标识符 @@ -4601,13 +4583,13 @@ components: ruleItems: description: 灰度发布规则项列表,包含具体的灰度规则条件 items: - $ref: "#/components/schemas/OpenGrayReleaseRuleItemDTO" + $ref: '#/components/schemas/OpenGrayReleaseRuleItemDTO' type: array type: object OpenNamespaceDTO: description: Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 example: - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy appId: appId clusterName: clusterName @@ -4616,23 +4598,23 @@ components: isPublic: true comment: comment items: - - dataChangeCreatedTime: dataChangeCreatedTime + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 value: value - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key - - dataChangeCreatedTime: dataChangeCreatedTime + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 value: value - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z namespaceName: namespaceName properties: dataChangeCreatedBy: @@ -4643,9 +4625,11 @@ components: type: string dataChangeCreatedTime: description: 命名空间创建时间,ISO 8601格式的时间戳 + example: 2025-09-29T12:34:56Z type: string dataChangeLastModifiedTime: description: 命名空间最后修改时间,ISO 8601格式的时间戳 + example: 2025-09-29T12:34:56Z type: string appId: description: 所属应用的唯一标识符 @@ -4668,7 +4652,7 @@ components: items: description: 命名空间包含的配置项列表 items: - $ref: "#/components/schemas/OpenItemDTO" + $ref: '#/components/schemas/OpenItemDTO' type: array type: object OpenNamespaceLockDTO: @@ -4696,74 +4680,74 @@ components: page: 0 content: - configs: - - releaseDeliveryTime: releaseDeliveryTime + - releaseDeliveryTime: 2025-09-29T12:34:56Z release: - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy configurations: - key: key + key: configurations appId: appId clusterName: clusterName dataChangeCreatedBy: dataChangeCreatedBy name: name comment: comment id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z namespaceName: namespaceName - dataChangeLastModifiedTime: dataChangeLastModifiedTime - - releaseDeliveryTime: releaseDeliveryTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z + - releaseDeliveryTime: 2025-09-29T12:34:56Z release: - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy configurations: - key: key + key: configurations appId: appId clusterName: clusterName dataChangeCreatedBy: dataChangeCreatedBy name: name comment: comment id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z namespaceName: namespaceName - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataCenter: dataCenter appId: appId clusterName: clusterName ip: ip id: 5 - configs: - - releaseDeliveryTime: releaseDeliveryTime + - releaseDeliveryTime: 2025-09-29T12:34:56Z release: - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy configurations: - key: key + key: configurations appId: appId clusterName: clusterName dataChangeCreatedBy: dataChangeCreatedBy name: name comment: comment id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z namespaceName: namespaceName - dataChangeLastModifiedTime: dataChangeLastModifiedTime - - releaseDeliveryTime: releaseDeliveryTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z + - releaseDeliveryTime: 2025-09-29T12:34:56Z release: - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy configurations: - key: key + key: configurations appId: appId clusterName: clusterName dataChangeCreatedBy: dataChangeCreatedBy name: name comment: comment id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z namespaceName: namespaceName - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataCenter: dataCenter appId: appId clusterName: clusterName @@ -4783,7 +4767,7 @@ components: content: description: 当前页的实例列表,包含具体的实例数据 items: - $ref: "#/components/schemas/OpenInstanceDTO" + $ref: '#/components/schemas/OpenInstanceDTO' type: array type: object OpenEnvClusterDTO: @@ -4794,105 +4778,26 @@ components: - clusters properties: env: - description: "" + description: 环境标识,例如 DEV、FAT、UAT、PROD type: string clusters: - description: "" + description: 该环境下的集群名称列表 items: type: string type: array type: object - ClusterDTO: - example: - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - dataChangeCreatedBy: dataChangeCreatedBy - name: name - parentClusterId: 6 - comment: comment - id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - properties: - dataChangeCreatedBy: - description: "" - type: string - dataChangeLastModifiedBy: - description: "" - type: string - dataChangeCreatedByDisplayName: - description: "" - type: string - dataChangeLastModifiedByDisplayName: - description: "" - type: string - dataChangeCreatedTime: - description: "" - type: string - dataChangeLastModifiedTime: - description: "" - type: string - id: - description: "" - format: int64 - type: integer - name: - description: "" - pattern: "[0-9a-zA-Z_-]+[0-9a-zA-Z_.-]*" - type: string - appId: - description: "" - type: string - parentClusterId: - description: "" - format: int64 - type: integer - comment: - description: "" - type: string - required: - - appId - - name - type: object - EnvClusterInfo: - example: - env: env - clusters: - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - dataChangeCreatedBy: dataChangeCreatedBy - name: name - parentClusterId: 6 - comment: comment - id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - dataChangeCreatedBy: dataChangeCreatedBy - name: name - parentClusterId: 6 - comment: comment - id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime + OpenEnvClusterInfo: properties: env: - description: "" + description: 环境标识 type: string clusters: - description: "" + description: 集群信息列表 items: - $ref: "#/components/schemas/ClusterDTO" + $ref: '#/components/schemas/OpenClusterDTO' type: array type: object - NamespaceTextModel: + OpenNamespaceTextModel: example: configText: configText namespaceId: 0 @@ -4904,32 +4809,32 @@ components: operator: operator properties: appId: - description: "" + description: 应用唯一标识 type: string env: - description: "" + description: 环境标识 type: string clusterName: - description: "" + description: 集群名称 type: string namespaceName: - description: "" + description: 命名空间名称 type: string namespaceId: - description: "" + description: 命名空间ID format: int64 type: integer format: - description: "" + description: 命名空间格式类型(properties/xml/json/yml等) type: string configText: - description: "" + description: 配置内容的原始文本 type: string operator: - description: "" + description: 操作者用户名 type: string type: object - NamespaceIdentifier: + OpenNamespaceIdentifier: example: appId: appId clusterName: clusterName @@ -4937,204 +4842,118 @@ components: namespaceName: namespaceName properties: appId: - description: "" + description: 应用唯一标识 type: string env: - description: "" + description: 环境标识 type: string clusterName: - description: "" + description: 集群名称 type: string namespaceName: - description: "" - type: string - type: object - ItemDTO: - example: - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 - comment: comment - id: 0 - value: value - key: key - properties: - dataChangeCreatedBy: - description: "" - type: string - dataChangeLastModifiedBy: - description: "" - type: string - dataChangeCreatedByDisplayName: - description: "" - type: string - dataChangeLastModifiedByDisplayName: - description: "" - type: string - dataChangeCreatedTime: - description: "" - type: string - dataChangeLastModifiedTime: - description: "" - type: string - id: - description: "" - format: int64 - type: integer - namespaceId: - description: "" - format: int64 - type: integer - key: - description: "" - type: string - type: - description: "" - type: integer - value: - description: "" - type: string - comment: - description: "" + description: 命名空间名称 type: string - lineNum: - description: "" - type: integer type: object - ItemChangeSets: + OpenItemChangeSets: example: dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy deleteItems: - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key createItems: - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key updateItems: - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z properties: dataChangeCreatedBy: - description: "" + description: 变更集合创建者用户名 type: string dataChangeLastModifiedBy: - description: "" + description: 变更集合最后修改者用户名 type: string dataChangeCreatedByDisplayName: - description: "" + description: 创建者显示名 type: string dataChangeLastModifiedByDisplayName: - description: "" + description: 最后修改者显示名 type: string dataChangeCreatedTime: - description: "" + description: 变更集合创建时间(ISO 8601) + example: 2025-09-29T12:34:56Z type: string dataChangeLastModifiedTime: - description: "" + description: 变更集合最后修改时间(ISO 8601) + example: 2025-09-29T12:34:56Z type: string createItems: default: [] - description: "" + description: 待创建的配置项列表 items: - $ref: "#/components/schemas/ItemDTO" + $ref: '#/components/schemas/OpenItemDTO' type: array updateItems: default: [] - description: "" + description: 待更新的配置项列表 items: - $ref: "#/components/schemas/ItemDTO" + $ref: '#/components/schemas/OpenItemDTO' type: array deleteItems: default: [] - description: "" + description: 待删除的配置项列表 items: - $ref: "#/components/schemas/ItemDTO" + $ref: '#/components/schemas/OpenItemDTO' type: array type: object - ListItemDiffs: + OpenItemDiffs: example: namespace: appId: appId @@ -5144,129 +4963,89 @@ components: diffs: dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy deleteItems: - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key createItems: - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key updateItems: - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z extInfo: extInfo properties: namespace: - $ref: "#/components/schemas/NamespaceIdentifier" + $ref: '#/components/schemas/OpenNamespaceIdentifier' diffs: - $ref: "#/components/schemas/ItemChangeSets" + $ref: '#/components/schemas/OpenItemChangeSets' extInfo: - description: "" + description: 扩展信息 type: string type: object - NamespaceSyncModel: + OpenNamespaceSyncModel: example: syncItems: - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key syncToNamespaces: - appId: appId @@ -5279,110 +5058,42 @@ components: namespaceName: namespaceName properties: syncToNamespaces: - description: "" + description: 目标命名空间标识列表 items: - $ref: "#/components/schemas/NamespaceIdentifier" + $ref: '#/components/schemas/OpenNamespaceIdentifier' type: array syncItems: - description: "" + description: 需要同步的配置项列表 items: - $ref: "#/components/schemas/ItemDTO" + $ref: '#/components/schemas/OpenItemDTO' type: array type: object - ReleaseDTO: - example: - dataChangeCreatedTime: dataChangeCreatedTime - configurations: configurations - dataChangeCreatedBy: dataChangeCreatedBy - releaseKey: releaseKey - dataChangeLastModifiedTime: dataChangeLastModifiedTime - isAbandoned: true - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - clusterName: clusterName - name: name - comment: comment - id: 0 - namespaceName: namespaceName - properties: - dataChangeCreatedBy: - description: "" - type: string - dataChangeLastModifiedBy: - description: "" - type: string - dataChangeCreatedByDisplayName: - description: "" - type: string - dataChangeLastModifiedByDisplayName: - description: "" - type: string - dataChangeCreatedTime: - description: "" - type: string - dataChangeLastModifiedTime: - description: "" - type: string - id: - description: "" - format: int64 - type: integer - releaseKey: - description: "" - type: string - name: - description: "" - type: string - appId: - description: "" - type: string - clusterName: - description: "" - type: string - namespaceName: - description: "" - type: string - configurations: - description: "" - type: string - comment: - description: "" - type: string - isAbandoned: - description: "" - type: boolean - type: object KVEntity: example: value: value key: key properties: key: - description: "" + description: 键 type: string value: - description: "" + description: 值 type: string type: object - ListReleaseBO: + OpenReleaseBO: example: baseInfo: - dataChangeCreatedTime: dataChangeCreatedTime - configurations: configurations - dataChangeCreatedBy: dataChangeCreatedBy - releaseKey: releaseKey - dataChangeLastModifiedTime: dataChangeLastModifiedTime - isAbandoned: true - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName + 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 items: - value: value @@ -5391,109 +5102,75 @@ components: key: key properties: baseInfo: - $ref: "#/components/schemas/ReleaseDTO" + $ref: '#/components/schemas/OpenReleaseDTO' items: - description: "" items: - $ref: "#/components/schemas/KVEntity" + $ref: '#/components/schemas/KVEntity' type: array type: object - EntityPairKVEntity: - example: - firstEntity: - value: value - key: key - secondEntity: - value: value - key: key - properties: - firstEntity: - $ref: "#/components/schemas/KVEntity" - secondEntity: - $ref: "#/components/schemas/KVEntity" - type: object - Change: - example: - type: ADDED - entity: - firstEntity: - value: value - key: key - secondEntity: - value: value - key: key - properties: - type: - description: "" - enum: - - ADDED - - MODIFIED - - DELETED - type: string - entity: - $ref: "#/components/schemas/EntityPairKVEntity" - type: object OpenInstanceConfigDTO: example: - releaseDeliveryTime: releaseDeliveryTime + releaseDeliveryTime: 2025-09-29T12:34:56Z release: - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy configurations: - key: key + key: configurations appId: appId clusterName: clusterName dataChangeCreatedBy: dataChangeCreatedBy name: name comment: comment id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z namespaceName: namespaceName - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z properties: release: - $ref: "#/components/schemas/OpenReleaseDTO" + $ref: '#/components/schemas/OpenReleaseDTO' releaseDeliveryTime: - description: "" + description: 配置下发时间(ISO 8601) + example: 2025-09-29T12:34:56Z type: string dataChangeLastModifiedTime: - description: "" + description: 最后修改时间(ISO 8601) + example: 2025-09-29T12:34:56Z type: string type: object OpenInstanceDTO: example: configs: - - releaseDeliveryTime: releaseDeliveryTime + - releaseDeliveryTime: 2025-09-29T12:34:56Z release: - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy configurations: - key: key + key: configurations appId: appId clusterName: clusterName dataChangeCreatedBy: dataChangeCreatedBy name: name comment: comment id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z namespaceName: namespaceName - dataChangeLastModifiedTime: dataChangeLastModifiedTime - - releaseDeliveryTime: releaseDeliveryTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z + - releaseDeliveryTime: 2025-09-29T12:34:56Z release: - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy configurations: - key: key + key: configurations appId: appId clusterName: clusterName dataChangeCreatedBy: dataChangeCreatedBy name: name comment: comment id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z namespaceName: namespaceName - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeCreatedTime: dataChangeCreatedTime + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z + dataChangeCreatedTime: 2025-09-29T12:34:56Z dataCenter: dataCenter appId: appId clusterName: clusterName @@ -5501,28 +5178,29 @@ components: id: 5 properties: id: - description: "" + description: 实例ID format: int64 type: integer appId: - description: "" + description: 实例所属应用ID type: string clusterName: - description: "" + description: 实例所属集群名称 type: string dataCenter: - description: "" + description: 数据中心/机房标识 type: string ip: - description: "" + description: 实例IP地址 type: string configs: - description: "" + description: 实例当前生效的配置列表 items: - $ref: "#/components/schemas/OpenInstanceConfigDTO" + $ref: '#/components/schemas/OpenInstanceConfigDTO' type: array dataChangeCreatedTime: - description: "" + description: 数据创建时间(ISO 8601) + example: 2025-09-29T12:34:56Z type: string type: object OpenOrganizationDto: @@ -5531,99 +5209,84 @@ components: orgId: orgId properties: orgId: - description: "" + description: 组织ID type: string orgName: - description: "" + description: 组织名称 type: string type: object - _openapi_v1_apps_get_401_response: + ExceptionResponse: + additionalProperties: true + description: | + 错误响应对象,表示为 Map。 字段包括: - status: HTTP 状态码 (integer) - message: 错误信息 (string) - timestamp: 出错时间戳 (string) - exception: 异常类名或标识 (string) example: - message: message - properties: - message: - type: string + status: 404 + message: Resource not found + timestamp: 2025-09-29T12:34:56Z + exception: NotFoundException type: object - _openapi_v1_apps_post_request: - allOf: - - $ref: "#/components/schemas/OpenCreateAppDTO" - description: "" - properties: - app: - allOf: - - $ref: "#/components/schemas/OpenAppDTO" - required: - - appId - - name - - orgId - - orgName - - ownerName - required: - - admins - - app - - assignAppRoleToSelf + SuccessEmptyResponse: + properties: {} type: object - _openapi_v1_apps_post_400_response: - example: - exception: exception - message: message - properties: - message: - type: string - exception: - type: string - type: object - _openapi_v1_envs__env__apps__appId__clusters__clusterName__namespaces__namespaceName__items_validate_post_200_response: - example: - valid: true - message: message - properties: - valid: + StringToStringBoolMap: + additionalProperties: + additionalProperties: type: boolean - message: - type: string + type: object + example: + projectA: + featureX: true + featureY: false + projectB: + darkMode: true type: object - _openapi_v1_envs__env__apps__appId__clusters__clusterName__namespaces__namespaceName__items_validate_post_400_response: + MultiResponseEntity: + description: A response container holding multiple RichResponseEntity objects example: - valid: true - message: message - errors: - - errors - - errors + code: 200 + entities: + - code: 200 + message: OK + body: "{}" + - code: 200 + message: OK + body: "{}" properties: - valid: - type: boolean - message: - type: string - errors: + code: + description: Overall HTTP status code + example: 200 + type: integer + entities: + description: List of rich response entities items: - type: string + $ref: '#/components/schemas/RichResponseEntity' type: array + required: + - code + - entities type: object - _openapi_v1_envs__env__releases_compare_get_200_response: + RichResponseEntity: + description: "A wrapper for a single response entity with code, message, and\ + \ body" example: - changes: - - type: ADDED - entity: - firstEntity: - value: value - key: key - secondEntity: - value: value - key: key - - type: ADDED - entity: - firstEntity: - value: value - key: key - secondEntity: - value: value - key: key + code: 200 + message: OK + body: "{}" properties: - changes: - items: - $ref: "#/components/schemas/Change" - type: array + code: + description: HTTP status code + example: 200 + type: integer + message: + description: Response message (can be string or object) + example: OK + type: object + body: + description: Response payload (generic type T) + type: object + required: + - code + - message type: object securitySchemes: ApiKeyAuth: diff --git a/spring-boot2/src/test/java/com/apollo/openapi/server/OpenApiGeneratorApplicationTests.java b/spring-boot2/src/test/java/com/apollo/openapi/server/OpenApiGeneratorApplicationTests.java index 550f903d..b268fc82 100644 --- a/spring-boot2/src/test/java/com/apollo/openapi/server/OpenApiGeneratorApplicationTests.java +++ b/spring-boot2/src/test/java/com/apollo/openapi/server/OpenApiGeneratorApplicationTests.java @@ -10,4 +10,4 @@ class OpenApiGeneratorApplicationTests { void contextLoads() { } -} \ No newline at end of file +} diff --git a/typescript/.npmignore b/typescript/.npmignore index 42061c01..b43bf86b 100644 --- a/typescript/.npmignore +++ b/typescript/.npmignore @@ -1 +1 @@ -README.md \ No newline at end of file +README.md diff --git a/typescript/.openapi-generator/FILES b/typescript/.openapi-generator/FILES index f4667da8..6329030c 100644 --- a/typescript/.openapi-generator/FILES +++ b/typescript/.openapi-generator/FILES @@ -13,44 +13,34 @@ src/apis/OrganizationManagementApi.ts src/apis/ReleaseManagementApi.ts src/apis/index.ts src/index.ts -src/models/Change.ts -src/models/ClusterDTO.ts -src/models/EntityPairKVEntity.ts -src/models/EnvClusterInfo.ts -src/models/ItemChangeSets.ts -src/models/ItemDTO.ts src/models/KVEntity.ts -src/models/ListItemDiffs.ts -src/models/ListReleaseBO.ts -src/models/MapString.ts +src/models/MultiResponseEntity.ts src/models/NamespaceGrayDelReleaseDTO.ts -src/models/NamespaceIdentifier.ts src/models/NamespaceReleaseDTO.ts -src/models/NamespaceSyncModel.ts -src/models/NamespaceTextModel.ts src/models/OpenAppDTO.ts src/models/OpenAppNamespaceDTO.ts src/models/OpenClusterDTO.ts src/models/OpenCreateAppDTO.ts src/models/OpenEnvClusterDTO.ts +src/models/OpenEnvClusterInfo.ts src/models/OpenGrayReleaseRuleDTO.ts src/models/OpenGrayReleaseRuleItemDTO.ts src/models/OpenInstanceConfigDTO.ts src/models/OpenInstanceDTO.ts +src/models/OpenItemChangeSets.ts src/models/OpenItemDTO.ts +src/models/OpenItemDiffs.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/OpenapiV1AppsGet401Response.ts -src/models/OpenapiV1AppsPost400Response.ts -src/models/OpenapiV1AppsPostRequest.ts -src/models/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.ts -src/models/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.ts -src/models/OpenapiV1EnvsEnvReleasesCompareGet200Response.ts -src/models/ReleaseDTO.ts +src/models/RichResponseEntity.ts src/models/index.ts src/runtime.ts tsconfig.json diff --git a/typescript/.openapi-generator/VERSION b/typescript/.openapi-generator/VERSION index 368fd8fd..826f5ce0 100644 --- a/typescript/.openapi-generator/VERSION +++ b/typescript/.openapi-generator/VERSION @@ -1 +1 @@ -7.15.0 +6.6.0 diff --git a/typescript/README.md b/typescript/README.md index 294a1639..150c76ae 100644 --- a/typescript/README.md +++ b/typescript/README.md @@ -15,7 +15,7 @@ Module system * CommonJS * ES6 module system -It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via `package.json`. ([Reference](https://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html)) +It can be used in both TypeScript and JavaScript. In TypeScript, the definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html)) ### Building @@ -27,7 +27,7 @@ npm run build ### Publishing -First build the package then run `npm publish` +First build the package then run ```npm publish``` ### Consuming @@ -43,4 +43,3 @@ _unPublished (not recommended):_ ``` npm install PATH_TO_GENERATED_PACKAGE --save -``` diff --git a/typescript/package.json b/typescript/package.json index a6ecb61f..84faa8cc 100644 --- a/typescript/package.json +++ b/typescript/package.json @@ -14,6 +14,6 @@ "prepare": "npm run build" }, "devDependencies": { - "typescript": "^4.0 || ^5.0" + "typescript": "^4.0" } } diff --git a/typescript/src/apis/AppManagementApi.ts b/typescript/src/apis/AppManagementApi.ts index 51e03608..9546b17f 100644 --- a/typescript/src/apis/AppManagementApi.ts +++ b/typescript/src/apis/AppManagementApi.ts @@ -2,10 +2,10 @@ /* eslint-disable */ /** * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -15,344 +15,282 @@ import * as runtime from '../runtime'; import type { - EnvClusterInfo, + MultiResponseEntity, OpenAppDTO, + OpenCreateAppDTO, OpenEnvClusterDTO, - OpenapiV1AppsGet401Response, - OpenapiV1AppsPost400Response, - OpenapiV1AppsPostRequest, -} from '../models/index'; +} from '../models'; import { - EnvClusterInfoFromJSON, - EnvClusterInfoToJSON, + MultiResponseEntityFromJSON, + MultiResponseEntityToJSON, OpenAppDTOFromJSON, OpenAppDTOToJSON, + OpenCreateAppDTOFromJSON, + OpenCreateAppDTOToJSON, OpenEnvClusterDTOFromJSON, OpenEnvClusterDTOToJSON, - OpenapiV1AppsGet401ResponseFromJSON, - OpenapiV1AppsGet401ResponseToJSON, - OpenapiV1AppsPost400ResponseFromJSON, - OpenapiV1AppsPost400ResponseToJSON, - OpenapiV1AppsPostRequestFromJSON, - OpenapiV1AppsPostRequestToJSON, -} from '../models/index'; - -export interface OpenapiV1AppsAppIdAppnamespacesNamespaceNameDeleteRequest { - appId: string; - namespaceName: string; -} +} from '../models'; -export interface OpenapiV1AppsAppIdDeleteRequest { - appId: string; +export interface CreateAppRequest { + openCreateAppDTO: OpenCreateAppDTO; } -export interface OpenapiV1AppsAppIdEnvClustersGetRequest { - appId: string; -} - -export interface OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDeleteRequest { - appId: string; +export interface CreateAppInEnvRequest { env: string; - clusterName: string; - namespaceName: string; + operator: string; + openAppDTO: OpenAppDTO; } -export interface OpenapiV1AppsAppIdGetRequest { +export interface DeleteAppRequest { appId: string; + operator: string; } -export interface OpenapiV1AppsAppIdMissEnvsGetRequest { - appId: string; +export interface FindAppsRequest { + appIds?: string; } -export interface OpenapiV1AppsAppIdNamespacesReleasesStatusGetRequest { +export interface FindMissEnvsRequest { appId: string; } -export interface OpenapiV1AppsAppIdNavtreeGetRequest { +export interface GetAppRequest { appId: string; } -export interface OpenapiV1AppsAppIdPutRequest { +export interface GetAppNavTreeRequest { appId: string; - openAppDTO: OpenAppDTO; } -export interface OpenapiV1AppsEnvsEnvPostRequest { - env: string; - openAppDTO: OpenAppDTO; +export interface GetAppsBySelfRequest { + page: number; + size: number; } -export interface OpenapiV1AppsGetRequest { - authorized?: string; +export interface GetEnvClusterInfoRequest { + appId: string; } -export interface OpenapiV1AppsPostOperationRequest { - openapiV1AppsPostRequest: OpenapiV1AppsPostRequest; +export interface UpdateAppRequest { + appId: string; + operator: string; + openAppDTO: OpenAppDTO; } /** - * + * */ export class AppManagementApi extends runtime.BaseAPI { /** - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * 删除AppNamespace + * POST /openapi/v1/apps + * 创建应用 (original openapi) */ - async openapiV1AppsAppIdAppnamespacesNamespaceNameDeleteRaw(requestParameters: OpenapiV1AppsAppIdAppnamespacesNamespaceNameDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdAppnamespacesNamespaceNameDelete().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1AppsAppIdAppnamespacesNamespaceNameDelete().' - ); + 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.'); } const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - const response = await this.request({ - path: urlPath, - method: 'DELETE', + path: `/openapi/v1/apps`, + method: 'POST', headers: headerParameters, query: queryParameters, + body: OpenCreateAppDTOToJSON(requestParameters.openCreateAppDTO), }, initOverrides); return new runtime.JSONApiResponse(response); } /** - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * 删除AppNamespace + * POST /openapi/v1/apps + * 创建应用 (original openapi) */ - async openapiV1AppsAppIdAppnamespacesNamespaceNameDelete(requestParameters: OpenapiV1AppsAppIdAppnamespacesNamespaceNameDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1AppsAppIdAppnamespacesNamespaceNameDeleteRaw(requestParameters, initOverrides); + async createApp(requestParameters: CreateAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createAppRaw(requestParameters, initOverrides); return await response.value(); } /** - * DELETE /openapi/v1/apps/{appId} - * 删除应用 + * POST /openapi/v1/apps/envs/{env} + * 在指定环境创建应用(new added) */ - async openapiV1AppsAppIdDeleteRaw(requestParameters: OpenapiV1AppsAppIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdDelete().' - ); + async createAppInEnvRaw(requestParameters: CreateAppInEnvRequest, 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 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.'); } const queryParameters: any = {}; + if (requestParameters.operator !== undefined) { + queryParameters['operator'] = requestParameters.operator; + } + const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/apps/{appId}`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - const response = await this.request({ - path: urlPath, - method: 'DELETE', + path: `/openapi/v1/apps/envs/{env}`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))), + method: 'POST', headers: headerParameters, query: queryParameters, + body: OpenAppDTOToJSON(requestParameters.openAppDTO), }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OpenapiV1AppsGet401ResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response); } /** - * DELETE /openapi/v1/apps/{appId} - * 删除应用 + * POST /openapi/v1/apps/envs/{env} + * 在指定环境创建应用(new added) */ - async openapiV1AppsAppIdDelete(requestParameters: OpenapiV1AppsAppIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1AppsAppIdDeleteRaw(requestParameters, initOverrides); + async createAppInEnv(requestParameters: CreateAppInEnvRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createAppInEnvRaw(requestParameters, initOverrides); return await response.value(); } /** - * GET /openapi/v1/apps/{appId}/env-clusters - * 获取应用的环境集群信息 + * DELETE /openapi/v1/apps/{appId} + * 删除应用(new added) */ - async openapiV1AppsAppIdEnvClustersGetRaw(requestParameters: OpenapiV1AppsAppIdEnvClustersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdEnvClustersGet().' - ); + async deleteAppRaw(requestParameters: DeleteAppRequest, 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 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) { + queryParameters['operator'] = requestParameters.operator; + } + const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/apps/{appId}/env-clusters`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - const response = await this.request({ - path: urlPath, - method: 'GET', + path: `/openapi/v1/apps/{appId}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), + method: 'DELETE', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenEnvClusterDTOFromJSON)); + return new runtime.JSONApiResponse(response); } /** - * GET /openapi/v1/apps/{appId}/env-clusters - * 获取应用的环境集群信息 + * DELETE /openapi/v1/apps/{appId} + * 删除应用(new added) */ - async openapiV1AppsAppIdEnvClustersGet(requestParameters: OpenapiV1AppsAppIdEnvClustersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1AppsAppIdEnvClustersGetRaw(requestParameters, initOverrides); + async deleteApp(requestParameters: DeleteAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.deleteAppRaw(requestParameters, initOverrides); return await response.value(); } /** - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links - * 删除关联的Namespace + * POST /openapi/v1/apps + * 查找应用 (original openapi) */ - async openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDeleteRaw(requestParameters: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete().' - ); - } + async findAppsRaw(requestParameters: FindAppsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete().' - ); + if (requestParameters.appIds !== undefined) { + queryParameters['appIds'] = requestParameters.appIds; } - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - const response = await this.request({ - path: urlPath, - method: 'DELETE', + path: `/openapi/v1/apps`, + method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response); + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenAppDTOFromJSON)); } /** - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links - * 删除关联的Namespace + * POST /openapi/v1/apps + * 查找应用 (original openapi) */ - async openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete(requestParameters: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDeleteRaw(requestParameters, initOverrides); + async findApps(requestParameters: FindAppsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.findAppsRaw(requestParameters, initOverrides); return await response.value(); } /** - * GET /openapi/v1/apps/{appId} - * 获取单个应用信息 + * GET /openapi/v1/apps/authorized + * 获取当前Consumer授权的应用列表 (original openapi) */ - async openapiV1AppsAppIdGetRaw(requestParameters: OpenapiV1AppsAppIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdGet().' - ); - } - + async findAppsAuthorizedRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/apps/{appId}`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - const response = await this.request({ - path: urlPath, + path: `/openapi/v1/apps/authorized`, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OpenAppDTOFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenAppDTOFromJSON)); } /** - * GET /openapi/v1/apps/{appId} - * 获取单个应用信息 + * GET /openapi/v1/apps/authorized + * 获取当前Consumer授权的应用列表 (original openapi) */ - async openapiV1AppsAppIdGet(requestParameters: OpenapiV1AppsAppIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1AppsAppIdGetRaw(requestParameters, initOverrides); + async findAppsAuthorized(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.findAppsAuthorizedRaw(initOverrides); return await response.value(); } /** * GET /openapi/v1/apps/{appId}/miss_envs - * 查找缺失的环境 + * 查找缺失的环境(new added) */ - async openapiV1AppsAppIdMissEnvsGetRaw(requestParameters: OpenapiV1AppsAppIdMissEnvsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdMissEnvsGet().' - ); + 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.'); } const queryParameters: any = {}; @@ -360,42 +298,35 @@ export class AppManagementApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/apps/{appId}/miss_envs`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - const response = await this.request({ - path: urlPath, + 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); + return new runtime.JSONApiResponse(response, (jsonValue) => MultiResponseEntityFromJSON(jsonValue)); } /** * GET /openapi/v1/apps/{appId}/miss_envs - * 查找缺失的环境 + * 查找缺失的环境(new added) */ - async openapiV1AppsAppIdMissEnvsGet(requestParameters: OpenapiV1AppsAppIdMissEnvsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1AppsAppIdMissEnvsGetRaw(requestParameters, initOverrides); + async findMissEnvs(requestParameters: FindMissEnvsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.findMissEnvsRaw(requestParameters, initOverrides); return await response.value(); } /** - * GET /openapi/v1/apps/{appId}/namespaces/releases/status - * 获取应用下所有Namespace的发布状态 + * GET /openapi/v1/apps/{appId} + * 获取单个应用信息(new added) */ - async openapiV1AppsAppIdNamespacesReleasesStatusGetRaw(requestParameters: OpenapiV1AppsAppIdNamespacesReleasesStatusGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdNamespacesReleasesStatusGet().' - ); + async getAppRaw(requestParameters: GetAppRequest, 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 getApp.'); } const queryParameters: any = {}; @@ -403,42 +334,35 @@ export class AppManagementApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/apps/{appId}/namespaces/releases/status`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - const response = await this.request({ - path: urlPath, + path: `/openapi/v1/apps/{appId}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response); + return new runtime.JSONApiResponse(response, (jsonValue) => OpenAppDTOFromJSON(jsonValue)); } /** - * GET /openapi/v1/apps/{appId}/namespaces/releases/status - * 获取应用下所有Namespace的发布状态 + * GET /openapi/v1/apps/{appId} + * 获取单个应用信息(new added) */ - async openapiV1AppsAppIdNamespacesReleasesStatusGet(requestParameters: OpenapiV1AppsAppIdNamespacesReleasesStatusGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: { [key: string]: boolean; }; }> { - const response = await this.openapiV1AppsAppIdNamespacesReleasesStatusGetRaw(requestParameters, initOverrides); + async getApp(requestParameters: GetAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getAppRaw(requestParameters, initOverrides); return await response.value(); } /** * GET /openapi/v1/apps/{appId}/navtree - * 获取应用导航树 + * 获取应用导航树(new added) */ - async openapiV1AppsAppIdNavtreeGetRaw(requestParameters: OpenapiV1AppsAppIdNavtreeGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdNavtreeGet().' - ); + 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.'); } const queryParameters: any = {}; @@ -446,103 +370,59 @@ export class AppManagementApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/apps/{appId}/navtree`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - const response = await this.request({ - path: urlPath, + path: `/openapi/v1/apps/{appId}/navtree`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(EnvClusterInfoFromJSON)); + return new runtime.JSONApiResponse(response, (jsonValue) => MultiResponseEntityFromJSON(jsonValue)); } /** * GET /openapi/v1/apps/{appId}/navtree - * 获取应用导航树 + * 获取应用导航树(new added) */ - async openapiV1AppsAppIdNavtreeGet(requestParameters: OpenapiV1AppsAppIdNavtreeGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1AppsAppIdNavtreeGetRaw(requestParameters, initOverrides); + async getAppNavTree(requestParameters: GetAppNavTreeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getAppNavTreeRaw(requestParameters, initOverrides); return await response.value(); } /** - * PUT /openapi/v1/apps/{appId} - * 更新应用 + * GET /openapi/v1/apps/by-self + * 获取当前Consumer的应用列表(分页)(new added) */ - async openapiV1AppsAppIdPutRaw(requestParameters: OpenapiV1AppsAppIdPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdPut().' - ); + 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['openAppDTO'] == null) { - throw new runtime.RequiredError( - 'openAppDTO', - 'Required parameter "openAppDTO" was null or undefined when calling openapiV1AppsAppIdPut().' - ); + 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 = {}; - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + if (requestParameters.page !== undefined) { + queryParameters['page'] = requestParameters.page; } - - let urlPath = `/openapi/v1/apps/{appId}`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - - const response = await this.request({ - path: urlPath, - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: OpenAppDTOToJSON(requestParameters['openAppDTO']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenAppDTOFromJSON(jsonValue)); - } - - /** - * PUT /openapi/v1/apps/{appId} - * 更新应用 - */ - async openapiV1AppsAppIdPut(requestParameters: OpenapiV1AppsAppIdPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1AppsAppIdPutRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apps/by-self - * 获取当前Consumer的应用列表(分页) - */ - async openapiV1AppsBySelfGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; + if (requestParameters.size !== undefined) { + queryParameters['size'] = requestParameters.size; + } const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/apps/by-self`; - const response = await this.request({ - path: urlPath, + path: `/openapi/v1/apps/by-self`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -553,147 +433,97 @@ export class AppManagementApi extends runtime.BaseAPI { /** * GET /openapi/v1/apps/by-self - * 获取当前Consumer的应用列表(分页) + * 获取当前Consumer的应用列表(分页)(new added) */ - async openapiV1AppsBySelfGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1AppsBySelfGetRaw(initOverrides); + async getAppsBySelf(requestParameters: GetAppsBySelfRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getAppsBySelfRaw(requestParameters, initOverrides); return await response.value(); } /** - * POST /openapi/v1/apps/envs/{env} - * 在指定环境创建应用 + * GET /openapi/v1/apps/{appId}/envclusters + * 获取应用的环境集群信息 (original openapi) */ - async openapiV1AppsEnvsEnvPostRaw(requestParameters: OpenapiV1AppsEnvsEnvPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1AppsEnvsEnvPost().' - ); - } - - if (requestParameters['openAppDTO'] == null) { - throw new runtime.RequiredError( - 'openAppDTO', - 'Required parameter "openAppDTO" was null or undefined when calling openapiV1AppsEnvsEnvPost().' - ); + 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 = {}; const headerParameters: runtime.HTTPHeaders = {}; - headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/apps/envs/{env}`; - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - const response = await this.request({ - path: urlPath, - method: 'POST', + path: `/openapi/v1/apps/{appId}/envclusters`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), + method: 'GET', headers: headerParameters, query: queryParameters, - body: OpenAppDTOToJSON(requestParameters['openAppDTO']), }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OpenapiV1AppsGet401ResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenEnvClusterDTOFromJSON)); } /** - * POST /openapi/v1/apps/envs/{env} - * 在指定环境创建应用 + * GET /openapi/v1/apps/{appId}/envclusters + * 获取应用的环境集群信息 (original openapi) */ - async openapiV1AppsEnvsEnvPost(requestParameters: OpenapiV1AppsEnvsEnvPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1AppsEnvsEnvPostRaw(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?authorized=true - * 获取当前Consumer授权的应用列表 + * PUT /openapi/v1/apps/{appId} + * 更新应用(new added) */ - async openapiV1AppsGetRaw(requestParameters: OpenapiV1AppsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['authorized'] != null) { - queryParameters['authorized'] = requestParameters['authorized']; + 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.'); } - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + if (requestParameters.operator === null || requestParameters.operator === undefined) { + throw new runtime.RequiredError('operator','Required parameter requestParameters.operator was null or undefined when calling updateApp.'); } - - let urlPath = `/openapi/v1/apps`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenAppDTOFromJSON)); - } - - /** - * GET /openapi/v1/apps?authorized=true - * 获取当前Consumer授权的应用列表 - */ - async openapiV1AppsGet(requestParameters: OpenapiV1AppsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1AppsGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * POST /openapi/v1/apps - * 创建应用 - */ - async openapiV1AppsPostRaw(requestParameters: OpenapiV1AppsPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['openapiV1AppsPostRequest'] == null) { - throw new runtime.RequiredError( - 'openapiV1AppsPostRequest', - 'Required parameter "openapiV1AppsPostRequest" was null or undefined when calling openapiV1AppsPost().' - ); + if (requestParameters.openAppDTO === null || requestParameters.openAppDTO === undefined) { + throw new runtime.RequiredError('openAppDTO','Required parameter requestParameters.openAppDTO was null or undefined when calling updateApp.'); } const queryParameters: any = {}; + if (requestParameters.operator !== undefined) { + queryParameters['operator'] = requestParameters.operator; + } + const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/apps`; - const response = await this.request({ - path: urlPath, - method: 'POST', + path: `/openapi/v1/apps/{appId}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), + method: 'PUT', headers: headerParameters, query: queryParameters, - body: OpenapiV1AppsPostRequestToJSON(requestParameters['openapiV1AppsPostRequest']), + body: OpenAppDTOToJSON(requestParameters.openAppDTO), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OpenAppDTOFromJSON(jsonValue)); } /** - * POST /openapi/v1/apps - * 创建应用 + * PUT /openapi/v1/apps/{appId} + * 更新应用(new added) */ - async openapiV1AppsPost(requestParameters: OpenapiV1AppsPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1AppsPostRaw(requestParameters, initOverrides); + 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 e93384f5..741570fe 100644 --- a/typescript/src/apis/ClusterManagementApi.ts +++ b/typescript/src/apis/ClusterManagementApi.ts @@ -2,10 +2,10 @@ /* eslint-disable */ /** * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -16,122 +16,51 @@ import * as runtime from '../runtime'; import type { OpenClusterDTO, - OpenNamespaceDTO, - OpenapiV1AppsGet401Response, -} from '../models/index'; +} from '../models'; import { OpenClusterDTOFromJSON, OpenClusterDTOToJSON, - OpenNamespaceDTOFromJSON, - OpenNamespaceDTOToJSON, - OpenapiV1AppsGet401ResponseFromJSON, - OpenapiV1AppsGet401ResponseToJSON, -} from '../models/index'; - -export interface OpenapiV1AppsAppIdClustersClusterNameGetRequest { - appId: string; - clusterName: string; -} +} from '../models'; -export interface OpenapiV1AppsAppIdClustersPostRequest { +export interface CreateClusterRequest { appId: string; + env: string; openClusterDTO: OpenClusterDTO; } -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteRequest { +export interface DeleteClusterRequest { env: string; appId: string; clusterName: string; + operator: string; } -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGetRequest { +export interface GetClusterRequest { appId: string; - env: string; clusterName: string; - namespaceName: string; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGetRequest { - appId: string; env: string; - clusterName: string; - namespaceName: string; - fillItemDetail: boolean; } /** - * + * */ export class ClusterManagementApi extends runtime.BaseAPI { /** - * GET /openapi/v1/apps/{appId}/clusters/{clusterName} - * 获取指定集群信息 + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters + * 创建集群 (original openapi) */ - async openapiV1AppsAppIdClustersClusterNameGetRaw(requestParameters: OpenapiV1AppsAppIdClustersClusterNameGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdClustersClusterNameGet().' - ); + async createClusterRaw(requestParameters: CreateClusterRequest, 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 createCluster.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1AppsAppIdClustersClusterNameGet().' - ); + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling createCluster.'); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/apps/{appId}/clusters/{clusterName}`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenClusterDTOFromJSON(jsonValue)); - } - - /** - * GET /openapi/v1/apps/{appId}/clusters/{clusterName} - * 获取指定集群信息 - */ - async openapiV1AppsAppIdClustersClusterNameGet(requestParameters: OpenapiV1AppsAppIdClustersClusterNameGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1AppsAppIdClustersClusterNameGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * POST /openapi/v1/apps/{appId}/clusters - * 创建集群 - */ - async openapiV1AppsAppIdClustersPostRaw(requestParameters: OpenapiV1AppsAppIdClustersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdClustersPost().' - ); - } - - if (requestParameters['openClusterDTO'] == null) { - throw new runtime.RequiredError( - 'openClusterDTO', - 'Required parameter "openClusterDTO" was null or undefined when calling openapiV1AppsAppIdClustersPost().' - ); + if (requestParameters.openClusterDTO === null || requestParameters.openClusterDTO === undefined) { + throw new runtime.RequiredError('openClusterDTO','Required parameter requestParameters.openClusterDTO was null or undefined when calling createCluster.'); } const queryParameters: any = {}; @@ -141,234 +70,122 @@ export class ClusterManagementApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/apps/{appId}/clusters`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - const response = await this.request({ - path: urlPath, + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))), method: 'POST', headers: headerParameters, query: queryParameters, - body: OpenClusterDTOToJSON(requestParameters['openClusterDTO']), + body: OpenClusterDTOToJSON(requestParameters.openClusterDTO), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OpenClusterDTOFromJSON(jsonValue)); } /** - * POST /openapi/v1/apps/{appId}/clusters - * 创建集群 + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters + * 创建集群 (original openapi) */ - async openapiV1AppsAppIdClustersPost(requestParameters: OpenapiV1AppsAppIdClustersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1AppsAppIdClustersPostRaw(requestParameters, initOverrides); + async createCluster(requestParameters: CreateClusterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createClusterRaw(requestParameters, initOverrides); return await response.value(); } /** * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - * 删除集群 + * 删除集群 (new added) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete().' - ); - } - - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete().' - ); + async deleteClusterRaw(requestParameters: DeleteClusterRequest, 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 deleteCluster.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete().' - ); + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling deleteCluster.'); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling deleteCluster.'); } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}`; - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenapiV1AppsGet401ResponseFromJSON(jsonValue)); - } - - /** - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - * 删除集群 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - * 获取命名空间分支信息 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet().' - ); + if (requestParameters.operator === null || requestParameters.operator === undefined) { + throw new runtime.RequiredError('operator','Required parameter requestParameters.operator was null or undefined when calling deleteCluster.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet().' - ); - } + const queryParameters: any = {}; - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet().' - ); + if (requestParameters.operator !== undefined) { + queryParameters['operator'] = requestParameters.operator; } - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - const response = await this.request({ - path: urlPath, - method: 'GET', + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))), + method: 'DELETE', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OpenNamespaceDTOFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - * 获取命名空间分支信息 + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} + * 删除集群 (new added) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGetRaw(requestParameters, initOverrides); + async deleteCluster(requestParameters: DeleteClusterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.deleteClusterRaw(requestParameters, initOverrides); return await response.value(); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - * 获取指定的Namespace + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} + * 获取指定集群信息 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet().' - ); + async getClusterRaw(requestParameters: GetClusterRequest, 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 getCluster.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling getCluster.'); } - if (requestParameters['fillItemDetail'] == null) { - throw new runtime.RequiredError( - 'fillItemDetail', - 'Required parameter "fillItemDetail" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet().' - ); + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getCluster.'); } const queryParameters: any = {}; - if (requestParameters['fillItemDetail'] != null) { - queryParameters['fillItemDetail'] = requestParameters['fillItemDetail']; - } - const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - const response = await this.request({ - path: urlPath, + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OpenNamespaceDTOFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => OpenClusterDTOFromJSON(jsonValue)); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - * 获取指定的Namespace + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} + * 获取指定集群信息 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGetRaw(requestParameters, initOverrides); + async getCluster(requestParameters: GetClusterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getClusterRaw(requestParameters, initOverrides); return await response.value(); } diff --git a/typescript/src/apis/InstanceManagementApi.ts b/typescript/src/apis/InstanceManagementApi.ts index a3e359e4..d87a8cfc 100644 --- a/typescript/src/apis/InstanceManagementApi.ts +++ b/typescript/src/apis/InstanceManagementApi.ts @@ -2,10 +2,10 @@ /* eslint-disable */ /** * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -17,21 +17,22 @@ import * as runtime from '../runtime'; import type { OpenInstanceDTO, OpenPageDTOOpenInstanceDTO, -} from '../models/index'; +} from '../models'; import { OpenInstanceDTOFromJSON, OpenInstanceDTOToJSON, OpenPageDTOOpenInstanceDTOFromJSON, OpenPageDTOOpenInstanceDTOToJSON, -} from '../models/index'; +} from '../models'; -export interface OpenapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetRequest { +export interface GetInstanceCountByNamespaceRequest { + env: string; appId: string; clusterName: string; namespaceName: string; } -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetRequest { +export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetRequest { env: string; appId: string; clusterName: string; @@ -47,34 +48,29 @@ export interface OpenapiV1EnvsEnvReleasesReleaseIdInstancesGetRequest { } /** - * + * */ export class InstanceManagementApi extends runtime.BaseAPI { /** - * GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances - * 获取命名空间下的实例数量 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances + * 获取命名空间下的实例数量 (original openapi) */ - async openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetRaw(requestParameters: OpenapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet().' - ); + async getInstanceCountByNamespaceRaw(requestParameters: GetInstanceCountByNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getInstanceCountByNamespace.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet().' - ); + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getInstanceCountByNamespace.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling getInstanceCountByNamespace.'); + } + + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getInstanceCountByNamespace.'); } const queryParameters: any = {}; @@ -82,17 +78,11 @@ export class InstanceManagementApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - const response = await this.request({ - path: urlPath, + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -106,68 +96,49 @@ export class InstanceManagementApi extends runtime.BaseAPI { } /** - * GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances - * 获取命名空间下的实例数量 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances + * 获取命名空间下的实例数量 (original openapi) */ - async openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(requestParameters: OpenapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetRaw(requestParameters, initOverrides); + async getInstanceCountByNamespace(requestParameters: GetInstanceCountByNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getInstanceCountByNamespaceRaw(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 openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet().' - ); + async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet.'); } - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet().' - ); + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet.'); } const queryParameters: any = {}; - if (requestParameters['excludeReleases'] != null) { - queryParameters['excludeReleases'] = requestParameters['excludeReleases']; + if (requestParameters.excludeReleases !== undefined) { + queryParameters['excludeReleases'] = requestParameters.excludeReleases; } const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances`; - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - const response = await this.request({ - path: urlPath, + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -178,69 +149,52 @@ 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 openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetRaw(requestParameters, initOverrides); + async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetRaw(requestParameters, initOverrides); return await response.value(); } /** * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances - * 根据发布版本查询实例(支持分页) + * 根据发布版本查询实例(支持分页) (new added) */ async openapiV1EnvsEnvReleasesReleaseIdInstancesGetRaw(requestParameters: OpenapiV1EnvsEnvReleasesReleaseIdInstancesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet().' - ); + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet.'); } - if (requestParameters['releaseId'] == null) { - throw new runtime.RequiredError( - 'releaseId', - 'Required parameter "releaseId" was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet().' - ); + if (requestParameters.releaseId === null || requestParameters.releaseId === undefined) { + throw new runtime.RequiredError('releaseId','Required parameter requestParameters.releaseId was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet.'); } - if (requestParameters['page'] == null) { - throw new runtime.RequiredError( - 'page', - 'Required parameter "page" was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet().' - ); + if (requestParameters.page === null || requestParameters.page === undefined) { + throw new runtime.RequiredError('page','Required parameter requestParameters.page was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet.'); } - if (requestParameters['size'] == null) { - throw new runtime.RequiredError( - 'size', - 'Required parameter "size" was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet().' - ); + if (requestParameters.size === null || requestParameters.size === undefined) { + throw new runtime.RequiredError('size','Required parameter requestParameters.size was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet.'); } const queryParameters: any = {}; - if (requestParameters['page'] != null) { - queryParameters['page'] = requestParameters['page']; + if (requestParameters.page !== undefined) { + queryParameters['page'] = requestParameters.page; } - if (requestParameters['size'] != null) { - queryParameters['size'] = requestParameters['size']; + if (requestParameters.size !== undefined) { + queryParameters['size'] = requestParameters.size; } const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/releases/{releaseId}/instances`; - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"releaseId"}}`, encodeURIComponent(String(requestParameters['releaseId']))); - const response = await this.request({ - path: urlPath, + path: `/openapi/v1/envs/{env}/releases/{releaseId}/instances`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"releaseId"}}`, encodeURIComponent(String(requestParameters.releaseId))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -251,7 +205,7 @@ export class InstanceManagementApi extends runtime.BaseAPI { /** * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances - * 根据发布版本查询实例(支持分页) + * 根据发布版本查询实例(支持分页) (new added) */ async openapiV1EnvsEnvReleasesReleaseIdInstancesGet(requestParameters: OpenapiV1EnvsEnvReleasesReleaseIdInstancesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.openapiV1EnvsEnvReleasesReleaseIdInstancesGetRaw(requestParameters, initOverrides); diff --git a/typescript/src/apis/ItemManagementApi.ts b/typescript/src/apis/ItemManagementApi.ts index e8e7091d..90f3e534 100644 --- a/typescript/src/apis/ItemManagementApi.ts +++ b/typescript/src/apis/ItemManagementApi.ts @@ -2,10 +2,10 @@ /* eslint-disable */ /** * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -15,78 +15,70 @@ import * as runtime from '../runtime'; import type { - ListItemDiffs, - NamespaceSyncModel, - NamespaceTextModel, OpenItemDTO, + OpenItemDiffs, + OpenNamespaceSyncModel, + OpenNamespaceTextModel, OpenPageDTOOpenItemDTO, - OpenapiV1AppsGet401Response, - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response, - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response, -} from '../models/index'; +} from '../models'; import { - ListItemDiffsFromJSON, - ListItemDiffsToJSON, - NamespaceSyncModelFromJSON, - NamespaceSyncModelToJSON, - NamespaceTextModelFromJSON, - NamespaceTextModelToJSON, OpenItemDTOFromJSON, OpenItemDTOToJSON, + OpenItemDiffsFromJSON, + OpenItemDiffsToJSON, + OpenNamespaceSyncModelFromJSON, + OpenNamespaceSyncModelToJSON, + OpenNamespaceTextModelFromJSON, + OpenNamespaceTextModelToJSON, OpenPageDTOOpenItemDTOFromJSON, OpenPageDTOOpenItemDTOToJSON, - OpenapiV1AppsGet401ResponseFromJSON, - OpenapiV1AppsGet401ResponseToJSON, - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseFromJSON, - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseToJSON, - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400ResponseFromJSON, - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400ResponseToJSON, -} from '../models/index'; - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDeleteRequest { +} from '../models'; + +export interface BatchUpdateItemsByTextRequest { appId: string; env: string; clusterName: string; namespaceName: string; - key: string; operator: string; + openNamespaceTextModel: OpenNamespaceTextModel; } -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGetRequest { +export interface CompareItemsRequest { appId: string; env: string; clusterName: string; namespaceName: string; - key: string; + openNamespaceSyncModel: OpenNamespaceSyncModel; } -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPutRequest { +export interface CreateItemRequest { appId: string; env: string; clusterName: string; namespaceName: string; - key: string; - createIfNotExists: boolean; + operator: string; openItemDTO: OpenItemDTO; } -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePutRequest { +export interface DeleteItemRequest { appId: string; env: string; clusterName: string; namespaceName: string; - namespaceTextModel: NamespaceTextModel; + key: string; + operator: string; } -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePostRequest { +export interface DeleteItemByEncodedKeyRequest { appId: string; env: string; clusterName: string; namespaceName: string; - namespaceSyncModel: NamespaceSyncModel; + key: string; + operator: string; } -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGetRequest { +export interface FindItemsByNamespaceRequest { appId: string; env: string; clusterName: string; @@ -95,16 +87,15 @@ export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespace size: number; } -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDeleteRequest { +export interface GetBranchItemsRequest { appId: string; env: string; clusterName: string; namespaceName: string; - key: string; - operator: string; + branchName: string; } -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGetRequest { +export interface GetItemRequest { appId: string; env: string; clusterName: string; @@ -112,271 +103,215 @@ export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespace key: string; } -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPutRequest { +export interface GetItemByEncodedKeyRequest { appId: string; env: string; clusterName: string; namespaceName: string; key: string; - createIfNotExists: boolean; - openItemDTO: OpenItemDTO; } -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPostRequest { +export interface RevertItemsRequest { appId: string; env: string; clusterName: string; namespaceName: string; - openItemDTO: OpenItemDTO; + operator: string; +} + +export interface SyncItemsRequest { + appId: string; + env: string; + clusterName: string; + namespaceName: string; + operator: string; + openNamespaceSyncModel: OpenNamespaceSyncModel; } -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPostRequest { +export interface UpdateItemRequest { appId: string; env: string; clusterName: string; namespaceName: string; + key: string; + createIfNotExists: boolean; + openItemDTO: OpenItemDTO; } -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPostRequest { +export interface UpdateItemByEncodedKeyRequest { appId: string; env: string; clusterName: string; namespaceName: string; - namespaceSyncModel: NamespaceSyncModel; + key: string; + createIfNotExists: boolean; + openItemDTO: OpenItemDTO; } -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePostRequest { +export interface ValidateItemsRequest { appId: string; env: string; clusterName: string; namespaceName: string; - namespaceTextModel: NamespaceTextModel; + openNamespaceTextModel: OpenNamespaceTextModel; } /** - * + * */ export class ItemManagementApi extends runtime.BaseAPI { /** - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * 通过编码的key删除配置项 + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate: + * 通过文本批量修改配置项 (new added) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDeleteRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete().' - ); + async batchUpdateItemsByTextRaw(requestParameters: BatchUpdateItemsByTextRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling batchUpdateItemsByText.'); } - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete().' - ); + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling batchUpdateItemsByText.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling batchUpdateItemsByText.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling batchUpdateItemsByText.'); } - if (requestParameters['key'] == null) { - throw new runtime.RequiredError( - 'key', - 'Required parameter "key" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete().' - ); + if (requestParameters.operator === null || requestParameters.operator === undefined) { + throw new runtime.RequiredError('operator','Required parameter requestParameters.operator was null or undefined when calling batchUpdateItemsByText.'); } - if (requestParameters['operator'] == null) { - throw new runtime.RequiredError( - 'operator', - 'Required parameter "operator" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete().' - ); + if (requestParameters.openNamespaceTextModel === null || requestParameters.openNamespaceTextModel === undefined) { + throw new runtime.RequiredError('openNamespaceTextModel','Required parameter requestParameters.openNamespaceTextModel was null or undefined when calling batchUpdateItemsByText.'); } const queryParameters: any = {}; - if (requestParameters['operator'] != null) { - queryParameters['operator'] = requestParameters['operator']; + if (requestParameters.operator !== undefined) { + queryParameters['operator'] = requestParameters.operator; } const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - urlPath = urlPath.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters['key']))); - const response = await this.request({ - path: urlPath, - method: 'DELETE', + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), + method: 'PUT', headers: headerParameters, query: queryParameters, + body: OpenNamespaceTextModelToJSON(requestParameters.openNamespaceTextModel), }, initOverrides); return new runtime.JSONApiResponse(response); } /** - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * 通过编码的key删除配置项 + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate: + * 通过文本批量修改配置项 (new added) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDeleteRaw(requestParameters, initOverrides); + async batchUpdateItemsByText(requestParameters: BatchUpdateItemsByTextRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.batchUpdateItemsByTextRaw(requestParameters, initOverrides); return await response.value(); } /** - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false} - * 通过查询参数获取配置项(支持编码的key) + * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare + * 对比命名空间配置差异 (new added) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet().' - ); + async compareItemsRaw(requestParameters: CompareItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling compareItems.'); } - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet().' - ); + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling compareItems.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling compareItems.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling compareItems.'); } - if (requestParameters['key'] == null) { - throw new runtime.RequiredError( - 'key', - 'Required parameter "key" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet().' - ); + if (requestParameters.openNamespaceSyncModel === null || requestParameters.openNamespaceSyncModel === undefined) { + throw new runtime.RequiredError('openNamespaceSyncModel','Required parameter requestParameters.openNamespaceSyncModel was null or undefined when calling compareItems.'); } const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - urlPath = urlPath.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters['key']))); - const response = await this.request({ - path: urlPath, - method: 'GET', + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), + method: 'POST', headers: headerParameters, query: queryParameters, + body: OpenNamespaceSyncModelToJSON(requestParameters.openNamespaceSyncModel), }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OpenItemDTOFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenItemDiffsFromJSON)); } /** - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false} - * 通过查询参数获取配置项(支持编码的key) + * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare + * 对比命名空间配置差异 (new added) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGetRaw(requestParameters, initOverrides); + async compareItems(requestParameters: CompareItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.compareItemsRaw(requestParameters, initOverrides); return await response.value(); } /** - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * 通过编码的key更新配置项 + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items + * 创建新的配置项 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPutRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut().' - ); + async createItemRaw(requestParameters: CreateItemRequest, 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 createItem.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut().' - ); + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling createItem.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling createItem.'); } - if (requestParameters['key'] == null) { - throw new runtime.RequiredError( - 'key', - 'Required parameter "key" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling createItem.'); } - if (requestParameters['createIfNotExists'] == null) { - throw new runtime.RequiredError( - 'createIfNotExists', - 'Required parameter "createIfNotExists" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut().' - ); + if (requestParameters.operator === null || requestParameters.operator === undefined) { + throw new runtime.RequiredError('operator','Required parameter requestParameters.operator was null or undefined when calling createItem.'); } - if (requestParameters['openItemDTO'] == null) { - throw new runtime.RequiredError( - 'openItemDTO', - 'Required parameter "openItemDTO" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut().' - ); + if (requestParameters.openItemDTO === null || requestParameters.openItemDTO === undefined) { + throw new runtime.RequiredError('openItemDTO','Required parameter requestParameters.openItemDTO was null or undefined when calling createItem.'); } const queryParameters: any = {}; - if (requestParameters['createIfNotExists'] != null) { - queryParameters['createIfNotExists'] = requestParameters['createIfNotExists']; + if (requestParameters.operator !== undefined) { + queryParameters['operator'] = requestParameters.operator; } const headerParameters: runtime.HTTPHeaders = {}; @@ -384,263 +319,196 @@ export class ItemManagementApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - urlPath = urlPath.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters['key']))); - const response = await this.request({ - path: urlPath, - method: 'PUT', + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), + method: 'POST', headers: headerParameters, query: queryParameters, - body: OpenItemDTOToJSON(requestParameters['openItemDTO']), + body: OpenItemDTOToJSON(requestParameters.openItemDTO), }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OpenapiV1AppsGet401ResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => OpenItemDTOFromJSON(jsonValue)); } /** - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * 通过编码的key更新配置项 + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items + * 创建新的配置项 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPutRaw(requestParameters, initOverrides); + async createItem(requestParameters: CreateItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createItemRaw(requestParameters, initOverrides); return await response.value(); } /** - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate - * 通过文本批量修改配置项 + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * 删除配置项 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePutRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut().' - ); + async deleteItemRaw(requestParameters: DeleteItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling deleteItem.'); + } + + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling deleteItem.'); } - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling deleteItem.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling deleteItem.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut().' - ); + if (requestParameters.key === null || requestParameters.key === undefined) { + throw new runtime.RequiredError('key','Required parameter requestParameters.key was null or undefined when calling deleteItem.'); } - if (requestParameters['namespaceTextModel'] == null) { - throw new runtime.RequiredError( - 'namespaceTextModel', - 'Required parameter "namespaceTextModel" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut().' - ); + if (requestParameters.operator === null || requestParameters.operator === undefined) { + throw new runtime.RequiredError('operator','Required parameter requestParameters.operator was null or undefined when calling deleteItem.'); } const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters.operator !== undefined) { + queryParameters['operator'] = requestParameters.operator; + } - headerParameters['Content-Type'] = 'application/json'; + const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - const response = await this.request({ - path: urlPath, - method: 'PUT', + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"key"}}`, encodeURIComponent(String(requestParameters.key))), + method: 'DELETE', headers: headerParameters, query: queryParameters, - body: NamespaceTextModelToJSON(requestParameters['namespaceTextModel']), }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OpenapiV1AppsGet401ResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response); } /** - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate - * 通过文本批量修改配置项 + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * 删除配置项 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePutRaw(requestParameters, initOverrides); + async deleteItem(requestParameters: DeleteItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.deleteItemRaw(requestParameters, initOverrides); return await response.value(); } /** - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare - * 对比命名空间配置差异 + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + * 通过编码的key删除配置项 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePostRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost().' - ); + async deleteItemByEncodedKeyRaw(requestParameters: DeleteItemByEncodedKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling deleteItemByEncodedKey.'); } - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost().' - ); + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling deleteItemByEncodedKey.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling deleteItemByEncodedKey.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling deleteItemByEncodedKey.'); } - if (requestParameters['namespaceSyncModel'] == null) { - throw new runtime.RequiredError( - 'namespaceSyncModel', - 'Required parameter "namespaceSyncModel" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost().' - ); + if (requestParameters.key === null || requestParameters.key === undefined) { + throw new runtime.RequiredError('key','Required parameter requestParameters.key was null or undefined when calling deleteItemByEncodedKey.'); + } + + if (requestParameters.operator === null || requestParameters.operator === undefined) { + throw new runtime.RequiredError('operator','Required parameter requestParameters.operator was null or undefined when calling deleteItemByEncodedKey.'); } const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters.operator !== undefined) { + queryParameters['operator'] = requestParameters.operator; + } - headerParameters['Content-Type'] = 'application/json'; + const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - const response = await this.request({ - path: urlPath, - method: 'POST', + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"key"}}`, encodeURIComponent(String(requestParameters.key))), + method: 'DELETE', headers: headerParameters, query: queryParameters, - body: NamespaceSyncModelToJSON(requestParameters['namespaceSyncModel']), }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ListItemDiffsFromJSON)); + return new runtime.JSONApiResponse(response); } /** - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare - * 对比命名空间配置差异 + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + * 通过编码的key删除配置项 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePostRaw(requestParameters, initOverrides); + async deleteItemByEncodedKey(requestParameters: DeleteItemByEncodedKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.deleteItemByEncodedKeyRaw(requestParameters, initOverrides); return await response.value(); } /** - * - * 获取命名空间下的配置项列表 + * 获取指定命名空间的配置项列表,支持分页 + * 获取命名空间下的配置项列表 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet().' - ); + 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.'); } - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet().' - ); + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling findItemsByNamespace.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling findItemsByNamespace.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling findItemsByNamespace.'); } - if (requestParameters['page'] == null) { - throw new runtime.RequiredError( - 'page', - 'Required parameter "page" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet().' - ); + if (requestParameters.page === null || requestParameters.page === undefined) { + throw new runtime.RequiredError('page','Required parameter requestParameters.page was null or undefined when calling findItemsByNamespace.'); } - if (requestParameters['size'] == null) { - throw new runtime.RequiredError( - 'size', - 'Required parameter "size" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet().' - ); + if (requestParameters.size === null || requestParameters.size === undefined) { + throw new runtime.RequiredError('size','Required parameter requestParameters.size was null or undefined when calling findItemsByNamespace.'); } const queryParameters: any = {}; - if (requestParameters['page'] != null) { - queryParameters['page'] = requestParameters['page']; + if (requestParameters.page !== undefined) { + queryParameters['page'] = requestParameters.page; } - if (requestParameters['size'] != null) { - queryParameters['size'] = requestParameters['size']; + if (requestParameters.size !== undefined) { + queryParameters['size'] = requestParameters.size; } const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - const response = await this.request({ - path: urlPath, + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -650,138 +518,89 @@ export class ItemManagementApi extends runtime.BaseAPI { } /** - * - * 获取命名空间下的配置项列表 + * 获取指定命名空间的配置项列表,支持分页 + * 获取命名空间下的配置项列表 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGetRaw(requestParameters, initOverrides); + async findItemsByNamespace(requestParameters: FindItemsByNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.findItemsByNamespaceRaw(requestParameters, initOverrides); return await response.value(); } /** - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * 删除配置项 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: + * 获取分支下的配置项 (new added) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDeleteRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete().' - ); + async getBranchItemsRaw(requestParameters: GetBranchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getBranchItems.'); } - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete().' - ); + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getBranchItems.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling getBranchItems.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getBranchItems.'); } - if (requestParameters['key'] == null) { - throw new runtime.RequiredError( - 'key', - 'Required parameter "key" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete().' - ); - } - - if (requestParameters['operator'] == null) { - throw new runtime.RequiredError( - 'operator', - 'Required parameter "operator" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete().' - ); + if (requestParameters.branchName === null || requestParameters.branchName === undefined) { + throw new runtime.RequiredError('branchName','Required parameter requestParameters.branchName was null or undefined when calling getBranchItems.'); } const queryParameters: any = {}; - if (requestParameters['operator'] != null) { - queryParameters['operator'] = requestParameters['operator']; - } - const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - urlPath = urlPath.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters['key']))); - const response = await this.request({ - path: urlPath, - method: 'DELETE', + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters.branchName))), + method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response); + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenItemDTOFromJSON)); } /** - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * 删除配置项 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: + * 获取分支下的配置项 (new added) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDeleteRaw(requestParameters, initOverrides); + async getBranchItems(requestParameters: GetBranchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getBranchItemsRaw(requestParameters, initOverrides); return await response.value(); } /** - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * 获取单个配置项 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * 获取单个配置项 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet().' - ); + async getItemRaw(requestParameters: GetItemRequest, 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 getItem.'); } - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet().' - ); + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getItem.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling getItem.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getItem.'); } - if (requestParameters['key'] == null) { - throw new runtime.RequiredError( - 'key', - 'Required parameter "key" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet().' - ); + if (requestParameters.key === null || requestParameters.key === undefined) { + throw new runtime.RequiredError('key','Required parameter requestParameters.key was null or undefined when calling getItem.'); } const queryParameters: any = {}; @@ -789,19 +608,11 @@ export class ItemManagementApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - urlPath = urlPath.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters['key']))); - const response = await this.request({ - path: urlPath, + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"key"}}`, encodeURIComponent(String(requestParameters.key))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -811,369 +622,342 @@ export class ItemManagementApi extends runtime.BaseAPI { } /** - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * 获取单个配置项 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * 获取单个配置项 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGetRaw(requestParameters, initOverrides); + async getItem(requestParameters: GetItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getItemRaw(requestParameters, initOverrides); return await response.value(); } /** - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * 更新配置项 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + * 通过查询参数获取配置项(支持编码的key) (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPutRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut().' - ); + async getItemByEncodedKeyRaw(requestParameters: GetItemByEncodedKeyRequest, 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 getItemByEncodedKey.'); + } + + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getItemByEncodedKey.'); + } + + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling getItemByEncodedKey.'); } - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getItemByEncodedKey.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut().' - ); + if (requestParameters.key === null || requestParameters.key === undefined) { + throw new runtime.RequiredError('key','Required parameter requestParameters.key was null or undefined when calling getItemByEncodedKey.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"key"}}`, encodeURIComponent(String(requestParameters.key))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OpenItemDTOFromJSON(jsonValue)); + } + + /** + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + * 通过查询参数获取配置项(支持编码的key) (original openapi) + */ + async getItemByEncodedKey(requestParameters: GetItemByEncodedKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getItemByEncodedKeyRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert + * 撤销配置项更改 (new added) + */ + async revertItemsRaw(requestParameters: RevertItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling revertItems.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut().' - ); + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling revertItems.'); } - if (requestParameters['key'] == null) { - throw new runtime.RequiredError( - 'key', - 'Required parameter "key" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling revertItems.'); } - if (requestParameters['createIfNotExists'] == null) { - throw new runtime.RequiredError( - 'createIfNotExists', - 'Required parameter "createIfNotExists" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling revertItems.'); } - if (requestParameters['openItemDTO'] == null) { - throw new runtime.RequiredError( - 'openItemDTO', - 'Required parameter "openItemDTO" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut().' - ); + if (requestParameters.operator === null || requestParameters.operator === undefined) { + throw new runtime.RequiredError('operator','Required parameter requestParameters.operator was null or undefined when calling revertItems.'); } const queryParameters: any = {}; - if (requestParameters['createIfNotExists'] != null) { - queryParameters['createIfNotExists'] = requestParameters['createIfNotExists']; + if (requestParameters.operator !== undefined) { + queryParameters['operator'] = requestParameters.operator; } const headerParameters: runtime.HTTPHeaders = {}; - headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - urlPath = urlPath.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters['key']))); - const response = await this.request({ - path: urlPath, - method: 'PUT', + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), + method: 'POST', headers: headerParameters, query: queryParameters, - body: OpenItemDTOToJSON(requestParameters['openItemDTO']), }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OpenapiV1AppsGet401ResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response); } /** - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * 更新配置项 + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert + * 撤销配置项更改 (new added) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPutRaw(requestParameters, initOverrides); + async revertItems(requestParameters: RevertItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.revertItemsRaw(requestParameters, initOverrides); return await response.value(); } /** - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items - * 创建新的配置项 + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync: + * 同步配置项到多个命名空间 (new added) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPostRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost().' - ); + async syncItemsRaw(requestParameters: SyncItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling syncItems.'); } - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost().' - ); + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling syncItems.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling syncItems.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling syncItems.'); } - if (requestParameters['openItemDTO'] == null) { - throw new runtime.RequiredError( - 'openItemDTO', - 'Required parameter "openItemDTO" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost().' - ); + if (requestParameters.operator === null || requestParameters.operator === undefined) { + throw new runtime.RequiredError('operator','Required parameter requestParameters.operator was null or undefined when calling syncItems.'); + } + + if (requestParameters.openNamespaceSyncModel === null || requestParameters.openNamespaceSyncModel === undefined) { + throw new runtime.RequiredError('openNamespaceSyncModel','Required parameter requestParameters.openNamespaceSyncModel was null or undefined when calling syncItems.'); } const queryParameters: any = {}; + if (requestParameters.operator !== undefined) { + queryParameters['operator'] = requestParameters.operator; + } + const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - const response = await this.request({ - path: urlPath, + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), method: 'POST', headers: headerParameters, query: queryParameters, - body: OpenItemDTOToJSON(requestParameters['openItemDTO']), + body: OpenNamespaceSyncModelToJSON(requestParameters.openNamespaceSyncModel), }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OpenItemDTOFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response); } /** - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items - * 创建新的配置项 + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync: + * 同步配置项到多个命名空间 (new added) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPostRaw(requestParameters, initOverrides); + async syncItems(requestParameters: SyncItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.syncItemsRaw(requestParameters, initOverrides); return await response.value(); } /** - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert - * 撤销配置项更改 + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * 更新配置项 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPostRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost().' - ); + async updateItemRaw(requestParameters: UpdateItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling updateItem.'); } - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost().' - ); + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling updateItem.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling updateItem.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling updateItem.'); + } + + if (requestParameters.key === null || requestParameters.key === undefined) { + throw new runtime.RequiredError('key','Required parameter requestParameters.key was null or undefined when calling updateItem.'); + } + + if (requestParameters.createIfNotExists === null || requestParameters.createIfNotExists === undefined) { + throw new runtime.RequiredError('createIfNotExists','Required parameter requestParameters.createIfNotExists was null or undefined when calling updateItem.'); + } + + if (requestParameters.openItemDTO === null || requestParameters.openItemDTO === undefined) { + throw new runtime.RequiredError('openItemDTO','Required parameter requestParameters.openItemDTO was null or undefined when calling updateItem.'); } const queryParameters: any = {}; + if (requestParameters.createIfNotExists !== undefined) { + queryParameters['createIfNotExists'] = requestParameters.createIfNotExists; + } + const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - const response = await this.request({ - path: urlPath, - method: 'POST', + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"key"}}`, encodeURIComponent(String(requestParameters.key))), + method: 'PUT', headers: headerParameters, query: queryParameters, + body: OpenItemDTOToJSON(requestParameters.openItemDTO), }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OpenapiV1AppsGet401ResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response); } /** - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert - * 撤销配置项更改 + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * 更新配置项 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPostRaw(requestParameters, initOverrides); + async updateItem(requestParameters: UpdateItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateItemRaw(requestParameters, initOverrides); return await response.value(); } /** - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync - * 同步配置项到多个命名空间 + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + * 通过编码的key更新配置项 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPostRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost().' - ); + async updateItemByEncodedKeyRaw(requestParameters: UpdateItemByEncodedKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling updateItemByEncodedKey.'); } - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost().' - ); + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling updateItemByEncodedKey.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling updateItemByEncodedKey.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling updateItemByEncodedKey.'); } - if (requestParameters['namespaceSyncModel'] == null) { - throw new runtime.RequiredError( - 'namespaceSyncModel', - 'Required parameter "namespaceSyncModel" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost().' - ); + if (requestParameters.key === null || requestParameters.key === undefined) { + throw new runtime.RequiredError('key','Required parameter requestParameters.key was null or undefined when calling updateItemByEncodedKey.'); + } + + if (requestParameters.createIfNotExists === null || requestParameters.createIfNotExists === undefined) { + throw new runtime.RequiredError('createIfNotExists','Required parameter requestParameters.createIfNotExists was null or undefined when calling updateItemByEncodedKey.'); + } + + if (requestParameters.openItemDTO === null || requestParameters.openItemDTO === undefined) { + throw new runtime.RequiredError('openItemDTO','Required parameter requestParameters.openItemDTO was null or undefined when calling updateItemByEncodedKey.'); } const queryParameters: any = {}; + if (requestParameters.createIfNotExists !== undefined) { + queryParameters['createIfNotExists'] = requestParameters.createIfNotExists; + } + const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - const response = await this.request({ - path: urlPath, - method: 'POST', + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"key"}}`, encodeURIComponent(String(requestParameters.key))), + method: 'PUT', headers: headerParameters, query: queryParameters, - body: NamespaceSyncModelToJSON(requestParameters['namespaceSyncModel']), + body: OpenItemDTOToJSON(requestParameters.openItemDTO), }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OpenapiV1AppsGet401ResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response); } /** - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync - * 同步配置项到多个命名空间 + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + * 通过编码的key更新配置项 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPostRaw(requestParameters, initOverrides); + async updateItemByEncodedKey(requestParameters: UpdateItemByEncodedKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateItemByEncodedKeyRaw(requestParameters, initOverrides); return await response.value(); } /** - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate - * 验证配置文本语法 + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate + * 验证配置文本语法 (new added) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePostRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost().' - ); + async validateItemsRaw(requestParameters: ValidateItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling validateItems.'); } - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost().' - ); + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling validateItems.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling validateItems.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling validateItems.'); } - if (requestParameters['namespaceTextModel'] == null) { - throw new runtime.RequiredError( - 'namespaceTextModel', - 'Required parameter "namespaceTextModel" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost().' - ); + if (requestParameters.openNamespaceTextModel === null || requestParameters.openNamespaceTextModel === undefined) { + throw new runtime.RequiredError('openNamespaceTextModel','Required parameter requestParameters.openNamespaceTextModel was null or undefined when calling validateItems.'); } const queryParameters: any = {}; @@ -1183,33 +967,26 @@ export class ItemManagementApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - const response = await this.request({ - path: urlPath, + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), method: 'POST', headers: headerParameters, query: queryParameters, - body: NamespaceTextModelToJSON(requestParameters['namespaceTextModel']), + body: OpenNamespaceTextModelToJSON(requestParameters.openNamespaceTextModel), }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response); } /** - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate - * 验证配置文本语法 + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate + * 验证配置文本语法 (new added) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePostRaw(requestParameters, initOverrides); + async validateItems(requestParameters: ValidateItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.validateItemsRaw(requestParameters, initOverrides); return await response.value(); } diff --git a/typescript/src/apis/NamespaceBranchManagementApi.ts b/typescript/src/apis/NamespaceBranchManagementApi.ts index 81aa3dd5..45a0697b 100644 --- a/typescript/src/apis/NamespaceBranchManagementApi.ts +++ b/typescript/src/apis/NamespaceBranchManagementApi.ts @@ -2,10 +2,10 @@ /* eslint-disable */ /** * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -15,32 +15,23 @@ import * as runtime from '../runtime'; import type { - NamespaceGrayDelReleaseDTO, NamespaceReleaseDTO, OpenGrayReleaseRuleDTO, - OpenItemDTO, OpenNamespaceDTO, OpenReleaseDTO, - OpenapiV1AppsGet401Response, -} from '../models/index'; +} from '../models'; import { - NamespaceGrayDelReleaseDTOFromJSON, - NamespaceGrayDelReleaseDTOToJSON, NamespaceReleaseDTOFromJSON, NamespaceReleaseDTOToJSON, OpenGrayReleaseRuleDTOFromJSON, OpenGrayReleaseRuleDTOToJSON, - OpenItemDTOFromJSON, - OpenItemDTOToJSON, OpenNamespaceDTOFromJSON, OpenNamespaceDTOToJSON, OpenReleaseDTOFromJSON, OpenReleaseDTOToJSON, - OpenapiV1AppsGet401ResponseFromJSON, - OpenapiV1AppsGet401ResponseToJSON, -} from '../models/index'; +} from '../models'; -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPostRequest { +export interface CreateBranchRequest { appId: string; env: string; clusterName: string; @@ -48,7 +39,7 @@ export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespace operator: string; } -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDeleteRequest { +export interface DeleteBranchRequest { env: string; appId: string; clusterName: string; @@ -57,16 +48,14 @@ export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespace operator: string; } -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPostRequest { +export interface FindBranchRequest { appId: string; env: string; clusterName: string; namespaceName: string; - branchName: string; - namespaceGrayDelReleaseDTO: NamespaceGrayDelReleaseDTO; } -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGetRequest { +export interface GetBranchGrayRulesRequest { appId: string; env: string; clusterName: string; @@ -74,120 +63,71 @@ export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespace branchName: string; } -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPutRequest { - appId: string; +export interface MergeBranchRequest { env: string; - clusterName: string; - namespaceName: string; - branchName: string; - operator: string; - openGrayReleaseRuleDTO: OpenGrayReleaseRuleDTO; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGetRequest { appId: string; - env: string; - clusterName: string; - namespaceName: string; - branchName: string; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePostRequest { - appId: string; - env: string; clusterName: string; namespaceName: string; branchName: string; deleteBranch: boolean; + operator: string; namespaceReleaseDTO: NamespaceReleaseDTO; } -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatchRequest { - env: string; - appId: string; - clusterName: string; - namespaceName: string; - branchName: string; - deleteBranch: boolean; - xApolloOperator: string; - namespaceReleaseDTO: NamespaceReleaseDTO; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPostRequest { +export interface UpdateBranchRulesRequest { appId: string; env: string; clusterName: string; namespaceName: string; branchName: string; - namespaceReleaseDTO: NamespaceReleaseDTO; + operator: string; + openGrayReleaseRuleDTO: OpenGrayReleaseRuleDTO; } /** - * + * */ export class NamespaceBranchManagementApi extends runtime.BaseAPI { /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch - * 创建命名空间分支 + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches + * 创建命名空间分支 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPostRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost().' - ); + async createBranchRaw(requestParameters: CreateBranchRequest, 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 createBranch.'); } - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost().' - ); + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling createBranch.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling createBranch.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling createBranch.'); } - if (requestParameters['operator'] == null) { - throw new runtime.RequiredError( - 'operator', - 'Required parameter "operator" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost().' - ); + if (requestParameters.operator === null || requestParameters.operator === undefined) { + throw new runtime.RequiredError('operator','Required parameter requestParameters.operator was null or undefined when calling createBranch.'); } const queryParameters: any = {}; - if (requestParameters['operator'] != null) { - queryParameters['operator'] = requestParameters['operator']; + if (requestParameters.operator !== undefined) { + queryParameters['operator'] = requestParameters.operator; } const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - const response = await this.request({ - path: urlPath, + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), method: 'POST', headers: headerParameters, query: queryParameters, @@ -197,83 +137,57 @@ export class NamespaceBranchManagementApi extends runtime.BaseAPI { } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch - * 创建命名空间分支 + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches + * 创建命名空间分支 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPostRaw(requestParameters, initOverrides); + async createBranch(requestParameters: CreateBranchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createBranchRaw(requestParameters, initOverrides); return await response.value(); } /** * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - * 删除命名空间分支 + * 删除命名空间分支 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDeleteRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete().' - ); + async deleteBranchRaw(requestParameters: DeleteBranchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling deleteBranch.'); } - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete().' - ); + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling deleteBranch.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling deleteBranch.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling deleteBranch.'); } - if (requestParameters['branchName'] == null) { - throw new runtime.RequiredError( - 'branchName', - 'Required parameter "branchName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete().' - ); + if (requestParameters.branchName === null || requestParameters.branchName === undefined) { + throw new runtime.RequiredError('branchName','Required parameter requestParameters.branchName was null or undefined when calling deleteBranch.'); } - if (requestParameters['operator'] == null) { - throw new runtime.RequiredError( - 'operator', - 'Required parameter "operator" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete().' - ); + if (requestParameters.operator === null || requestParameters.operator === undefined) { + throw new runtime.RequiredError('operator','Required parameter requestParameters.operator was null or undefined when calling deleteBranch.'); } const queryParameters: any = {}; - if (requestParameters['operator'] != null) { - queryParameters['operator'] = requestParameters['operator']; + if (requestParameters.operator !== undefined) { + queryParameters['operator'] = requestParameters.operator; } const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}`; - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - urlPath = urlPath.replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters['branchName']))); - const response = await this.request({ - path: urlPath, + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters.branchName))), method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -284,136 +198,84 @@ export class NamespaceBranchManagementApi extends runtime.BaseAPI { /** * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - * 删除命名空间分支 + * 删除命名空间分支 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDeleteRaw(requestParameters, initOverrides); + async deleteBranch(requestParameters: DeleteBranchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.deleteBranchRaw(requestParameters, initOverrides); return await response.value(); } /** - * - * 创建灰度删除发布 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches + * 获取命名空间分支信息 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPostRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost().' - ); + async findBranchRaw(requestParameters: FindBranchRequest, 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 findBranch.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost().' - ); + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling findBranch.'); } - if (requestParameters['branchName'] == null) { - throw new runtime.RequiredError( - 'branchName', - 'Required parameter "branchName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling findBranch.'); } - if (requestParameters['namespaceGrayDelReleaseDTO'] == null) { - throw new runtime.RequiredError( - 'namespaceGrayDelReleaseDTO', - 'Required parameter "namespaceGrayDelReleaseDTO" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling findBranch.'); } const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; - headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - urlPath = urlPath.replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters['branchName']))); - const response = await this.request({ - path: urlPath, - method: 'POST', + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), + method: 'GET', headers: headerParameters, query: queryParameters, - body: NamespaceGrayDelReleaseDTOToJSON(requestParameters['namespaceGrayDelReleaseDTO']), }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OpenReleaseDTOFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => OpenNamespaceDTOFromJSON(jsonValue)); } /** - * - * 创建灰度删除发布 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches + * 获取命名空间分支信息 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPostRaw(requestParameters, initOverrides); + async findBranch(requestParameters: FindBranchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.findBranchRaw(requestParameters, initOverrides); return await response.value(); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - * 获取分支灰度发布规则 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules + * 获取分支灰度发布规则 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet().' - ); + async getBranchGrayRulesRaw(requestParameters: GetBranchGrayRulesRequest, 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 getBranchGrayRules.'); } - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet().' - ); + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getBranchGrayRules.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling getBranchGrayRules.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getBranchGrayRules.'); } - if (requestParameters['branchName'] == null) { - throw new runtime.RequiredError( - 'branchName', - 'Required parameter "branchName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet().' - ); + if (requestParameters.branchName === null || requestParameters.branchName === undefined) { + throw new runtime.RequiredError('branchName','Required parameter requestParameters.branchName was null or undefined when calling getBranchGrayRules.'); } const queryParameters: any = {}; @@ -421,19 +283,11 @@ export class NamespaceBranchManagementApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - urlPath = urlPath.replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters['branchName']))); - const response = await this.request({ - path: urlPath, + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters.branchName))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -443,243 +297,59 @@ export class NamespaceBranchManagementApi extends runtime.BaseAPI { } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - * 获取分支灰度发布规则 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules + * 获取分支灰度发布规则 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGetRaw(requestParameters, initOverrides); + async getBranchGrayRules(requestParameters: GetBranchGrayRulesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getBranchGrayRulesRaw(requestParameters, initOverrides); return await response.value(); } /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - * 更新分支灰度发布规则 + * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") + * 合并分支到主分支 (new added) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPutRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut().' - ); + async mergeBranchRaw(requestParameters: MergeBranchRequest, 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 mergeBranch.'); } - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut().' - ); + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling mergeBranch.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling mergeBranch.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling mergeBranch.'); } - if (requestParameters['branchName'] == null) { - throw new runtime.RequiredError( - 'branchName', - 'Required parameter "branchName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut().' - ); + if (requestParameters.branchName === null || requestParameters.branchName === undefined) { + throw new runtime.RequiredError('branchName','Required parameter requestParameters.branchName was null or undefined when calling mergeBranch.'); } - if (requestParameters['operator'] == null) { - throw new runtime.RequiredError( - 'operator', - 'Required parameter "operator" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut().' - ); + if (requestParameters.deleteBranch === null || requestParameters.deleteBranch === undefined) { + throw new runtime.RequiredError('deleteBranch','Required parameter requestParameters.deleteBranch was null or undefined when calling mergeBranch.'); } - if (requestParameters['openGrayReleaseRuleDTO'] == null) { - throw new runtime.RequiredError( - 'openGrayReleaseRuleDTO', - 'Required parameter "openGrayReleaseRuleDTO" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut().' - ); + if (requestParameters.operator === null || requestParameters.operator === undefined) { + throw new runtime.RequiredError('operator','Required parameter requestParameters.operator was null or undefined when calling mergeBranch.'); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['operator'] != null) { - headerParameters['operator'] = String(requestParameters['operator']); - } - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - urlPath = urlPath.replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters['branchName']))); - - const response = await this.request({ - path: urlPath, - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: OpenGrayReleaseRuleDTOToJSON(requestParameters['openGrayReleaseRuleDTO']), - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - * 更新分支灰度发布规则 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPutRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items - * 获取分支下的配置项 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet().' - ); - } - - if (requestParameters['branchName'] == null) { - throw new runtime.RequiredError( - 'branchName', - 'Required parameter "branchName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet().' - ); + if (requestParameters.namespaceReleaseDTO === null || requestParameters.namespaceReleaseDTO === undefined) { + throw new runtime.RequiredError('namespaceReleaseDTO','Required parameter requestParameters.namespaceReleaseDTO was null or undefined when calling mergeBranch.'); } const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + if (requestParameters.deleteBranch !== undefined) { + queryParameters['deleteBranch'] = requestParameters.deleteBranch; } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - urlPath = urlPath.replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters['branchName']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenItemDTOFromJSON)); - } - - /** - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items - * 获取分支下的配置项 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * - * 合并分支 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePostRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost().' - ); - } - - if (requestParameters['branchName'] == null) { - throw new runtime.RequiredError( - 'branchName', - 'Required parameter "branchName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost().' - ); - } - - if (requestParameters['deleteBranch'] == null) { - throw new runtime.RequiredError( - 'deleteBranch', - 'Required parameter "deleteBranch" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost().' - ); - } - - if (requestParameters['namespaceReleaseDTO'] == null) { - throw new runtime.RequiredError( - 'namespaceReleaseDTO', - 'Required parameter "namespaceReleaseDTO" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['deleteBranch'] != null) { - queryParameters['deleteBranch'] = requestParameters['deleteBranch']; + if (requestParameters.operator !== undefined) { + queryParameters['operator'] = requestParameters.operator; } const headerParameters: runtime.HTTPHeaders = {}; @@ -687,226 +357,93 @@ export class NamespaceBranchManagementApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - urlPath = urlPath.replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters['branchName']))); - const response = await this.request({ - path: urlPath, - method: 'POST', + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters.branchName))), + method: 'PATCH', headers: headerParameters, query: queryParameters, - body: NamespaceReleaseDTOToJSON(requestParameters['namespaceReleaseDTO']), + body: NamespaceReleaseDTOToJSON(requestParameters.namespaceReleaseDTO), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OpenReleaseDTOFromJSON(jsonValue)); } /** - * - * 合并分支 + * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") + * 合并分支到主分支 (new added) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePostRaw(requestParameters, initOverrides); + async mergeBranch(requestParameters: MergeBranchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.mergeBranchRaw(requestParameters, initOverrides); return await response.value(); } /** - * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") - * 合并分支到主分支 + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules + * 更新分支灰度发布规则 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatchRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch().' - ); + async updateBranchRulesRaw(requestParameters: UpdateBranchRulesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling updateBranchRules.'); } - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch().' - ); + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling updateBranchRules.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling updateBranchRules.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling updateBranchRules.'); } - if (requestParameters['branchName'] == null) { - throw new runtime.RequiredError( - 'branchName', - 'Required parameter "branchName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch().' - ); + if (requestParameters.branchName === null || requestParameters.branchName === undefined) { + throw new runtime.RequiredError('branchName','Required parameter requestParameters.branchName was null or undefined when calling updateBranchRules.'); } - if (requestParameters['deleteBranch'] == null) { - throw new runtime.RequiredError( - 'deleteBranch', - 'Required parameter "deleteBranch" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch().' - ); + if (requestParameters.operator === null || requestParameters.operator === undefined) { + throw new runtime.RequiredError('operator','Required parameter requestParameters.operator was null or undefined when calling updateBranchRules.'); } - if (requestParameters['xApolloOperator'] == null) { - throw new runtime.RequiredError( - 'xApolloOperator', - 'Required parameter "xApolloOperator" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch().' - ); - } - - if (requestParameters['namespaceReleaseDTO'] == null) { - throw new runtime.RequiredError( - 'namespaceReleaseDTO', - 'Required parameter "namespaceReleaseDTO" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch().' - ); + if (requestParameters.openGrayReleaseRuleDTO === null || requestParameters.openGrayReleaseRuleDTO === undefined) { + throw new runtime.RequiredError('openGrayReleaseRuleDTO','Required parameter requestParameters.openGrayReleaseRuleDTO was null or undefined when calling updateBranchRules.'); } const queryParameters: any = {}; - if (requestParameters['deleteBranch'] != null) { - queryParameters['deleteBranch'] = requestParameters['deleteBranch']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['xApolloOperator'] != null) { - headerParameters['X-Apollo-Operator'] = String(requestParameters['xApolloOperator']); - } - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + if (requestParameters.operator !== undefined) { + queryParameters['operator'] = requestParameters.operator; } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}`; - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - urlPath = urlPath.replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters['branchName']))); - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: NamespaceReleaseDTOToJSON(requestParameters['namespaceReleaseDTO']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenReleaseDTOFromJSON(jsonValue)); - } - - /** - * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") - * 合并分支到主分支 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatchRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * - * 创建灰度发布 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPostRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost().' - ); - } - - if (requestParameters['branchName'] == null) { - throw new runtime.RequiredError( - 'branchName', - 'Required parameter "branchName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost().' - ); - } - - if (requestParameters['namespaceReleaseDTO'] == null) { - throw new runtime.RequiredError( - 'namespaceReleaseDTO', - 'Required parameter "namespaceReleaseDTO" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost().' - ); - } - - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - urlPath = urlPath.replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters['branchName']))); - const response = await this.request({ - path: urlPath, - method: 'POST', + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters.branchName))), + method: 'PUT', headers: headerParameters, query: queryParameters, - body: NamespaceReleaseDTOToJSON(requestParameters['namespaceReleaseDTO']), + body: OpenGrayReleaseRuleDTOToJSON(requestParameters.openGrayReleaseRuleDTO), }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OpenReleaseDTOFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response); } /** - * - * 创建灰度发布 + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules + * 更新分支灰度发布规则 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPostRaw(requestParameters, initOverrides); + async updateBranchRules(requestParameters: UpdateBranchRulesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateBranchRulesRaw(requestParameters, initOverrides); return await response.value(); } diff --git a/typescript/src/apis/NamespaceManagementApi.ts b/typescript/src/apis/NamespaceManagementApi.ts index ce7abb17..70970ab9 100644 --- a/typescript/src/apis/NamespaceManagementApi.ts +++ b/typescript/src/apis/NamespaceManagementApi.ts @@ -2,10 +2,10 @@ /* eslint-disable */ /** * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -18,8 +18,7 @@ import type { OpenAppNamespaceDTO, OpenNamespaceDTO, OpenNamespaceLockDTO, - OpenapiV1AppsGet401Response, -} from '../models/index'; +} from '../models'; import { OpenAppNamespaceDTOFromJSON, OpenAppNamespaceDTOToJSON, @@ -27,284 +26,421 @@ import { OpenNamespaceDTOToJSON, OpenNamespaceLockDTOFromJSON, OpenNamespaceLockDTOToJSON, - OpenapiV1AppsGet401ResponseFromJSON, - OpenapiV1AppsGet401ResponseToJSON, -} from '../models/index'; +} from '../models'; -export interface OpenapiV1AppnamespacesGetRequest { - publicOnly: boolean; +export interface CheckNamespaceIntegrityRequest { + appId: string; + env: string; + clusterName: string; } -export interface OpenapiV1AppsAppIdAppnamespacesGetRequest { +export interface CreateNamespaceRequest { appId: string; + openAppNamespaceDTO: OpenAppNamespaceDTO; } -export interface OpenapiV1AppsAppIdAppnamespacesNamespaceNameGetRequest { +export interface DeleteAppNamespaceRequest { appId: string; namespaceName: string; + operator: string; } -export interface OpenapiV1AppsAppIdAppnamespacesPostRequest { +export interface DeleteNamespaceLinksRequest { appId: string; - openAppNamespaceDTO: OpenAppNamespaceDTO; + env: string; + clusterName: string; + namespaceName: string; + operator: string; } -export interface OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGetRequest { +export interface FindNamespacesRequest { appId: string; env: string; clusterName: string; + fillItemDetail: boolean; +} + +export interface GetAppNamespaceRequest { + appId: string; + namespaceName: string; +} + +export interface GetAppNamespacesRequest { + publicOnly: boolean; +} + +export interface GetAppNamespacesByAppRequest { + appId: string; } -export interface OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGetRequest { +export interface GetNamespaceLockRequest { appId: string; env: string; clusterName: string; namespaceName: string; } -export interface OpenapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGetRequest { +export interface GetNamespacesReleaseStatusRequest { + appId: string; +} + +export interface GetPublicAppNamespaceInstancesRequest { env: string; publicNamespaceName: string; page: number; size: number; } -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetRequest { +export interface GetPublicNamespaceAssociationRequest { appId: string; env: string; clusterName: string; - fillItemDetail: boolean; + namespaceName: string; } -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGetRequest { +export interface LoadNamespaceRequest { appId: string; env: string; clusterName: string; namespaceName: string; + fillItemDetail: boolean; } /** - * + * */ export class NamespaceManagementApi extends runtime.BaseAPI { /** - * GET /openapi/v1/appnamespaces?public=true - * 获取所有公共AppNamespace + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check + * 检查缺失的Namespace (new added) */ - async openapiV1AppnamespacesGetRaw(requestParameters: OpenapiV1AppnamespacesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['publicOnly'] == null) { - throw new runtime.RequiredError( - 'publicOnly', - 'Required parameter "publicOnly" was null or undefined when calling openapiV1AppnamespacesGet().' - ); + async checkNamespaceIntegrityRaw(requestParameters: CheckNamespaceIntegrityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling checkNamespaceIntegrity.'); } - const queryParameters: any = {}; + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling checkNamespaceIntegrity.'); + } - if (requestParameters['publicOnly'] != null) { - queryParameters['publicOnly'] = requestParameters['publicOnly']; + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling checkNamespaceIntegrity.'); } + const queryParameters: any = {}; + const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/appnamespaces`; - const response = await this.request({ - path: urlPath, + path: `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenAppNamespaceDTOFromJSON)); + return new runtime.JSONApiResponse(response); } /** - * GET /openapi/v1/appnamespaces?public=true - * 获取所有公共AppNamespace + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check + * 检查缺失的Namespace (new added) */ - async openapiV1AppnamespacesGet(requestParameters: OpenapiV1AppnamespacesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1AppnamespacesGetRaw(requestParameters, initOverrides); + async checkNamespaceIntegrity(requestParameters: CheckNamespaceIntegrityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.checkNamespaceIntegrityRaw(requestParameters, initOverrides); return await response.value(); } /** - * GET /openapi/v1/apps/{appId}/appnamespaces - * 获取指定应用的AppNamespace + * POST /openapi/v1/apps/{appId}/appnamespaces + * 创建AppNamespace (original openapi) */ - async openapiV1AppsAppIdAppnamespacesGetRaw(requestParameters: OpenapiV1AppsAppIdAppnamespacesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdAppnamespacesGet().' - ); + async createNamespaceRaw(requestParameters: CreateNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling createNamespace.'); + } + + if (requestParameters.openAppNamespaceDTO === null || requestParameters.openAppNamespaceDTO === undefined) { + throw new runtime.RequiredError('openAppNamespaceDTO','Required parameter requestParameters.openAppNamespaceDTO was null or undefined when calling createNamespace.'); } const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ + path: `/openapi/v1/apps/{appId}/appnamespaces`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: OpenAppNamespaceDTOToJSON(requestParameters.openAppNamespaceDTO), + }, initOverrides); - let urlPath = `/openapi/v1/apps/{appId}/appnamespaces`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); + return new runtime.JSONApiResponse(response, (jsonValue) => OpenAppNamespaceDTOFromJSON(jsonValue)); + } + + /** + * POST /openapi/v1/apps/{appId}/appnamespaces + * 创建AppNamespace (original openapi) + */ + async createNamespace(requestParameters: CreateNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createNamespaceRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * 删除AppNamespace (new added) + */ + async deleteAppNamespaceRaw(requestParameters: DeleteAppNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling deleteAppNamespace.'); + } + + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling deleteAppNamespace.'); + } + + if (requestParameters.operator === null || requestParameters.operator === undefined) { + throw new runtime.RequiredError('operator','Required parameter requestParameters.operator was null or undefined when calling deleteAppNamespace.'); + } + + const queryParameters: any = {}; + + if (requestParameters.operator !== undefined) { + queryParameters['operator'] = requestParameters.operator; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } const response = await this.request({ - path: urlPath, - method: 'GET', + path: `/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), + method: 'DELETE', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenAppNamespaceDTOFromJSON)); + return new runtime.JSONApiResponse(response); } /** - * GET /openapi/v1/apps/{appId}/appnamespaces - * 获取指定应用的AppNamespace + * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * 删除AppNamespace (new added) */ - async openapiV1AppsAppIdAppnamespacesGet(requestParameters: OpenapiV1AppsAppIdAppnamespacesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1AppsAppIdAppnamespacesGetRaw(requestParameters, initOverrides); + async deleteAppNamespace(requestParameters: DeleteAppNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.deleteAppNamespaceRaw(requestParameters, initOverrides); return await response.value(); } /** - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * 获取指定的AppNamespace + * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links + * 删除关联的Namespace (new added) */ - async openapiV1AppsAppIdAppnamespacesNamespaceNameGetRaw(requestParameters: OpenapiV1AppsAppIdAppnamespacesNamespaceNameGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdAppnamespacesNamespaceNameGet().' - ); + async deleteNamespaceLinksRaw(requestParameters: DeleteNamespaceLinksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling deleteNamespaceLinks.'); + } + + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling deleteNamespaceLinks.'); + } + + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling deleteNamespaceLinks.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1AppsAppIdAppnamespacesNamespaceNameGet().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling deleteNamespaceLinks.'); + } + + if (requestParameters.operator === null || requestParameters.operator === undefined) { + throw new runtime.RequiredError('operator','Required parameter requestParameters.operator was null or undefined when calling deleteNamespaceLinks.'); } const queryParameters: any = {}; + if (requestParameters.operator !== undefined) { + queryParameters['operator'] = requestParameters.operator; + } + const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links + * 删除关联的Namespace (new added) + */ + async deleteNamespaceLinks(requestParameters: DeleteNamespaceLinksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.deleteNamespaceLinksRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces + * 获取指定集群下的所有Namespace (original openapi) + */ + async findNamespacesRaw(requestParameters: FindNamespacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling findNamespaces.'); + } + + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling findNamespaces.'); } + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling findNamespaces.'); + } + + if (requestParameters.fillItemDetail === null || requestParameters.fillItemDetail === undefined) { + throw new runtime.RequiredError('fillItemDetail','Required parameter requestParameters.fillItemDetail was null or undefined when calling findNamespaces.'); + } + + const queryParameters: any = {}; + + if (requestParameters.fillItemDetail !== undefined) { + queryParameters['fillItemDetail'] = requestParameters.fillItemDetail; + } - let urlPath = `/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } const response = await this.request({ - path: urlPath, + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OpenAppNamespaceDTOFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenNamespaceDTOFromJSON)); } /** - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * 获取指定的AppNamespace + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces + * 获取指定集群下的所有Namespace (original openapi) */ - async openapiV1AppsAppIdAppnamespacesNamespaceNameGet(requestParameters: OpenapiV1AppsAppIdAppnamespacesNamespaceNameGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1AppsAppIdAppnamespacesNamespaceNameGetRaw(requestParameters, initOverrides); + async findNamespaces(requestParameters: FindNamespacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.findNamespacesRaw(requestParameters, initOverrides); return await response.value(); } /** - * POST /openapi/v1/apps/{appId}/appnamespaces - * 创建AppNamespace + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * 获取指定的AppNamespace (new added) */ - async openapiV1AppsAppIdAppnamespacesPostRaw(requestParameters: OpenapiV1AppsAppIdAppnamespacesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdAppnamespacesPost().' - ); + async getAppNamespaceRaw(requestParameters: GetAppNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getAppNamespace.'); } - if (requestParameters['openAppNamespaceDTO'] == null) { - throw new runtime.RequiredError( - 'openAppNamespaceDTO', - 'Required parameter "openAppNamespaceDTO" was null or undefined when calling openapiV1AppsAppIdAppnamespacesPost().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getAppNamespace.'); } const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; - headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/apps/{appId}/appnamespaces`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - const response = await this.request({ - path: urlPath, - method: 'POST', + path: `/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), + method: 'GET', headers: headerParameters, query: queryParameters, - body: OpenAppNamespaceDTOToJSON(requestParameters['openAppNamespaceDTO']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OpenAppNamespaceDTOFromJSON(jsonValue)); } /** - * POST /openapi/v1/apps/{appId}/appnamespaces - * 创建AppNamespace + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * 获取指定的AppNamespace (new added) */ - async openapiV1AppsAppIdAppnamespacesPost(requestParameters: OpenapiV1AppsAppIdAppnamespacesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1AppsAppIdAppnamespacesPostRaw(requestParameters, initOverrides); + async getAppNamespace(requestParameters: GetAppNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getAppNamespaceRaw(requestParameters, initOverrides); return await response.value(); } /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check - * 检查缺失的Namespace + * GET /openapi/v1/appnamespaces?public=true + * 获取所有公共AppNamespace (new added) */ - async openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGetRaw(requestParameters: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet().' - ); + async getAppNamespacesRaw(requestParameters: GetAppNamespacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters.publicOnly === null || requestParameters.publicOnly === undefined) { + throw new runtime.RequiredError('publicOnly','Required parameter requestParameters.publicOnly was null or undefined when calling getAppNamespaces.'); } - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet().' - ); + const queryParameters: any = {}; + + if (requestParameters.publicOnly !== undefined) { + queryParameters['publicOnly'] = requestParameters.publicOnly; } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet().' - ); + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/openapi/v1/appnamespaces`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenAppNamespaceDTOFromJSON)); + } + + /** + * GET /openapi/v1/appnamespaces?public=true + * 获取所有公共AppNamespace (new added) + */ + async getAppNamespaces(requestParameters: GetAppNamespacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getAppNamespacesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * GET /openapi/v1/apps/{appId}/appnamespaces + * 获取指定应用的AppNamespace (new added) + */ + async getAppNamespacesByAppRaw(requestParameters: GetAppNamespacesByAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getAppNamespacesByApp.'); } const queryParameters: any = {}; @@ -312,65 +448,47 @@ export class NamespaceManagementApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - const response = await this.request({ - path: urlPath, + path: `/openapi/v1/apps/{appId}/appnamespaces`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response); + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenAppNamespaceDTOFromJSON)); } /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check - * 检查缺失的Namespace + * GET /openapi/v1/apps/{appId}/appnamespaces + * 获取指定应用的AppNamespace (new added) */ - async openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet(requestParameters: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGetRaw(requestParameters, initOverrides); + async getAppNamespacesByApp(requestParameters: GetAppNamespacesByAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getAppNamespacesByAppRaw(requestParameters, initOverrides); return await response.value(); } /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association - * 获取关联的公共Namespace + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock + * 获取Namespace的锁状态 (original openapi) */ - async openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGetRaw(requestParameters: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet().' - ); + async getNamespaceLockRaw(requestParameters: GetNamespaceLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getNamespaceLock.'); } - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet().' - ); + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getNamespaceLock.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling getNamespaceLock.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getNamespaceLock.'); } const queryParameters: any = {}; @@ -378,91 +496,103 @@ export class NamespaceManagementApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OpenNamespaceLockDTOFromJSON(jsonValue)); + } + + /** + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock + * 获取Namespace的锁状态 (original openapi) + */ + async getNamespaceLock(requestParameters: GetNamespaceLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getNamespaceLockRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * GET /openapi/v1/apps/{appId}/namespaces/releases/status + * 获取应用下所有Namespace的发布状态 (new added) + */ + async getNamespacesReleaseStatusRaw(requestParameters: GetNamespacesReleaseStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getNamespacesReleaseStatus.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; - let urlPath = `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } const response = await this.request({ - path: urlPath, + path: `/openapi/v1/apps/{appId}/namespaces/releases/status`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OpenNamespaceDTOFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response); } /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association - * 获取关联的公共Namespace + * GET /openapi/v1/apps/{appId}/namespaces/releases/status + * 获取应用下所有Namespace的发布状态 (new added) */ - async openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet(requestParameters: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGetRaw(requestParameters, initOverrides); + async getNamespacesReleaseStatus(requestParameters: GetNamespacesReleaseStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: { [key: string]: boolean; }; }> { + const response = await this.getNamespacesReleaseStatusRaw(requestParameters, initOverrides); return await response.value(); } /** * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - * 获取公共AppNamespace的所有实例 + * 获取公共AppNamespace的所有实例 (new added) */ - async openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGetRaw(requestParameters: OpenapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet().' - ); + async getPublicAppNamespaceInstancesRaw(requestParameters: GetPublicAppNamespaceInstancesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getPublicAppNamespaceInstances.'); } - if (requestParameters['publicNamespaceName'] == null) { - throw new runtime.RequiredError( - 'publicNamespaceName', - 'Required parameter "publicNamespaceName" was null or undefined when calling openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet().' - ); + if (requestParameters.publicNamespaceName === null || requestParameters.publicNamespaceName === undefined) { + throw new runtime.RequiredError('publicNamespaceName','Required parameter requestParameters.publicNamespaceName was null or undefined when calling getPublicAppNamespaceInstances.'); } - if (requestParameters['page'] == null) { - throw new runtime.RequiredError( - 'page', - 'Required parameter "page" was null or undefined when calling openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet().' - ); + if (requestParameters.page === null || requestParameters.page === undefined) { + throw new runtime.RequiredError('page','Required parameter requestParameters.page was null or undefined when calling getPublicAppNamespaceInstances.'); } - if (requestParameters['size'] == null) { - throw new runtime.RequiredError( - 'size', - 'Required parameter "size" was null or undefined when calling openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet().' - ); + if (requestParameters.size === null || requestParameters.size === undefined) { + throw new runtime.RequiredError('size','Required parameter requestParameters.size was null or undefined when calling getPublicAppNamespaceInstances.'); } const queryParameters: any = {}; - if (requestParameters['page'] != null) { - queryParameters['page'] = requestParameters['page']; + if (requestParameters.page !== undefined) { + queryParameters['page'] = requestParameters.page; } - if (requestParameters['size'] != null) { - queryParameters['size'] = requestParameters['size']; + if (requestParameters.size !== undefined) { + queryParameters['size'] = requestParameters.size; } const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances`; - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"publicNamespaceName"}}`, encodeURIComponent(String(requestParameters['publicNamespaceName']))); - const response = await this.request({ - path: urlPath, + path: `/openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"publicNamespaceName"}}`, encodeURIComponent(String(requestParameters.publicNamespaceName))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -473,147 +603,114 @@ export class NamespaceManagementApi extends runtime.BaseAPI { /** * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - * 获取公共AppNamespace的所有实例 + * 获取公共AppNamespace的所有实例 (new added) */ - async openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet(requestParameters: OpenapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGetRaw(requestParameters, initOverrides); + async getPublicAppNamespaceInstances(requestParameters: GetPublicAppNamespaceInstancesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getPublicAppNamespaceInstancesRaw(requestParameters, initOverrides); return await response.value(); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - * 获取指定集群下的所有Namespace + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association + * 获取关联的公共Namespace (new added) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet().' - ); + async getPublicNamespaceAssociationRaw(requestParameters: GetPublicNamespaceAssociationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getPublicNamespaceAssociation.'); } - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet().' - ); + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getPublicNamespaceAssociation.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling getPublicNamespaceAssociation.'); } - if (requestParameters['fillItemDetail'] == null) { - throw new runtime.RequiredError( - 'fillItemDetail', - 'Required parameter "fillItemDetail" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getPublicNamespaceAssociation.'); } const queryParameters: any = {}; - if (requestParameters['fillItemDetail'] != null) { - queryParameters['fillItemDetail'] = requestParameters['fillItemDetail']; - } - const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - const response = await this.request({ - path: urlPath, + path: `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenNamespaceDTOFromJSON)); + return new runtime.JSONApiResponse(response, (jsonValue) => OpenNamespaceDTOFromJSON(jsonValue)); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - * 获取指定集群下的所有Namespace + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association + * 获取关联的公共Namespace (new added) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetRaw(requestParameters, initOverrides); + async getPublicNamespaceAssociation(requestParameters: GetPublicNamespaceAssociationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getPublicNamespaceAssociationRaw(requestParameters, initOverrides); return await response.value(); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - * 获取Namespace的锁状态 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} + * 获取指定的Namespace (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet().' - ); + async loadNamespaceRaw(requestParameters: LoadNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling loadNamespace.'); } - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet().' - ); + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling loadNamespace.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling loadNamespace.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling loadNamespace.'); + } + + if (requestParameters.fillItemDetail === null || requestParameters.fillItemDetail === undefined) { + throw new runtime.RequiredError('fillItemDetail','Required parameter requestParameters.fillItemDetail was null or undefined when calling loadNamespace.'); } const queryParameters: any = {}; + if (requestParameters.fillItemDetail !== undefined) { + queryParameters['fillItemDetail'] = requestParameters.fillItemDetail; + } + const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - const response = await this.request({ - path: urlPath, + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OpenNamespaceLockDTOFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => OpenNamespaceDTOFromJSON(jsonValue)); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - * 获取Namespace的锁状态 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} + * 获取指定的Namespace (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGetRaw(requestParameters, initOverrides); + async loadNamespace(requestParameters: LoadNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.loadNamespaceRaw(requestParameters, initOverrides); return await response.value(); } diff --git a/typescript/src/apis/OrganizationManagementApi.ts b/typescript/src/apis/OrganizationManagementApi.ts index 5e2c29d6..764e447e 100644 --- a/typescript/src/apis/OrganizationManagementApi.ts +++ b/typescript/src/apis/OrganizationManagementApi.ts @@ -2,10 +2,10 @@ /* eslint-disable */ /** * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -16,38 +16,32 @@ import * as runtime from '../runtime'; import type { OpenOrganizationDto, - OpenapiV1AppsGet401Response, -} from '../models/index'; +} from '../models'; import { OpenOrganizationDtoFromJSON, OpenOrganizationDtoToJSON, - OpenapiV1AppsGet401ResponseFromJSON, - OpenapiV1AppsGet401ResponseToJSON, -} from '../models/index'; +} from '../models'; /** - * + * */ export class OrganizationManagementApi extends runtime.BaseAPI { /** * GET /openapi/v1/organizations - * 获取所有组织信息 + * 获取所有组织信息 (original openapi) */ - async openapiV1OrganizationsGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + async getOrganizationRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/organizations`; - const response = await this.request({ - path: urlPath, + path: `/openapi/v1/organizations`, method: 'GET', headers: headerParameters, query: queryParameters, @@ -58,10 +52,10 @@ export class OrganizationManagementApi extends runtime.BaseAPI { /** * GET /openapi/v1/organizations - * 获取所有组织信息 + * 获取所有组织信息 (original openapi) */ - async openapiV1OrganizationsGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1OrganizationsGetRaw(initOverrides); + async getOrganization(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getOrganizationRaw(initOverrides); return await response.value(); } diff --git a/typescript/src/apis/ReleaseManagementApi.ts b/typescript/src/apis/ReleaseManagementApi.ts index fcbdc786..f7738e92 100644 --- a/typescript/src/apis/ReleaseManagementApi.ts +++ b/typescript/src/apis/ReleaseManagementApi.ts @@ -2,10 +2,10 @@ /* eslint-disable */ /** * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -15,484 +15,411 @@ import * as runtime from '../runtime'; import type { - ListReleaseBO, + NamespaceGrayDelReleaseDTO, NamespaceReleaseDTO, + OpenReleaseBO, OpenReleaseDTO, - OpenapiV1AppsGet401Response, - OpenapiV1EnvsEnvReleasesCompareGet200Response, -} from '../models/index'; +} from '../models'; import { - ListReleaseBOFromJSON, - ListReleaseBOToJSON, + NamespaceGrayDelReleaseDTOFromJSON, + NamespaceGrayDelReleaseDTOToJSON, NamespaceReleaseDTOFromJSON, NamespaceReleaseDTOToJSON, + OpenReleaseBOFromJSON, + OpenReleaseBOToJSON, OpenReleaseDTOFromJSON, OpenReleaseDTOToJSON, - OpenapiV1AppsGet401ResponseFromJSON, - OpenapiV1AppsGet401ResponseToJSON, - OpenapiV1EnvsEnvReleasesCompareGet200ResponseFromJSON, - OpenapiV1EnvsEnvReleasesCompareGet200ResponseToJSON, -} from '../models/index'; +} from '../models'; -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGetRequest { +export interface CreateGrayDelReleaseRequest { appId: string; env: string; clusterName: string; namespaceName: string; - page: number; - size: number; + branchName: string; + namespaceGrayDelReleaseDTO: NamespaceGrayDelReleaseDTO; } -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGetRequest { +export interface CreateGrayReleaseRequest { appId: string; env: string; clusterName: string; namespaceName: string; - page: number; - size: number; + branchName: string; + namespaceReleaseDTO: NamespaceReleaseDTO; } -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGetRequest { +export interface CreateReleaseRequest { appId: string; env: string; clusterName: string; namespaceName: string; + namespaceReleaseDTO: NamespaceReleaseDTO; } -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPostRequest { +export interface FindActiveReleasesRequest { appId: string; env: string; clusterName: string; namespaceName: string; - namespaceReleaseDTO: NamespaceReleaseDTO; + page: number; + size: number; } -export interface OpenapiV1EnvsEnvReleasesCompareGetRequest { +export interface FindAllReleasesRequest { + appId: string; env: string; - baseReleaseId: number; - toCompareReleaseId: number; + clusterName: string; + namespaceName: string; + page: number; + size: number; } -export interface OpenapiV1EnvsEnvReleasesReleaseIdGetRequest { +export interface GetReleaseByIdRequest { env: string; releaseId: number; } -export interface OpenapiV1EnvsEnvReleasesReleaseIdRollbackPutRequest { +export interface LoadLatestActiveReleaseRequest { + appId: string; + env: string; + clusterName: string; + namespaceName: string; +} + +export interface MergeRequest { + appId: string; + env: string; + clusterName: string; + namespaceName: string; + branchName: string; + deleteBranch: boolean; + namespaceReleaseDTO: NamespaceReleaseDTO; +} + +export interface RollbackRequest { env: string; releaseId: number; operator: string; } /** - * + * */ export class ReleaseManagementApi extends runtime.BaseAPI { /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active - * 获取活跃发布(分页) + * + * 创建灰度删除发布 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet().' - ); + async createGrayDelReleaseRaw(requestParameters: CreateGrayDelReleaseRequest, 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 createGrayDelRelease.'); } - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet().' - ); + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling createGrayDelRelease.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling createGrayDelRelease.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling createGrayDelRelease.'); } - if (requestParameters['page'] == null) { - throw new runtime.RequiredError( - 'page', - 'Required parameter "page" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet().' - ); + if (requestParameters.branchName === null || requestParameters.branchName === undefined) { + throw new runtime.RequiredError('branchName','Required parameter requestParameters.branchName was null or undefined when calling createGrayDelRelease.'); } - if (requestParameters['size'] == null) { - throw new runtime.RequiredError( - 'size', - 'Required parameter "size" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet().' - ); + if (requestParameters.namespaceGrayDelReleaseDTO === null || requestParameters.namespaceGrayDelReleaseDTO === undefined) { + throw new runtime.RequiredError('namespaceGrayDelReleaseDTO','Required parameter requestParameters.namespaceGrayDelReleaseDTO was null or undefined when calling createGrayDelRelease.'); } const queryParameters: any = {}; - if (requestParameters['page'] != null) { - queryParameters['page'] = requestParameters['page']; - } - - if (requestParameters['size'] != null) { - queryParameters['size'] = requestParameters['size']; - } - const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - const response = await this.request({ - path: urlPath, - method: 'GET', + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters.branchName))), + method: 'POST', headers: headerParameters, query: queryParameters, + body: NamespaceGrayDelReleaseDTOToJSON(requestParameters.namespaceGrayDelReleaseDTO), }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenReleaseDTOFromJSON)); + return new runtime.JSONApiResponse(response, (jsonValue) => OpenReleaseDTOFromJSON(jsonValue)); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active - * 获取活跃发布(分页) + * + * 创建灰度删除发布 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGetRaw(requestParameters, initOverrides); + async createGrayDelRelease(requestParameters: CreateGrayDelReleaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createGrayDelReleaseRaw(requestParameters, initOverrides); return await response.value(); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all - * 获取所有发布(分页) + * 创建灰度发布 + * 创建灰度发布 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet().' - ); + async createGrayReleaseRaw(requestParameters: CreateGrayReleaseRequest, 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 createGrayRelease.'); } - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet().' - ); + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling createGrayRelease.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling createGrayRelease.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling createGrayRelease.'); } - if (requestParameters['page'] == null) { - throw new runtime.RequiredError( - 'page', - 'Required parameter "page" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet().' - ); + if (requestParameters.branchName === null || requestParameters.branchName === undefined) { + throw new runtime.RequiredError('branchName','Required parameter requestParameters.branchName was null or undefined when calling createGrayRelease.'); } - if (requestParameters['size'] == null) { - throw new runtime.RequiredError( - 'size', - 'Required parameter "size" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet().' - ); + if (requestParameters.namespaceReleaseDTO === null || requestParameters.namespaceReleaseDTO === undefined) { + throw new runtime.RequiredError('namespaceReleaseDTO','Required parameter requestParameters.namespaceReleaseDTO was null or undefined when calling createGrayRelease.'); } const queryParameters: any = {}; - if (requestParameters['page'] != null) { - queryParameters['page'] = requestParameters['page']; - } - - if (requestParameters['size'] != null) { - queryParameters['size'] = requestParameters['size']; - } - const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - const response = await this.request({ - path: urlPath, - method: 'GET', + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters.branchName))), + method: 'POST', headers: headerParameters, query: queryParameters, + body: NamespaceReleaseDTOToJSON(requestParameters.namespaceReleaseDTO), }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ListReleaseBOFromJSON)); + return new runtime.JSONApiResponse(response, (jsonValue) => OpenReleaseDTOFromJSON(jsonValue)); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all - * 获取所有发布(分页) + * 创建灰度发布 + * 创建灰度发布 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGetRaw(requestParameters, initOverrides); + async createGrayRelease(requestParameters: CreateGrayReleaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createGrayReleaseRaw(requestParameters, initOverrides); return await response.value(); } /** - * - * 获取最新活跃发布 + * 创建发布 + * 创建发布 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet().' - ); + async createReleaseRaw(requestParameters: CreateReleaseRequest, 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 createRelease.'); } - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet().' - ); + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling createRelease.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling createRelease.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling createRelease.'); + } + + if (requestParameters.namespaceReleaseDTO === null || requestParameters.namespaceReleaseDTO === undefined) { + throw new runtime.RequiredError('namespaceReleaseDTO','Required parameter requestParameters.namespaceReleaseDTO was null or undefined when calling createRelease.'); } const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - const response = await this.request({ - path: urlPath, - method: 'GET', + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), + method: 'POST', headers: headerParameters, query: queryParameters, + body: NamespaceReleaseDTOToJSON(requestParameters.namespaceReleaseDTO), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => OpenReleaseDTOFromJSON(jsonValue)); } /** - * - * 获取最新活跃发布 + * 创建发布 + * 创建发布 (original openapi) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGetRaw(requestParameters, initOverrides); + async createRelease(requestParameters: CreateReleaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createReleaseRaw(requestParameters, initOverrides); return await response.value(); } /** - * - * 创建发布 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active + * 获取活跃发布(分页) (new added) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPostRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost().' - ); + async findActiveReleasesRaw(requestParameters: FindActiveReleasesRequest, 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 findActiveReleases.'); } - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost().' - ); + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling findActiveReleases.'); } - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling findActiveReleases.'); } - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling findActiveReleases.'); } - if (requestParameters['namespaceReleaseDTO'] == null) { - throw new runtime.RequiredError( - 'namespaceReleaseDTO', - 'Required parameter "namespaceReleaseDTO" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost().' - ); + if (requestParameters.page === null || requestParameters.page === undefined) { + throw new runtime.RequiredError('page','Required parameter requestParameters.page was null or undefined when calling findActiveReleases.'); } - const queryParameters: any = {}; + if (requestParameters.size === null || requestParameters.size === undefined) { + throw new runtime.RequiredError('size','Required parameter requestParameters.size was null or undefined when calling findActiveReleases.'); + } - const headerParameters: runtime.HTTPHeaders = {}; + const queryParameters: any = {}; - headerParameters['Content-Type'] = 'application/json'; + if (requestParameters.page !== undefined) { + queryParameters['page'] = requestParameters.page; + } - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + if (requestParameters.size !== undefined) { + queryParameters['size'] = requestParameters.size; } + const headerParameters: runtime.HTTPHeaders = {}; - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } const response = await this.request({ - path: urlPath, - method: 'POST', + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), + method: 'GET', headers: headerParameters, query: queryParameters, - body: NamespaceReleaseDTOToJSON(requestParameters['namespaceReleaseDTO']), }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OpenReleaseDTOFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenReleaseDTOFromJSON)); } /** - * - * 创建发布 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active + * 获取活跃发布(分页) (new added) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPostRaw(requestParameters, initOverrides); + async findActiveReleases(requestParameters: FindActiveReleasesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.findActiveReleasesRaw(requestParameters, initOverrides); return await response.value(); } /** - * GET /openapi/v1/envs/{env}/releases/compare - * 对比发布 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all + * 获取所有发布(分页) (new added) */ - async openapiV1EnvsEnvReleasesCompareGetRaw(requestParameters: OpenapiV1EnvsEnvReleasesCompareGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvReleasesCompareGet().' - ); + async findAllReleasesRaw(requestParameters: FindAllReleasesRequest, 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 findAllReleases.'); } - if (requestParameters['baseReleaseId'] == null) { - throw new runtime.RequiredError( - 'baseReleaseId', - 'Required parameter "baseReleaseId" was null or undefined when calling openapiV1EnvsEnvReleasesCompareGet().' - ); + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling findAllReleases.'); } - if (requestParameters['toCompareReleaseId'] == null) { - throw new runtime.RequiredError( - 'toCompareReleaseId', - 'Required parameter "toCompareReleaseId" was null or undefined when calling openapiV1EnvsEnvReleasesCompareGet().' - ); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling findAllReleases.'); + } + + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling findAllReleases.'); + } + + if (requestParameters.page === null || requestParameters.page === undefined) { + throw new runtime.RequiredError('page','Required parameter requestParameters.page was null or undefined when calling findAllReleases.'); + } + + if (requestParameters.size === null || requestParameters.size === undefined) { + throw new runtime.RequiredError('size','Required parameter requestParameters.size was null or undefined when calling findAllReleases.'); } const queryParameters: any = {}; - if (requestParameters['baseReleaseId'] != null) { - queryParameters['baseReleaseId'] = requestParameters['baseReleaseId']; + if (requestParameters.page !== undefined) { + queryParameters['page'] = requestParameters.page; } - if (requestParameters['toCompareReleaseId'] != null) { - queryParameters['toCompareReleaseId'] = requestParameters['toCompareReleaseId']; + if (requestParameters.size !== undefined) { + queryParameters['size'] = requestParameters.size; } const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } - - let urlPath = `/openapi/v1/envs/{env}/releases/compare`; - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - const response = await this.request({ - path: urlPath, + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OpenapiV1EnvsEnvReleasesCompareGet200ResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenReleaseBOFromJSON)); } /** - * GET /openapi/v1/envs/{env}/releases/compare - * 对比发布 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all + * 获取所有发布(分页) (new added) */ - async openapiV1EnvsEnvReleasesCompareGet(requestParameters: OpenapiV1EnvsEnvReleasesCompareGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvReleasesCompareGetRaw(requestParameters, initOverrides); + async findAllReleases(requestParameters: FindAllReleasesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.findAllReleasesRaw(requestParameters, initOverrides); return await response.value(); } /** * GET /openapi/v1/envs/{env}/releases/{releaseId} - * 获取发布详情 + * 获取发布详情 (new added) */ - async openapiV1EnvsEnvReleasesReleaseIdGetRaw(requestParameters: OpenapiV1EnvsEnvReleasesReleaseIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdGet().' - ); + async getReleaseByIdRaw(requestParameters: GetReleaseByIdRequest, 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 getReleaseById.'); } - if (requestParameters['releaseId'] == null) { - throw new runtime.RequiredError( - 'releaseId', - 'Required parameter "releaseId" was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdGet().' - ); + if (requestParameters.releaseId === null || requestParameters.releaseId === undefined) { + throw new runtime.RequiredError('releaseId','Required parameter requestParameters.releaseId was null or undefined when calling getReleaseById.'); } const queryParameters: any = {}; @@ -500,16 +427,59 @@ export class ReleaseManagementApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ + path: `/openapi/v1/envs/{env}/releases/{releaseId}`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"releaseId"}}`, encodeURIComponent(String(requestParameters.releaseId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OpenReleaseDTOFromJSON(jsonValue)); + } - let urlPath = `/openapi/v1/envs/{env}/releases/{releaseId}`; - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"releaseId"}}`, encodeURIComponent(String(requestParameters['releaseId']))); + /** + * GET /openapi/v1/envs/{env}/releases/{releaseId} + * 获取发布详情 (new added) + */ + async getReleaseById(requestParameters: GetReleaseByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getReleaseByIdRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * 查询命名空间最新活跃发布 + * 获取最新活跃发布 (original openapi) + */ + async loadLatestActiveReleaseRaw(requestParameters: LoadLatestActiveReleaseRequest, 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 loadLatestActiveRelease.'); + } + + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling loadLatestActiveRelease.'); + } + + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling loadLatestActiveRelease.'); + } + + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling loadLatestActiveRelease.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } const response = await this.request({ - path: urlPath, + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -519,59 +489,112 @@ export class ReleaseManagementApi extends runtime.BaseAPI { } /** - * GET /openapi/v1/envs/{env}/releases/{releaseId} - * 获取发布详情 + * 查询命名空间最新活跃发布 + * 获取最新活跃发布 (original openapi) */ - async openapiV1EnvsEnvReleasesReleaseIdGet(requestParameters: OpenapiV1EnvsEnvReleasesReleaseIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvReleasesReleaseIdGetRaw(requestParameters, initOverrides); + async loadLatestActiveRelease(requestParameters: LoadLatestActiveReleaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.loadLatestActiveReleaseRaw(requestParameters, initOverrides); return await response.value(); } /** - * - * 回滚发布 + * 合并灰度分支并可选择删除分支 + * 合并分支 (original openapi) */ - async openapiV1EnvsEnvReleasesReleaseIdRollbackPutRaw(requestParameters: OpenapiV1EnvsEnvReleasesReleaseIdRollbackPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdRollbackPut().' - ); + async mergeRaw(requestParameters: MergeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling merge.'); + } + + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling merge.'); + } + + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling merge.'); } - if (requestParameters['releaseId'] == null) { - throw new runtime.RequiredError( - 'releaseId', - 'Required parameter "releaseId" was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdRollbackPut().' - ); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling merge.'); } - if (requestParameters['operator'] == null) { - throw new runtime.RequiredError( - 'operator', - 'Required parameter "operator" was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdRollbackPut().' - ); + if (requestParameters.branchName === null || requestParameters.branchName === undefined) { + throw new runtime.RequiredError('branchName','Required parameter requestParameters.branchName was null or undefined when calling merge.'); + } + + if (requestParameters.deleteBranch === null || requestParameters.deleteBranch === undefined) { + throw new runtime.RequiredError('deleteBranch','Required parameter requestParameters.deleteBranch was null or undefined when calling merge.'); + } + + if (requestParameters.namespaceReleaseDTO === null || requestParameters.namespaceReleaseDTO === undefined) { + throw new runtime.RequiredError('namespaceReleaseDTO','Required parameter requestParameters.namespaceReleaseDTO was null or undefined when calling merge.'); } const queryParameters: any = {}; - if (requestParameters['operator'] != null) { - queryParameters['operator'] = requestParameters['operator']; + if (requestParameters.deleteBranch !== undefined) { + queryParameters['deleteBranch'] = requestParameters.deleteBranch; } const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } + const response = await this.request({ + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters.branchName))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: NamespaceReleaseDTOToJSON(requestParameters.namespaceReleaseDTO), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OpenReleaseDTOFromJSON(jsonValue)); + } - let urlPath = `/openapi/v1/envs/{env}/releases/{releaseId}/rollback`; - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"releaseId"}}`, encodeURIComponent(String(requestParameters['releaseId']))); + /** + * 合并灰度分支并可选择删除分支 + * 合并分支 (original openapi) + */ + async merge(requestParameters: MergeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.mergeRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * 回滚到指定的发布版本 + * 回滚发布 (original openapi) + */ + async rollbackRaw(requestParameters: RollbackRequest, 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 rollback.'); + } + + if (requestParameters.releaseId === null || requestParameters.releaseId === undefined) { + throw new runtime.RequiredError('releaseId','Required parameter requestParameters.releaseId was null or undefined when calling rollback.'); + } + + if (requestParameters.operator === null || requestParameters.operator === undefined) { + throw new runtime.RequiredError('operator','Required parameter requestParameters.operator was null or undefined when calling rollback.'); + } + + const queryParameters: any = {}; + + if (requestParameters.operator !== undefined) { + queryParameters['operator'] = requestParameters.operator; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } const response = await this.request({ - path: urlPath, + path: `/openapi/v1/envs/{env}/releases/{releaseId}/rollback`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"releaseId"}}`, encodeURIComponent(String(requestParameters.releaseId))), method: 'PUT', headers: headerParameters, query: queryParameters, @@ -581,11 +604,11 @@ export class ReleaseManagementApi extends runtime.BaseAPI { } /** - * - * 回滚发布 + * 回滚到指定的发布版本 + * 回滚发布 (original openapi) */ - async openapiV1EnvsEnvReleasesReleaseIdRollbackPut(requestParameters: OpenapiV1EnvsEnvReleasesReleaseIdRollbackPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvReleasesReleaseIdRollbackPutRaw(requestParameters, initOverrides); + async rollback(requestParameters: RollbackRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.rollbackRaw(requestParameters, initOverrides); return await response.value(); } diff --git a/typescript/src/index.ts b/typescript/src/index.ts index bebe8bbb..be9d1ede 100644 --- a/typescript/src/index.ts +++ b/typescript/src/index.ts @@ -1,5 +1,5 @@ /* tslint:disable */ /* eslint-disable */ export * from './runtime'; -export * from './apis/index'; -export * from './models/index'; +export * from './apis'; +export * from './models'; diff --git a/typescript/src/models/Change.ts b/typescript/src/models/Change.ts deleted file mode 100644 index 788b2d10..00000000 --- a/typescript/src/models/Change.ts +++ /dev/null @@ -1,93 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { EntityPairKVEntity } from './EntityPairKVEntity'; -import { - EntityPairKVEntityFromJSON, - EntityPairKVEntityFromJSONTyped, - EntityPairKVEntityToJSON, - EntityPairKVEntityToJSONTyped, -} from './EntityPairKVEntity'; - -/** - * - * @export - * @interface Change - */ -export interface Change { - /** - * - * @type {string} - * @memberof Change - */ - type?: ChangeTypeEnum; - /** - * - * @type {EntityPairKVEntity} - * @memberof Change - */ - entity?: EntityPairKVEntity; -} - - -/** - * @export - */ -export const ChangeTypeEnum = { - Added: 'ADDED', - Modified: 'MODIFIED', - Deleted: 'DELETED' -} as const; -export type ChangeTypeEnum = typeof ChangeTypeEnum[keyof typeof ChangeTypeEnum]; - - -/** - * Check if a given object implements the Change interface. - */ -export function instanceOfChange(value: object): value is Change { - return true; -} - -export function ChangeFromJSON(json: any): Change { - return ChangeFromJSONTyped(json, false); -} - -export function ChangeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Change { - if (json == null) { - return json; - } - return { - - 'type': json['type'] == null ? undefined : json['type'], - 'entity': json['entity'] == null ? undefined : EntityPairKVEntityFromJSON(json['entity']), - }; -} - -export function ChangeToJSON(json: any): Change { - return ChangeToJSONTyped(json, false); -} - -export function ChangeToJSONTyped(value?: Change | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'type': value['type'], - 'entity': EntityPairKVEntityToJSON(value['entity']), - }; -} - diff --git a/typescript/src/models/ClusterDTO.ts b/typescript/src/models/ClusterDTO.ts deleted file mode 100644 index fdaa7a39..00000000 --- a/typescript/src/models/ClusterDTO.ts +++ /dev/null @@ -1,147 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface ClusterDTO - */ -export interface ClusterDTO { - /** - * - * @type {string} - * @memberof ClusterDTO - */ - dataChangeCreatedBy?: string; - /** - * - * @type {string} - * @memberof ClusterDTO - */ - dataChangeLastModifiedBy?: string; - /** - * - * @type {string} - * @memberof ClusterDTO - */ - dataChangeCreatedByDisplayName?: string; - /** - * - * @type {string} - * @memberof ClusterDTO - */ - dataChangeLastModifiedByDisplayName?: string; - /** - * - * @type {string} - * @memberof ClusterDTO - */ - dataChangeCreatedTime?: string; - /** - * - * @type {string} - * @memberof ClusterDTO - */ - dataChangeLastModifiedTime?: string; - /** - * - * @type {number} - * @memberof ClusterDTO - */ - id?: number; - /** - * - * @type {string} - * @memberof ClusterDTO - */ - name: string; - /** - * - * @type {string} - * @memberof ClusterDTO - */ - appId: string; - /** - * - * @type {number} - * @memberof ClusterDTO - */ - parentClusterId?: number; - /** - * - * @type {string} - * @memberof ClusterDTO - */ - comment?: string; -} - -/** - * Check if a given object implements the ClusterDTO interface. - */ -export function instanceOfClusterDTO(value: object): value is ClusterDTO { - if (!('name' in value) || value['name'] === undefined) return false; - if (!('appId' in value) || value['appId'] === undefined) return false; - return true; -} - -export function ClusterDTOFromJSON(json: any): ClusterDTO { - return ClusterDTOFromJSONTyped(json, false); -} - -export function ClusterDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterDTO { - if (json == null) { - return json; - } - return { - - 'dataChangeCreatedBy': json['dataChangeCreatedBy'] == null ? undefined : json['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': json['dataChangeLastModifiedBy'] == null ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeCreatedByDisplayName': json['dataChangeCreatedByDisplayName'] == null ? undefined : json['dataChangeCreatedByDisplayName'], - 'dataChangeLastModifiedByDisplayName': json['dataChangeLastModifiedByDisplayName'] == null ? undefined : json['dataChangeLastModifiedByDisplayName'], - 'dataChangeCreatedTime': json['dataChangeCreatedTime'] == null ? undefined : json['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': json['dataChangeLastModifiedTime'] == null ? undefined : json['dataChangeLastModifiedTime'], - 'id': json['id'] == null ? undefined : json['id'], - 'name': json['name'], - 'appId': json['appId'], - 'parentClusterId': json['parentClusterId'] == null ? undefined : json['parentClusterId'], - 'comment': json['comment'] == null ? undefined : json['comment'], - }; -} - -export function ClusterDTOToJSON(json: any): ClusterDTO { - return ClusterDTOToJSONTyped(json, false); -} - -export function ClusterDTOToJSONTyped(value?: ClusterDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'dataChangeCreatedBy': value['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': value['dataChangeLastModifiedBy'], - 'dataChangeCreatedByDisplayName': value['dataChangeCreatedByDisplayName'], - 'dataChangeLastModifiedByDisplayName': value['dataChangeLastModifiedByDisplayName'], - 'dataChangeCreatedTime': value['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': value['dataChangeLastModifiedTime'], - 'id': value['id'], - 'name': value['name'], - 'appId': value['appId'], - 'parentClusterId': value['parentClusterId'], - 'comment': value['comment'], - }; -} - diff --git a/typescript/src/models/EntityPairKVEntity.ts b/typescript/src/models/EntityPairKVEntity.ts deleted file mode 100644 index 4628bb82..00000000 --- a/typescript/src/models/EntityPairKVEntity.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { KVEntity } from './KVEntity'; -import { - KVEntityFromJSON, - KVEntityFromJSONTyped, - KVEntityToJSON, - KVEntityToJSONTyped, -} from './KVEntity'; - -/** - * - * @export - * @interface EntityPairKVEntity - */ -export interface EntityPairKVEntity { - /** - * - * @type {KVEntity} - * @memberof EntityPairKVEntity - */ - firstEntity?: KVEntity; - /** - * - * @type {KVEntity} - * @memberof EntityPairKVEntity - */ - secondEntity?: KVEntity; -} - -/** - * Check if a given object implements the EntityPairKVEntity interface. - */ -export function instanceOfEntityPairKVEntity(value: object): value is EntityPairKVEntity { - return true; -} - -export function EntityPairKVEntityFromJSON(json: any): EntityPairKVEntity { - return EntityPairKVEntityFromJSONTyped(json, false); -} - -export function EntityPairKVEntityFromJSONTyped(json: any, ignoreDiscriminator: boolean): EntityPairKVEntity { - if (json == null) { - return json; - } - return { - - 'firstEntity': json['firstEntity'] == null ? undefined : KVEntityFromJSON(json['firstEntity']), - 'secondEntity': json['secondEntity'] == null ? undefined : KVEntityFromJSON(json['secondEntity']), - }; -} - -export function EntityPairKVEntityToJSON(json: any): EntityPairKVEntity { - return EntityPairKVEntityToJSONTyped(json, false); -} - -export function EntityPairKVEntityToJSONTyped(value?: EntityPairKVEntity | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'firstEntity': KVEntityToJSON(value['firstEntity']), - 'secondEntity': KVEntityToJSON(value['secondEntity']), - }; -} - diff --git a/typescript/src/models/EnvClusterInfo.ts b/typescript/src/models/EnvClusterInfo.ts deleted file mode 100644 index 18610bff..00000000 --- a/typescript/src/models/EnvClusterInfo.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { ClusterDTO } from './ClusterDTO'; -import { - ClusterDTOFromJSON, - ClusterDTOFromJSONTyped, - ClusterDTOToJSON, - ClusterDTOToJSONTyped, -} from './ClusterDTO'; - -/** - * - * @export - * @interface EnvClusterInfo - */ -export interface EnvClusterInfo { - /** - * - * @type {string} - * @memberof EnvClusterInfo - */ - env?: string; - /** - * - * @type {Array} - * @memberof EnvClusterInfo - */ - clusters?: Array; -} - -/** - * Check if a given object implements the EnvClusterInfo interface. - */ -export function instanceOfEnvClusterInfo(value: object): value is EnvClusterInfo { - return true; -} - -export function EnvClusterInfoFromJSON(json: any): EnvClusterInfo { - return EnvClusterInfoFromJSONTyped(json, false); -} - -export function EnvClusterInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnvClusterInfo { - if (json == null) { - return json; - } - return { - - 'env': json['env'] == null ? undefined : json['env'], - 'clusters': json['clusters'] == null ? undefined : ((json['clusters'] as Array).map(ClusterDTOFromJSON)), - }; -} - -export function EnvClusterInfoToJSON(json: any): EnvClusterInfo { - return EnvClusterInfoToJSONTyped(json, false); -} - -export function EnvClusterInfoToJSONTyped(value?: EnvClusterInfo | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'env': value['env'], - 'clusters': value['clusters'] == null ? undefined : ((value['clusters'] as Array).map(ClusterDTOToJSON)), - }; -} - diff --git a/typescript/src/models/ItemChangeSets.ts b/typescript/src/models/ItemChangeSets.ts deleted file mode 100644 index 34d8f649..00000000 --- a/typescript/src/models/ItemChangeSets.ts +++ /dev/null @@ -1,137 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { ItemDTO } from './ItemDTO'; -import { - ItemDTOFromJSON, - ItemDTOFromJSONTyped, - ItemDTOToJSON, - ItemDTOToJSONTyped, -} from './ItemDTO'; - -/** - * - * @export - * @interface ItemChangeSets - */ -export interface ItemChangeSets { - /** - * - * @type {string} - * @memberof ItemChangeSets - */ - dataChangeCreatedBy?: string; - /** - * - * @type {string} - * @memberof ItemChangeSets - */ - dataChangeLastModifiedBy?: string; - /** - * - * @type {string} - * @memberof ItemChangeSets - */ - dataChangeCreatedByDisplayName?: string; - /** - * - * @type {string} - * @memberof ItemChangeSets - */ - dataChangeLastModifiedByDisplayName?: string; - /** - * - * @type {string} - * @memberof ItemChangeSets - */ - dataChangeCreatedTime?: string; - /** - * - * @type {string} - * @memberof ItemChangeSets - */ - dataChangeLastModifiedTime?: string; - /** - * - * @type {Array} - * @memberof ItemChangeSets - */ - createItems?: Array; - /** - * - * @type {Array} - * @memberof ItemChangeSets - */ - updateItems?: Array; - /** - * - * @type {Array} - * @memberof ItemChangeSets - */ - deleteItems?: Array; -} - -/** - * Check if a given object implements the ItemChangeSets interface. - */ -export function instanceOfItemChangeSets(value: object): value is ItemChangeSets { - return true; -} - -export function ItemChangeSetsFromJSON(json: any): ItemChangeSets { - return ItemChangeSetsFromJSONTyped(json, false); -} - -export function ItemChangeSetsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ItemChangeSets { - if (json == null) { - return json; - } - return { - - 'dataChangeCreatedBy': json['dataChangeCreatedBy'] == null ? undefined : json['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': json['dataChangeLastModifiedBy'] == null ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeCreatedByDisplayName': json['dataChangeCreatedByDisplayName'] == null ? undefined : json['dataChangeCreatedByDisplayName'], - 'dataChangeLastModifiedByDisplayName': json['dataChangeLastModifiedByDisplayName'] == null ? undefined : json['dataChangeLastModifiedByDisplayName'], - 'dataChangeCreatedTime': json['dataChangeCreatedTime'] == null ? undefined : json['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': json['dataChangeLastModifiedTime'] == null ? undefined : json['dataChangeLastModifiedTime'], - 'createItems': json['createItems'] == null ? undefined : ((json['createItems'] as Array).map(ItemDTOFromJSON)), - 'updateItems': json['updateItems'] == null ? undefined : ((json['updateItems'] as Array).map(ItemDTOFromJSON)), - 'deleteItems': json['deleteItems'] == null ? undefined : ((json['deleteItems'] as Array).map(ItemDTOFromJSON)), - }; -} - -export function ItemChangeSetsToJSON(json: any): ItemChangeSets { - return ItemChangeSetsToJSONTyped(json, false); -} - -export function ItemChangeSetsToJSONTyped(value?: ItemChangeSets | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'dataChangeCreatedBy': value['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': value['dataChangeLastModifiedBy'], - 'dataChangeCreatedByDisplayName': value['dataChangeCreatedByDisplayName'], - 'dataChangeLastModifiedByDisplayName': value['dataChangeLastModifiedByDisplayName'], - 'dataChangeCreatedTime': value['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': value['dataChangeLastModifiedTime'], - 'createItems': value['createItems'] == null ? undefined : ((value['createItems'] as Array).map(ItemDTOToJSON)), - 'updateItems': value['updateItems'] == null ? undefined : ((value['updateItems'] as Array).map(ItemDTOToJSON)), - 'deleteItems': value['deleteItems'] == null ? undefined : ((value['deleteItems'] as Array).map(ItemDTOToJSON)), - }; -} - diff --git a/typescript/src/models/ItemDTO.ts b/typescript/src/models/ItemDTO.ts deleted file mode 100644 index 1b86f468..00000000 --- a/typescript/src/models/ItemDTO.ts +++ /dev/null @@ -1,161 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface ItemDTO - */ -export interface ItemDTO { - /** - * - * @type {string} - * @memberof ItemDTO - */ - dataChangeCreatedBy?: string; - /** - * - * @type {string} - * @memberof ItemDTO - */ - dataChangeLastModifiedBy?: string; - /** - * - * @type {string} - * @memberof ItemDTO - */ - dataChangeCreatedByDisplayName?: string; - /** - * - * @type {string} - * @memberof ItemDTO - */ - dataChangeLastModifiedByDisplayName?: string; - /** - * - * @type {string} - * @memberof ItemDTO - */ - dataChangeCreatedTime?: string; - /** - * - * @type {string} - * @memberof ItemDTO - */ - dataChangeLastModifiedTime?: string; - /** - * - * @type {number} - * @memberof ItemDTO - */ - id?: number; - /** - * - * @type {number} - * @memberof ItemDTO - */ - namespaceId?: number; - /** - * - * @type {string} - * @memberof ItemDTO - */ - key?: string; - /** - * - * @type {number} - * @memberof ItemDTO - */ - type?: number; - /** - * - * @type {string} - * @memberof ItemDTO - */ - value?: string; - /** - * - * @type {string} - * @memberof ItemDTO - */ - comment?: string; - /** - * - * @type {number} - * @memberof ItemDTO - */ - lineNum?: number; -} - -/** - * Check if a given object implements the ItemDTO interface. - */ -export function instanceOfItemDTO(value: object): value is ItemDTO { - return true; -} - -export function ItemDTOFromJSON(json: any): ItemDTO { - return ItemDTOFromJSONTyped(json, false); -} - -export function ItemDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): ItemDTO { - if (json == null) { - return json; - } - return { - - 'dataChangeCreatedBy': json['dataChangeCreatedBy'] == null ? undefined : json['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': json['dataChangeLastModifiedBy'] == null ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeCreatedByDisplayName': json['dataChangeCreatedByDisplayName'] == null ? undefined : json['dataChangeCreatedByDisplayName'], - 'dataChangeLastModifiedByDisplayName': json['dataChangeLastModifiedByDisplayName'] == null ? undefined : json['dataChangeLastModifiedByDisplayName'], - 'dataChangeCreatedTime': json['dataChangeCreatedTime'] == null ? undefined : json['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': json['dataChangeLastModifiedTime'] == null ? undefined : json['dataChangeLastModifiedTime'], - 'id': json['id'] == null ? undefined : json['id'], - 'namespaceId': json['namespaceId'] == null ? undefined : json['namespaceId'], - 'key': json['key'] == null ? undefined : json['key'], - 'type': json['type'] == null ? undefined : json['type'], - 'value': json['value'] == null ? undefined : json['value'], - 'comment': json['comment'] == null ? undefined : json['comment'], - 'lineNum': json['lineNum'] == null ? undefined : json['lineNum'], - }; -} - -export function ItemDTOToJSON(json: any): ItemDTO { - return ItemDTOToJSONTyped(json, false); -} - -export function ItemDTOToJSONTyped(value?: ItemDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'dataChangeCreatedBy': value['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': value['dataChangeLastModifiedBy'], - 'dataChangeCreatedByDisplayName': value['dataChangeCreatedByDisplayName'], - 'dataChangeLastModifiedByDisplayName': value['dataChangeLastModifiedByDisplayName'], - 'dataChangeCreatedTime': value['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': value['dataChangeLastModifiedTime'], - 'id': value['id'], - 'namespaceId': value['namespaceId'], - 'key': value['key'], - 'type': value['type'], - 'value': value['value'], - 'comment': value['comment'], - 'lineNum': value['lineNum'], - }; -} - diff --git a/typescript/src/models/KVEntity.ts b/typescript/src/models/KVEntity.ts index bee5252f..e9644c4d 100644 --- a/typescript/src/models/KVEntity.ts +++ b/typescript/src/models/KVEntity.ts @@ -2,31 +2,31 @@ /* eslint-disable */ /** * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 { mapValues } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** - * + * * @export * @interface KVEntity */ export interface KVEntity { /** - * + * 键 * @type {string} * @memberof KVEntity */ key?: string; /** - * + * 值 * @type {string} * @memberof KVEntity */ @@ -36,8 +36,10 @@ export interface KVEntity { /** * Check if a given object implements the KVEntity interface. */ -export function instanceOfKVEntity(value: object): value is KVEntity { - return true; +export function instanceOfKVEntity(value: object): boolean { + let isInstance = true; + + return isInstance; } export function KVEntityFromJSON(json: any): KVEntity { @@ -45,29 +47,26 @@ export function KVEntityFromJSON(json: any): KVEntity { } export function KVEntityFromJSONTyped(json: any, ignoreDiscriminator: boolean): KVEntity { - if (json == null) { + if ((json === undefined) || (json === null)) { return json; } return { - - 'key': json['key'] == null ? undefined : json['key'], - 'value': json['value'] == null ? undefined : json['value'], - }; -} -export function KVEntityToJSON(json: any): KVEntity { - return KVEntityToJSONTyped(json, false); + 'key': !exists(json, 'key') ? undefined : json['key'], + 'value': !exists(json, 'value') ? undefined : json['value'], + }; } -export function KVEntityToJSONTyped(value?: KVEntity | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; +export function KVEntityToJSON(value?: KVEntity | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; } - return { - - 'key': value['key'], - 'value': value['value'], + + 'key': value.key, + 'value': value.value, }; } - diff --git a/typescript/src/models/ListItemDiffs.ts b/typescript/src/models/ListItemDiffs.ts deleted file mode 100644 index 610128c5..00000000 --- a/typescript/src/models/ListItemDiffs.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { NamespaceIdentifier } from './NamespaceIdentifier'; -import { - NamespaceIdentifierFromJSON, - NamespaceIdentifierFromJSONTyped, - NamespaceIdentifierToJSON, - NamespaceIdentifierToJSONTyped, -} from './NamespaceIdentifier'; -import type { ItemChangeSets } from './ItemChangeSets'; -import { - ItemChangeSetsFromJSON, - ItemChangeSetsFromJSONTyped, - ItemChangeSetsToJSON, - ItemChangeSetsToJSONTyped, -} from './ItemChangeSets'; - -/** - * - * @export - * @interface ListItemDiffs - */ -export interface ListItemDiffs { - /** - * - * @type {NamespaceIdentifier} - * @memberof ListItemDiffs - */ - namespace?: NamespaceIdentifier; - /** - * - * @type {ItemChangeSets} - * @memberof ListItemDiffs - */ - diffs?: ItemChangeSets; - /** - * - * @type {string} - * @memberof ListItemDiffs - */ - extInfo?: string; -} - -/** - * Check if a given object implements the ListItemDiffs interface. - */ -export function instanceOfListItemDiffs(value: object): value is ListItemDiffs { - return true; -} - -export function ListItemDiffsFromJSON(json: any): ListItemDiffs { - return ListItemDiffsFromJSONTyped(json, false); -} - -export function ListItemDiffsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListItemDiffs { - if (json == null) { - return json; - } - return { - - 'namespace': json['namespace'] == null ? undefined : NamespaceIdentifierFromJSON(json['namespace']), - 'diffs': json['diffs'] == null ? undefined : ItemChangeSetsFromJSON(json['diffs']), - 'extInfo': json['extInfo'] == null ? undefined : json['extInfo'], - }; -} - -export function ListItemDiffsToJSON(json: any): ListItemDiffs { - return ListItemDiffsToJSONTyped(json, false); -} - -export function ListItemDiffsToJSONTyped(value?: ListItemDiffs | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'namespace': NamespaceIdentifierToJSON(value['namespace']), - 'diffs': ItemChangeSetsToJSON(value['diffs']), - 'extInfo': value['extInfo'], - }; -} - diff --git a/typescript/src/models/ListReleaseBO.ts b/typescript/src/models/ListReleaseBO.ts deleted file mode 100644 index 919b187f..00000000 --- a/typescript/src/models/ListReleaseBO.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { ReleaseDTO } from './ReleaseDTO'; -import { - ReleaseDTOFromJSON, - ReleaseDTOFromJSONTyped, - ReleaseDTOToJSON, - ReleaseDTOToJSONTyped, -} from './ReleaseDTO'; -import type { KVEntity } from './KVEntity'; -import { - KVEntityFromJSON, - KVEntityFromJSONTyped, - KVEntityToJSON, - KVEntityToJSONTyped, -} from './KVEntity'; - -/** - * - * @export - * @interface ListReleaseBO - */ -export interface ListReleaseBO { - /** - * - * @type {ReleaseDTO} - * @memberof ListReleaseBO - */ - baseInfo?: ReleaseDTO; - /** - * - * @type {Array} - * @memberof ListReleaseBO - */ - items?: Array; -} - -/** - * Check if a given object implements the ListReleaseBO interface. - */ -export function instanceOfListReleaseBO(value: object): value is ListReleaseBO { - return true; -} - -export function ListReleaseBOFromJSON(json: any): ListReleaseBO { - return ListReleaseBOFromJSONTyped(json, false); -} - -export function ListReleaseBOFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListReleaseBO { - if (json == null) { - return json; - } - return { - - 'baseInfo': json['baseInfo'] == null ? undefined : ReleaseDTOFromJSON(json['baseInfo']), - 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(KVEntityFromJSON)), - }; -} - -export function ListReleaseBOToJSON(json: any): ListReleaseBO { - return ListReleaseBOToJSONTyped(json, false); -} - -export function ListReleaseBOToJSONTyped(value?: ListReleaseBO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'baseInfo': ReleaseDTOToJSON(value['baseInfo']), - 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(KVEntityToJSON)), - }; -} - diff --git a/typescript/src/models/MapString.ts b/typescript/src/models/MapString.ts deleted file mode 100644 index 51797b9f..00000000 --- a/typescript/src/models/MapString.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * 字符串映射对象,用于表示键值对的配置数据结构 - * @export - * @interface MapString - */ -export interface MapString { - /** - * - * @type {string} - * @memberof MapString - */ - key?: string; -} - -/** - * Check if a given object implements the MapString interface. - */ -export function instanceOfMapString(value: object): value is MapString { - return true; -} - -export function MapStringFromJSON(json: any): MapString { - return MapStringFromJSONTyped(json, false); -} - -export function MapStringFromJSONTyped(json: any, ignoreDiscriminator: boolean): MapString { - if (json == null) { - return json; - } - return { - - 'key': json['key'] == null ? undefined : json['key'], - }; -} - -export function MapStringToJSON(json: any): MapString { - return MapStringToJSONTyped(json, false); -} - -export function MapStringToJSONTyped(value?: MapString | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'key': value['key'], - }; -} - diff --git a/typescript/src/models/MultiResponseEntity.ts b/typescript/src/models/MultiResponseEntity.ts new file mode 100644 index 00000000..b244e86c --- /dev/null +++ b/typescript/src/models/MultiResponseEntity.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Apollo OpenAPI + *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
+ * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { RichResponseEntity } from './RichResponseEntity'; +import { + RichResponseEntityFromJSON, + RichResponseEntityFromJSONTyped, + RichResponseEntityToJSON, +} from './RichResponseEntity'; + +/** + * A response container holding multiple RichResponseEntity objects + * @export + * @interface MultiResponseEntity + */ +export interface MultiResponseEntity { + /** + * Overall HTTP status code + * @type {number} + * @memberof MultiResponseEntity + */ + code: number; + /** + * List of rich response entities + * @type {Array} + * @memberof MultiResponseEntity + */ + entities: Array; +} + +/** + * Check if a given object implements the MultiResponseEntity interface. + */ +export function instanceOfMultiResponseEntity(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "code" in value; + isInstance = isInstance && "entities" in value; + + return isInstance; +} + +export function MultiResponseEntityFromJSON(json: any): MultiResponseEntity { + return MultiResponseEntityFromJSONTyped(json, false); +} + +export function MultiResponseEntityFromJSONTyped(json: any, ignoreDiscriminator: boolean): MultiResponseEntity { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'code': json['code'], + 'entities': ((json['entities'] as Array).map(RichResponseEntityFromJSON)), + }; +} + +export function MultiResponseEntityToJSON(value?: MultiResponseEntity | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'code': value.code, + 'entities': ((value.entities as Array).map(RichResponseEntityToJSON)), + }; +} diff --git a/typescript/src/models/NamespaceGrayDelReleaseDTO.ts b/typescript/src/models/NamespaceGrayDelReleaseDTO.ts index 8e51a448..922c5cf7 100644 --- a/typescript/src/models/NamespaceGrayDelReleaseDTO.ts +++ b/typescript/src/models/NamespaceGrayDelReleaseDTO.ts @@ -2,17 +2,17 @@ /* eslint-disable */ /** * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 { mapValues } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** * 命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布 * @export @@ -54,8 +54,10 @@ export interface NamespaceGrayDelReleaseDTO { /** * Check if a given object implements the NamespaceGrayDelReleaseDTO interface. */ -export function instanceOfNamespaceGrayDelReleaseDTO(value: object): value is NamespaceGrayDelReleaseDTO { - return true; +export function instanceOfNamespaceGrayDelReleaseDTO(value: object): boolean { + let isInstance = true; + + return isInstance; } export function NamespaceGrayDelReleaseDTOFromJSON(json: any): NamespaceGrayDelReleaseDTO { @@ -63,35 +65,32 @@ export function NamespaceGrayDelReleaseDTOFromJSON(json: any): NamespaceGrayDelR } export function NamespaceGrayDelReleaseDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): NamespaceGrayDelReleaseDTO { - if (json == null) { + if ((json === undefined) || (json === null)) { return json; } return { - - 'releaseTitle': json['releaseTitle'] == null ? undefined : json['releaseTitle'], - 'releaseComment': json['releaseComment'] == null ? undefined : json['releaseComment'], - 'releasedBy': json['releasedBy'] == null ? undefined : json['releasedBy'], - 'isEmergencyPublish': json['isEmergencyPublish'] == null ? undefined : json['isEmergencyPublish'], - 'grayDelKeys': json['grayDelKeys'] == null ? undefined : json['grayDelKeys'], - }; -} -export function NamespaceGrayDelReleaseDTOToJSON(json: any): NamespaceGrayDelReleaseDTO { - return NamespaceGrayDelReleaseDTOToJSONTyped(json, false); + 'releaseTitle': !exists(json, 'releaseTitle') ? undefined : json['releaseTitle'], + 'releaseComment': !exists(json, 'releaseComment') ? undefined : json['releaseComment'], + 'releasedBy': !exists(json, 'releasedBy') ? undefined : json['releasedBy'], + 'isEmergencyPublish': !exists(json, 'isEmergencyPublish') ? undefined : json['isEmergencyPublish'], + 'grayDelKeys': !exists(json, 'grayDelKeys') ? undefined : json['grayDelKeys'], + }; } -export function NamespaceGrayDelReleaseDTOToJSONTyped(value?: NamespaceGrayDelReleaseDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; +export function NamespaceGrayDelReleaseDTOToJSON(value?: NamespaceGrayDelReleaseDTO | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; } - return { - - 'releaseTitle': value['releaseTitle'], - 'releaseComment': value['releaseComment'], - 'releasedBy': value['releasedBy'], - 'isEmergencyPublish': value['isEmergencyPublish'], - 'grayDelKeys': value['grayDelKeys'], + + 'releaseTitle': value.releaseTitle, + 'releaseComment': value.releaseComment, + 'releasedBy': value.releasedBy, + 'isEmergencyPublish': value.isEmergencyPublish, + 'grayDelKeys': value.grayDelKeys, }; } - diff --git a/typescript/src/models/NamespaceIdentifier.ts b/typescript/src/models/NamespaceIdentifier.ts deleted file mode 100644 index e2fe8fc7..00000000 --- a/typescript/src/models/NamespaceIdentifier.ts +++ /dev/null @@ -1,89 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface NamespaceIdentifier - */ -export interface NamespaceIdentifier { - /** - * - * @type {string} - * @memberof NamespaceIdentifier - */ - appId?: string; - /** - * - * @type {string} - * @memberof NamespaceIdentifier - */ - env?: string; - /** - * - * @type {string} - * @memberof NamespaceIdentifier - */ - clusterName?: string; - /** - * - * @type {string} - * @memberof NamespaceIdentifier - */ - namespaceName?: string; -} - -/** - * Check if a given object implements the NamespaceIdentifier interface. - */ -export function instanceOfNamespaceIdentifier(value: object): value is NamespaceIdentifier { - return true; -} - -export function NamespaceIdentifierFromJSON(json: any): NamespaceIdentifier { - return NamespaceIdentifierFromJSONTyped(json, false); -} - -export function NamespaceIdentifierFromJSONTyped(json: any, ignoreDiscriminator: boolean): NamespaceIdentifier { - if (json == null) { - return json; - } - return { - - 'appId': json['appId'] == null ? undefined : json['appId'], - 'env': json['env'] == null ? undefined : json['env'], - 'clusterName': json['clusterName'] == null ? undefined : json['clusterName'], - 'namespaceName': json['namespaceName'] == null ? undefined : json['namespaceName'], - }; -} - -export function NamespaceIdentifierToJSON(json: any): NamespaceIdentifier { - return NamespaceIdentifierToJSONTyped(json, false); -} - -export function NamespaceIdentifierToJSONTyped(value?: NamespaceIdentifier | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'appId': value['appId'], - 'env': value['env'], - 'clusterName': value['clusterName'], - 'namespaceName': value['namespaceName'], - }; -} - diff --git a/typescript/src/models/NamespaceReleaseDTO.ts b/typescript/src/models/NamespaceReleaseDTO.ts index a9aeaf4f..34eaca0d 100644 --- a/typescript/src/models/NamespaceReleaseDTO.ts +++ b/typescript/src/models/NamespaceReleaseDTO.ts @@ -2,17 +2,17 @@ /* eslint-disable */ /** * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 { mapValues } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** * 命名空间发布请求数据传输对象,用于创建新的配置发布 * @export @@ -48,8 +48,10 @@ export interface NamespaceReleaseDTO { /** * Check if a given object implements the NamespaceReleaseDTO interface. */ -export function instanceOfNamespaceReleaseDTO(value: object): value is NamespaceReleaseDTO { - return true; +export function instanceOfNamespaceReleaseDTO(value: object): boolean { + let isInstance = true; + + return isInstance; } export function NamespaceReleaseDTOFromJSON(json: any): NamespaceReleaseDTO { @@ -57,33 +59,30 @@ export function NamespaceReleaseDTOFromJSON(json: any): NamespaceReleaseDTO { } export function NamespaceReleaseDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): NamespaceReleaseDTO { - if (json == null) { + if ((json === undefined) || (json === null)) { return json; } return { - - 'releaseTitle': json['releaseTitle'] == null ? undefined : json['releaseTitle'], - 'releaseComment': json['releaseComment'] == null ? undefined : json['releaseComment'], - 'releasedBy': json['releasedBy'] == null ? undefined : json['releasedBy'], - 'isEmergencyPublish': json['isEmergencyPublish'] == null ? undefined : json['isEmergencyPublish'], - }; -} -export function NamespaceReleaseDTOToJSON(json: any): NamespaceReleaseDTO { - return NamespaceReleaseDTOToJSONTyped(json, false); + 'releaseTitle': !exists(json, 'releaseTitle') ? undefined : json['releaseTitle'], + 'releaseComment': !exists(json, 'releaseComment') ? undefined : json['releaseComment'], + 'releasedBy': !exists(json, 'releasedBy') ? undefined : json['releasedBy'], + 'isEmergencyPublish': !exists(json, 'isEmergencyPublish') ? undefined : json['isEmergencyPublish'], + }; } -export function NamespaceReleaseDTOToJSONTyped(value?: NamespaceReleaseDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; +export function NamespaceReleaseDTOToJSON(value?: NamespaceReleaseDTO | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; } - return { - - 'releaseTitle': value['releaseTitle'], - 'releaseComment': value['releaseComment'], - 'releasedBy': value['releasedBy'], - 'isEmergencyPublish': value['isEmergencyPublish'], + + 'releaseTitle': value.releaseTitle, + 'releaseComment': value.releaseComment, + 'releasedBy': value.releasedBy, + 'isEmergencyPublish': value.isEmergencyPublish, }; } - diff --git a/typescript/src/models/NamespaceSyncModel.ts b/typescript/src/models/NamespaceSyncModel.ts deleted file mode 100644 index a69bfeda..00000000 --- a/typescript/src/models/NamespaceSyncModel.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { NamespaceIdentifier } from './NamespaceIdentifier'; -import { - NamespaceIdentifierFromJSON, - NamespaceIdentifierFromJSONTyped, - NamespaceIdentifierToJSON, - NamespaceIdentifierToJSONTyped, -} from './NamespaceIdentifier'; -import type { ItemDTO } from './ItemDTO'; -import { - ItemDTOFromJSON, - ItemDTOFromJSONTyped, - ItemDTOToJSON, - ItemDTOToJSONTyped, -} from './ItemDTO'; - -/** - * - * @export - * @interface NamespaceSyncModel - */ -export interface NamespaceSyncModel { - /** - * - * @type {Array} - * @memberof NamespaceSyncModel - */ - syncToNamespaces?: Array; - /** - * - * @type {Array} - * @memberof NamespaceSyncModel - */ - syncItems?: Array; -} - -/** - * Check if a given object implements the NamespaceSyncModel interface. - */ -export function instanceOfNamespaceSyncModel(value: object): value is NamespaceSyncModel { - return true; -} - -export function NamespaceSyncModelFromJSON(json: any): NamespaceSyncModel { - return NamespaceSyncModelFromJSONTyped(json, false); -} - -export function NamespaceSyncModelFromJSONTyped(json: any, ignoreDiscriminator: boolean): NamespaceSyncModel { - if (json == null) { - return json; - } - return { - - 'syncToNamespaces': json['syncToNamespaces'] == null ? undefined : ((json['syncToNamespaces'] as Array).map(NamespaceIdentifierFromJSON)), - 'syncItems': json['syncItems'] == null ? undefined : ((json['syncItems'] as Array).map(ItemDTOFromJSON)), - }; -} - -export function NamespaceSyncModelToJSON(json: any): NamespaceSyncModel { - return NamespaceSyncModelToJSONTyped(json, false); -} - -export function NamespaceSyncModelToJSONTyped(value?: NamespaceSyncModel | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'syncToNamespaces': value['syncToNamespaces'] == null ? undefined : ((value['syncToNamespaces'] as Array).map(NamespaceIdentifierToJSON)), - 'syncItems': value['syncItems'] == null ? undefined : ((value['syncItems'] as Array).map(ItemDTOToJSON)), - }; -} - diff --git a/typescript/src/models/NamespaceTextModel.ts b/typescript/src/models/NamespaceTextModel.ts deleted file mode 100644 index 797397bb..00000000 --- a/typescript/src/models/NamespaceTextModel.ts +++ /dev/null @@ -1,121 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface NamespaceTextModel - */ -export interface NamespaceTextModel { - /** - * - * @type {string} - * @memberof NamespaceTextModel - */ - appId?: string; - /** - * - * @type {string} - * @memberof NamespaceTextModel - */ - env?: string; - /** - * - * @type {string} - * @memberof NamespaceTextModel - */ - clusterName?: string; - /** - * - * @type {string} - * @memberof NamespaceTextModel - */ - namespaceName?: string; - /** - * - * @type {number} - * @memberof NamespaceTextModel - */ - namespaceId?: number; - /** - * - * @type {string} - * @memberof NamespaceTextModel - */ - format?: string; - /** - * - * @type {string} - * @memberof NamespaceTextModel - */ - configText?: string; - /** - * - * @type {string} - * @memberof NamespaceTextModel - */ - operator?: string; -} - -/** - * Check if a given object implements the NamespaceTextModel interface. - */ -export function instanceOfNamespaceTextModel(value: object): value is NamespaceTextModel { - return true; -} - -export function NamespaceTextModelFromJSON(json: any): NamespaceTextModel { - return NamespaceTextModelFromJSONTyped(json, false); -} - -export function NamespaceTextModelFromJSONTyped(json: any, ignoreDiscriminator: boolean): NamespaceTextModel { - if (json == null) { - return json; - } - return { - - 'appId': json['appId'] == null ? undefined : json['appId'], - 'env': json['env'] == null ? undefined : json['env'], - 'clusterName': json['clusterName'] == null ? undefined : json['clusterName'], - 'namespaceName': json['namespaceName'] == null ? undefined : json['namespaceName'], - 'namespaceId': json['namespaceId'] == null ? undefined : json['namespaceId'], - 'format': json['format'] == null ? undefined : json['format'], - 'configText': json['configText'] == null ? undefined : json['configText'], - 'operator': json['operator'] == null ? undefined : json['operator'], - }; -} - -export function NamespaceTextModelToJSON(json: any): NamespaceTextModel { - return NamespaceTextModelToJSONTyped(json, false); -} - -export function NamespaceTextModelToJSONTyped(value?: NamespaceTextModel | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'appId': value['appId'], - 'env': value['env'], - 'clusterName': value['clusterName'], - 'namespaceName': value['namespaceName'], - 'namespaceId': value['namespaceId'], - 'format': value['format'], - 'configText': value['configText'], - 'operator': value['operator'], - }; -} - diff --git a/typescript/src/models/OpenAppDTO.ts b/typescript/src/models/OpenAppDTO.ts index 70c85354..8f691eae 100644 --- a/typescript/src/models/OpenAppDTO.ts +++ b/typescript/src/models/OpenAppDTO.ts @@ -2,17 +2,17 @@ /* eslint-disable */ /** * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 { mapValues } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** * Apollo应用信息数据传输对象,包含应用的基本信息和元数据 * @export @@ -84,8 +84,10 @@ export interface OpenAppDTO { /** * Check if a given object implements the OpenAppDTO interface. */ -export function instanceOfOpenAppDTO(value: object): value is OpenAppDTO { - return true; +export function instanceOfOpenAppDTO(value: object): boolean { + let isInstance = true; + + return isInstance; } export function OpenAppDTOFromJSON(json: any): OpenAppDTO { @@ -93,45 +95,42 @@ export function OpenAppDTOFromJSON(json: any): OpenAppDTO { } export function OpenAppDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenAppDTO { - if (json == null) { + if ((json === undefined) || (json === null)) { return json; } return { - - 'dataChangeCreatedBy': json['dataChangeCreatedBy'] == null ? undefined : json['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': json['dataChangeLastModifiedBy'] == null ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeCreatedTime': json['dataChangeCreatedTime'] == null ? undefined : json['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': json['dataChangeLastModifiedTime'] == null ? undefined : json['dataChangeLastModifiedTime'], - 'name': json['name'] == null ? undefined : json['name'], - 'appId': json['appId'] == null ? undefined : json['appId'], - 'orgId': json['orgId'] == null ? undefined : json['orgId'], - 'orgName': json['orgName'] == null ? undefined : json['orgName'], - 'ownerName': json['ownerName'] == null ? undefined : json['ownerName'], - 'ownerEmail': json['ownerEmail'] == null ? undefined : json['ownerEmail'], - }; -} -export function OpenAppDTOToJSON(json: any): OpenAppDTO { - return OpenAppDTOToJSONTyped(json, false); + 'dataChangeCreatedBy': !exists(json, 'dataChangeCreatedBy') ? undefined : json['dataChangeCreatedBy'], + 'dataChangeLastModifiedBy': !exists(json, 'dataChangeLastModifiedBy') ? undefined : json['dataChangeLastModifiedBy'], + 'dataChangeCreatedTime': !exists(json, 'dataChangeCreatedTime') ? undefined : json['dataChangeCreatedTime'], + 'dataChangeLastModifiedTime': !exists(json, 'dataChangeLastModifiedTime') ? undefined : json['dataChangeLastModifiedTime'], + 'name': !exists(json, 'name') ? undefined : json['name'], + 'appId': !exists(json, 'appId') ? undefined : json['appId'], + 'orgId': !exists(json, 'orgId') ? undefined : json['orgId'], + 'orgName': !exists(json, 'orgName') ? undefined : json['orgName'], + 'ownerName': !exists(json, 'ownerName') ? undefined : json['ownerName'], + 'ownerEmail': !exists(json, 'ownerEmail') ? undefined : json['ownerEmail'], + }; } -export function OpenAppDTOToJSONTyped(value?: OpenAppDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; +export function OpenAppDTOToJSON(value?: OpenAppDTO | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; } - return { - - 'dataChangeCreatedBy': value['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': value['dataChangeLastModifiedBy'], - 'dataChangeCreatedTime': value['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': value['dataChangeLastModifiedTime'], - 'name': value['name'], - 'appId': value['appId'], - 'orgId': value['orgId'], - 'orgName': value['orgName'], - 'ownerName': value['ownerName'], - 'ownerEmail': value['ownerEmail'], + + 'dataChangeCreatedBy': value.dataChangeCreatedBy, + 'dataChangeLastModifiedBy': value.dataChangeLastModifiedBy, + 'dataChangeCreatedTime': value.dataChangeCreatedTime, + 'dataChangeLastModifiedTime': value.dataChangeLastModifiedTime, + 'name': value.name, + 'appId': value.appId, + 'orgId': value.orgId, + 'orgName': value.orgName, + 'ownerName': value.ownerName, + 'ownerEmail': value.ownerEmail, }; } - diff --git a/typescript/src/models/OpenAppNamespaceDTO.ts b/typescript/src/models/OpenAppNamespaceDTO.ts index bb75050b..10840157 100644 --- a/typescript/src/models/OpenAppNamespaceDTO.ts +++ b/typescript/src/models/OpenAppNamespaceDTO.ts @@ -2,17 +2,17 @@ /* eslint-disable */ /** * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 { mapValues } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** * Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 * @export @@ -84,8 +84,10 @@ export interface OpenAppNamespaceDTO { /** * Check if a given object implements the OpenAppNamespaceDTO interface. */ -export function instanceOfOpenAppNamespaceDTO(value: object): value is OpenAppNamespaceDTO { - return true; +export function instanceOfOpenAppNamespaceDTO(value: object): boolean { + let isInstance = true; + + return isInstance; } export function OpenAppNamespaceDTOFromJSON(json: any): OpenAppNamespaceDTO { @@ -93,45 +95,42 @@ export function OpenAppNamespaceDTOFromJSON(json: any): OpenAppNamespaceDTO { } export function OpenAppNamespaceDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenAppNamespaceDTO { - if (json == null) { + if ((json === undefined) || (json === null)) { return json; } return { - - 'dataChangeCreatedBy': json['dataChangeCreatedBy'] == null ? undefined : json['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': json['dataChangeLastModifiedBy'] == null ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeCreatedTime': json['dataChangeCreatedTime'] == null ? undefined : json['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': json['dataChangeLastModifiedTime'] == null ? undefined : json['dataChangeLastModifiedTime'], - 'name': json['name'] == null ? undefined : json['name'], - 'appId': json['appId'] == null ? undefined : json['appId'], - 'format': json['format'] == null ? undefined : json['format'], - 'isPublic': json['isPublic'] == null ? undefined : json['isPublic'], - 'appendNamespacePrefix': json['appendNamespacePrefix'] == null ? undefined : json['appendNamespacePrefix'], - 'comment': json['comment'] == null ? undefined : json['comment'], - }; -} -export function OpenAppNamespaceDTOToJSON(json: any): OpenAppNamespaceDTO { - return OpenAppNamespaceDTOToJSONTyped(json, false); + 'dataChangeCreatedBy': !exists(json, 'dataChangeCreatedBy') ? undefined : json['dataChangeCreatedBy'], + 'dataChangeLastModifiedBy': !exists(json, 'dataChangeLastModifiedBy') ? undefined : json['dataChangeLastModifiedBy'], + 'dataChangeCreatedTime': !exists(json, 'dataChangeCreatedTime') ? undefined : json['dataChangeCreatedTime'], + 'dataChangeLastModifiedTime': !exists(json, 'dataChangeLastModifiedTime') ? undefined : json['dataChangeLastModifiedTime'], + 'name': !exists(json, 'name') ? undefined : json['name'], + 'appId': !exists(json, 'appId') ? undefined : json['appId'], + 'format': !exists(json, 'format') ? undefined : json['format'], + 'isPublic': !exists(json, 'isPublic') ? undefined : json['isPublic'], + 'appendNamespacePrefix': !exists(json, 'appendNamespacePrefix') ? undefined : json['appendNamespacePrefix'], + 'comment': !exists(json, 'comment') ? undefined : json['comment'], + }; } -export function OpenAppNamespaceDTOToJSONTyped(value?: OpenAppNamespaceDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; +export function OpenAppNamespaceDTOToJSON(value?: OpenAppNamespaceDTO | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; } - return { - - 'dataChangeCreatedBy': value['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': value['dataChangeLastModifiedBy'], - 'dataChangeCreatedTime': value['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': value['dataChangeLastModifiedTime'], - 'name': value['name'], - 'appId': value['appId'], - 'format': value['format'], - 'isPublic': value['isPublic'], - 'appendNamespacePrefix': value['appendNamespacePrefix'], - 'comment': value['comment'], + + 'dataChangeCreatedBy': value.dataChangeCreatedBy, + 'dataChangeLastModifiedBy': value.dataChangeLastModifiedBy, + 'dataChangeCreatedTime': value.dataChangeCreatedTime, + 'dataChangeLastModifiedTime': value.dataChangeLastModifiedTime, + 'name': value.name, + 'appId': value.appId, + 'format': value.format, + 'isPublic': value.isPublic, + 'appendNamespacePrefix': value.appendNamespacePrefix, + 'comment': value.comment, }; } - diff --git a/typescript/src/models/OpenClusterDTO.ts b/typescript/src/models/OpenClusterDTO.ts index 27a1430a..01568401 100644 --- a/typescript/src/models/OpenClusterDTO.ts +++ b/typescript/src/models/OpenClusterDTO.ts @@ -2,17 +2,17 @@ /* eslint-disable */ /** * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 { mapValues } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** * Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 * @export @@ -60,8 +60,10 @@ export interface OpenClusterDTO { /** * Check if a given object implements the OpenClusterDTO interface. */ -export function instanceOfOpenClusterDTO(value: object): value is OpenClusterDTO { - return true; +export function instanceOfOpenClusterDTO(value: object): boolean { + let isInstance = true; + + return isInstance; } export function OpenClusterDTOFromJSON(json: any): OpenClusterDTO { @@ -69,37 +71,34 @@ export function OpenClusterDTOFromJSON(json: any): OpenClusterDTO { } export function OpenClusterDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenClusterDTO { - if (json == null) { + if ((json === undefined) || (json === null)) { return json; } return { - - 'dataChangeCreatedBy': json['dataChangeCreatedBy'] == null ? undefined : json['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': json['dataChangeLastModifiedBy'] == null ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeCreatedTime': json['dataChangeCreatedTime'] == null ? undefined : json['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': json['dataChangeLastModifiedTime'] == null ? undefined : json['dataChangeLastModifiedTime'], - 'name': json['name'] == null ? undefined : json['name'], - 'appId': json['appId'] == null ? undefined : json['appId'], - }; -} -export function OpenClusterDTOToJSON(json: any): OpenClusterDTO { - return OpenClusterDTOToJSONTyped(json, false); + 'dataChangeCreatedBy': !exists(json, 'dataChangeCreatedBy') ? undefined : json['dataChangeCreatedBy'], + 'dataChangeLastModifiedBy': !exists(json, 'dataChangeLastModifiedBy') ? undefined : json['dataChangeLastModifiedBy'], + 'dataChangeCreatedTime': !exists(json, 'dataChangeCreatedTime') ? undefined : json['dataChangeCreatedTime'], + 'dataChangeLastModifiedTime': !exists(json, 'dataChangeLastModifiedTime') ? undefined : json['dataChangeLastModifiedTime'], + 'name': !exists(json, 'name') ? undefined : json['name'], + 'appId': !exists(json, 'appId') ? undefined : json['appId'], + }; } -export function OpenClusterDTOToJSONTyped(value?: OpenClusterDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; +export function OpenClusterDTOToJSON(value?: OpenClusterDTO | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; } - return { - - 'dataChangeCreatedBy': value['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': value['dataChangeLastModifiedBy'], - 'dataChangeCreatedTime': value['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': value['dataChangeLastModifiedTime'], - 'name': value['name'], - 'appId': value['appId'], + + 'dataChangeCreatedBy': value.dataChangeCreatedBy, + 'dataChangeLastModifiedBy': value.dataChangeLastModifiedBy, + 'dataChangeCreatedTime': value.dataChangeCreatedTime, + 'dataChangeLastModifiedTime': value.dataChangeLastModifiedTime, + 'name': value.name, + 'appId': value.appId, }; } - diff --git a/typescript/src/models/OpenCreateAppDTO.ts b/typescript/src/models/OpenCreateAppDTO.ts index 3700d47f..dca98b1c 100644 --- a/typescript/src/models/OpenCreateAppDTO.ts +++ b/typescript/src/models/OpenCreateAppDTO.ts @@ -2,23 +2,22 @@ /* eslint-disable */ /** * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 { mapValues } from '../runtime'; +import { exists, mapValues } from '../runtime'; import type { OpenAppDTO } from './OpenAppDTO'; import { OpenAppDTOFromJSON, OpenAppDTOFromJSONTyped, OpenAppDTOToJSON, - OpenAppDTOToJSONTyped, } from './OpenAppDTO'; /** @@ -40,7 +39,7 @@ export interface OpenCreateAppDTO { */ admins?: Array; /** - * + * * @type {OpenAppDTO} * @memberof OpenCreateAppDTO */ @@ -50,8 +49,10 @@ export interface OpenCreateAppDTO { /** * Check if a given object implements the OpenCreateAppDTO interface. */ -export function instanceOfOpenCreateAppDTO(value: object): value is OpenCreateAppDTO { - return true; +export function instanceOfOpenCreateAppDTO(value: object): boolean { + let isInstance = true; + + return isInstance; } export function OpenCreateAppDTOFromJSON(json: any): OpenCreateAppDTO { @@ -59,31 +60,28 @@ export function OpenCreateAppDTOFromJSON(json: any): OpenCreateAppDTO { } export function OpenCreateAppDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenCreateAppDTO { - if (json == null) { + if ((json === undefined) || (json === null)) { return json; } return { - - 'assignAppRoleToSelf': json['assignAppRoleToSelf'] == null ? undefined : json['assignAppRoleToSelf'], - 'admins': json['admins'] == null ? undefined : json['admins'], - 'app': json['app'] == null ? undefined : OpenAppDTOFromJSON(json['app']), - }; -} -export function OpenCreateAppDTOToJSON(json: any): OpenCreateAppDTO { - return OpenCreateAppDTOToJSONTyped(json, false); + 'assignAppRoleToSelf': !exists(json, 'assignAppRoleToSelf') ? undefined : json['assignAppRoleToSelf'], + 'admins': !exists(json, 'admins') ? undefined : json['admins'], + 'app': !exists(json, 'app') ? undefined : OpenAppDTOFromJSON(json['app']), + }; } -export function OpenCreateAppDTOToJSONTyped(value?: OpenCreateAppDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; +export function OpenCreateAppDTOToJSON(value?: OpenCreateAppDTO | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; } - return { - - 'assignAppRoleToSelf': value['assignAppRoleToSelf'], - 'admins': value['admins'], - 'app': OpenAppDTOToJSON(value['app']), + + 'assignAppRoleToSelf': value.assignAppRoleToSelf, + 'admins': value.admins, + 'app': OpenAppDTOToJSON(value.app), }; } - diff --git a/typescript/src/models/OpenEnvClusterDTO.ts b/typescript/src/models/OpenEnvClusterDTO.ts index e928b99f..f3fb7058 100644 --- a/typescript/src/models/OpenEnvClusterDTO.ts +++ b/typescript/src/models/OpenEnvClusterDTO.ts @@ -2,31 +2,31 @@ /* eslint-disable */ /** * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 { mapValues } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** - * + * * @export * @interface OpenEnvClusterDTO */ export interface OpenEnvClusterDTO { /** - * + * 环境标识,例如 DEV、FAT、UAT、PROD * @type {string} * @memberof OpenEnvClusterDTO */ env?: string; /** - * + * 该环境下的集群名称列表 * @type {Array} * @memberof OpenEnvClusterDTO */ @@ -36,8 +36,10 @@ export interface OpenEnvClusterDTO { /** * Check if a given object implements the OpenEnvClusterDTO interface. */ -export function instanceOfOpenEnvClusterDTO(value: object): value is OpenEnvClusterDTO { - return true; +export function instanceOfOpenEnvClusterDTO(value: object): boolean { + let isInstance = true; + + return isInstance; } export function OpenEnvClusterDTOFromJSON(json: any): OpenEnvClusterDTO { @@ -45,29 +47,26 @@ export function OpenEnvClusterDTOFromJSON(json: any): OpenEnvClusterDTO { } export function OpenEnvClusterDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenEnvClusterDTO { - if (json == null) { + if ((json === undefined) || (json === null)) { return json; } return { - - 'env': json['env'] == null ? undefined : json['env'], - 'clusters': json['clusters'] == null ? undefined : json['clusters'], - }; -} -export function OpenEnvClusterDTOToJSON(json: any): OpenEnvClusterDTO { - return OpenEnvClusterDTOToJSONTyped(json, false); + 'env': !exists(json, 'env') ? undefined : json['env'], + 'clusters': !exists(json, 'clusters') ? undefined : json['clusters'], + }; } -export function OpenEnvClusterDTOToJSONTyped(value?: OpenEnvClusterDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; +export function OpenEnvClusterDTOToJSON(value?: OpenEnvClusterDTO | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; } - return { - - 'env': value['env'], - 'clusters': value['clusters'], + + 'env': value.env, + 'clusters': value.clusters, }; } - diff --git a/typescript/src/models/OpenEnvClusterInfo.ts b/typescript/src/models/OpenEnvClusterInfo.ts new file mode 100644 index 00000000..04a75ad3 --- /dev/null +++ b/typescript/src/models/OpenEnvClusterInfo.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Apollo OpenAPI + *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
+ * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { OpenClusterDTO } from './OpenClusterDTO'; +import { + OpenClusterDTOFromJSON, + OpenClusterDTOFromJSONTyped, + OpenClusterDTOToJSON, +} from './OpenClusterDTO'; + +/** + * + * @export + * @interface OpenEnvClusterInfo + */ +export interface OpenEnvClusterInfo { + /** + * 环境标识 + * @type {string} + * @memberof OpenEnvClusterInfo + */ + env?: string; + /** + * 集群信息列表 + * @type {Array} + * @memberof OpenEnvClusterInfo + */ + clusters?: Array; +} + +/** + * Check if a given object implements the OpenEnvClusterInfo interface. + */ +export function instanceOfOpenEnvClusterInfo(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function OpenEnvClusterInfoFromJSON(json: any): OpenEnvClusterInfo { + return OpenEnvClusterInfoFromJSONTyped(json, false); +} + +export function OpenEnvClusterInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenEnvClusterInfo { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'env': !exists(json, 'env') ? undefined : json['env'], + 'clusters': !exists(json, 'clusters') ? undefined : ((json['clusters'] as Array).map(OpenClusterDTOFromJSON)), + }; +} + +export function OpenEnvClusterInfoToJSON(value?: OpenEnvClusterInfo | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'env': value.env, + 'clusters': value.clusters === undefined ? undefined : ((value.clusters as Array).map(OpenClusterDTOToJSON)), + }; +} diff --git a/typescript/src/models/OpenGrayReleaseRuleDTO.ts b/typescript/src/models/OpenGrayReleaseRuleDTO.ts index b1e44648..bfac7956 100644 --- a/typescript/src/models/OpenGrayReleaseRuleDTO.ts +++ b/typescript/src/models/OpenGrayReleaseRuleDTO.ts @@ -2,23 +2,22 @@ /* eslint-disable */ /** * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 { mapValues } from '../runtime'; +import { exists, mapValues } from '../runtime'; import type { OpenGrayReleaseRuleItemDTO } from './OpenGrayReleaseRuleItemDTO'; import { OpenGrayReleaseRuleItemDTOFromJSON, OpenGrayReleaseRuleItemDTOFromJSONTyped, OpenGrayReleaseRuleItemDTOToJSON, - OpenGrayReleaseRuleItemDTOToJSONTyped, } from './OpenGrayReleaseRuleItemDTO'; /** @@ -86,8 +85,10 @@ export interface OpenGrayReleaseRuleDTO { /** * Check if a given object implements the OpenGrayReleaseRuleDTO interface. */ -export function instanceOfOpenGrayReleaseRuleDTO(value: object): value is OpenGrayReleaseRuleDTO { - return true; +export function instanceOfOpenGrayReleaseRuleDTO(value: object): boolean { + let isInstance = true; + + return isInstance; } export function OpenGrayReleaseRuleDTOFromJSON(json: any): OpenGrayReleaseRuleDTO { @@ -95,43 +96,40 @@ export function OpenGrayReleaseRuleDTOFromJSON(json: any): OpenGrayReleaseRuleDT } export function OpenGrayReleaseRuleDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenGrayReleaseRuleDTO { - if (json == null) { + if ((json === undefined) || (json === null)) { return json; } return { - - 'dataChangeCreatedBy': json['dataChangeCreatedBy'] == null ? undefined : json['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': json['dataChangeLastModifiedBy'] == null ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeCreatedTime': json['dataChangeCreatedTime'] == null ? undefined : json['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': json['dataChangeLastModifiedTime'] == null ? undefined : json['dataChangeLastModifiedTime'], - 'appId': json['appId'] == null ? undefined : json['appId'], - 'clusterName': json['clusterName'] == null ? undefined : json['clusterName'], - 'namespaceName': json['namespaceName'] == null ? undefined : json['namespaceName'], - 'branchName': json['branchName'] == null ? undefined : json['branchName'], - 'ruleItems': json['ruleItems'] == null ? undefined : ((json['ruleItems'] as Array).map(OpenGrayReleaseRuleItemDTOFromJSON)), - }; -} -export function OpenGrayReleaseRuleDTOToJSON(json: any): OpenGrayReleaseRuleDTO { - return OpenGrayReleaseRuleDTOToJSONTyped(json, false); + 'dataChangeCreatedBy': !exists(json, 'dataChangeCreatedBy') ? undefined : json['dataChangeCreatedBy'], + 'dataChangeLastModifiedBy': !exists(json, 'dataChangeLastModifiedBy') ? undefined : json['dataChangeLastModifiedBy'], + 'dataChangeCreatedTime': !exists(json, 'dataChangeCreatedTime') ? undefined : json['dataChangeCreatedTime'], + 'dataChangeLastModifiedTime': !exists(json, 'dataChangeLastModifiedTime') ? undefined : json['dataChangeLastModifiedTime'], + 'appId': !exists(json, 'appId') ? undefined : json['appId'], + 'clusterName': !exists(json, 'clusterName') ? undefined : json['clusterName'], + 'namespaceName': !exists(json, 'namespaceName') ? undefined : json['namespaceName'], + 'branchName': !exists(json, 'branchName') ? undefined : json['branchName'], + 'ruleItems': !exists(json, 'ruleItems') ? undefined : ((json['ruleItems'] as Array).map(OpenGrayReleaseRuleItemDTOFromJSON)), + }; } -export function OpenGrayReleaseRuleDTOToJSONTyped(value?: OpenGrayReleaseRuleDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; +export function OpenGrayReleaseRuleDTOToJSON(value?: OpenGrayReleaseRuleDTO | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; } - return { - - 'dataChangeCreatedBy': value['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': value['dataChangeLastModifiedBy'], - 'dataChangeCreatedTime': value['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': value['dataChangeLastModifiedTime'], - 'appId': value['appId'], - 'clusterName': value['clusterName'], - 'namespaceName': value['namespaceName'], - 'branchName': value['branchName'], - 'ruleItems': value['ruleItems'] == null ? undefined : ((value['ruleItems'] as Array).map(OpenGrayReleaseRuleItemDTOToJSON)), + + 'dataChangeCreatedBy': value.dataChangeCreatedBy, + 'dataChangeLastModifiedBy': value.dataChangeLastModifiedBy, + 'dataChangeCreatedTime': value.dataChangeCreatedTime, + 'dataChangeLastModifiedTime': value.dataChangeLastModifiedTime, + 'appId': value.appId, + 'clusterName': value.clusterName, + 'namespaceName': value.namespaceName, + 'branchName': value.branchName, + 'ruleItems': value.ruleItems === undefined ? undefined : ((value.ruleItems as Array).map(OpenGrayReleaseRuleItemDTOToJSON)), }; } - diff --git a/typescript/src/models/OpenGrayReleaseRuleItemDTO.ts b/typescript/src/models/OpenGrayReleaseRuleItemDTO.ts index 1f2bd7ad..348c56af 100644 --- a/typescript/src/models/OpenGrayReleaseRuleItemDTO.ts +++ b/typescript/src/models/OpenGrayReleaseRuleItemDTO.ts @@ -2,17 +2,17 @@ /* eslint-disable */ /** * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 { mapValues } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** * Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 * @export @@ -42,8 +42,10 @@ export interface OpenGrayReleaseRuleItemDTO { /** * Check if a given object implements the OpenGrayReleaseRuleItemDTO interface. */ -export function instanceOfOpenGrayReleaseRuleItemDTO(value: object): value is OpenGrayReleaseRuleItemDTO { - return true; +export function instanceOfOpenGrayReleaseRuleItemDTO(value: object): boolean { + let isInstance = true; + + return isInstance; } export function OpenGrayReleaseRuleItemDTOFromJSON(json: any): OpenGrayReleaseRuleItemDTO { @@ -51,31 +53,28 @@ export function OpenGrayReleaseRuleItemDTOFromJSON(json: any): OpenGrayReleaseRu } export function OpenGrayReleaseRuleItemDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenGrayReleaseRuleItemDTO { - if (json == null) { + if ((json === undefined) || (json === null)) { return json; } return { - - 'clientAppId': json['clientAppId'] == null ? undefined : json['clientAppId'], - 'clientIpList': json['clientIpList'] == null ? undefined : json['clientIpList'], - 'clientLabelList': json['clientLabelList'] == null ? undefined : json['clientLabelList'], - }; -} -export function OpenGrayReleaseRuleItemDTOToJSON(json: any): OpenGrayReleaseRuleItemDTO { - return OpenGrayReleaseRuleItemDTOToJSONTyped(json, false); + 'clientAppId': !exists(json, 'clientAppId') ? undefined : json['clientAppId'], + 'clientIpList': !exists(json, 'clientIpList') ? undefined : json['clientIpList'], + 'clientLabelList': !exists(json, 'clientLabelList') ? undefined : json['clientLabelList'], + }; } -export function OpenGrayReleaseRuleItemDTOToJSONTyped(value?: OpenGrayReleaseRuleItemDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; +export function OpenGrayReleaseRuleItemDTOToJSON(value?: OpenGrayReleaseRuleItemDTO | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; } - return { - - 'clientAppId': value['clientAppId'], - 'clientIpList': value['clientIpList'], - 'clientLabelList': value['clientLabelList'], + + 'clientAppId': value.clientAppId, + 'clientIpList': value.clientIpList, + 'clientLabelList': value.clientLabelList, }; } - diff --git a/typescript/src/models/OpenInstanceConfigDTO.ts b/typescript/src/models/OpenInstanceConfigDTO.ts index b75eb331..64550bd0 100644 --- a/typescript/src/models/OpenInstanceConfigDTO.ts +++ b/typescript/src/models/OpenInstanceConfigDTO.ts @@ -2,45 +2,44 @@ /* eslint-disable */ /** * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 { mapValues } from '../runtime'; +import { exists, mapValues } from '../runtime'; import type { OpenReleaseDTO } from './OpenReleaseDTO'; import { OpenReleaseDTOFromJSON, OpenReleaseDTOFromJSONTyped, OpenReleaseDTOToJSON, - OpenReleaseDTOToJSONTyped, } from './OpenReleaseDTO'; /** - * + * * @export * @interface OpenInstanceConfigDTO */ export interface OpenInstanceConfigDTO { /** - * + * * @type {OpenReleaseDTO} * @memberof OpenInstanceConfigDTO */ release?: OpenReleaseDTO; /** - * + * 配置下发时间(ISO 8601) * @type {string} * @memberof OpenInstanceConfigDTO */ releaseDeliveryTime?: string; /** - * + * 最后修改时间(ISO 8601) * @type {string} * @memberof OpenInstanceConfigDTO */ @@ -50,8 +49,10 @@ export interface OpenInstanceConfigDTO { /** * Check if a given object implements the OpenInstanceConfigDTO interface. */ -export function instanceOfOpenInstanceConfigDTO(value: object): value is OpenInstanceConfigDTO { - return true; +export function instanceOfOpenInstanceConfigDTO(value: object): boolean { + let isInstance = true; + + return isInstance; } export function OpenInstanceConfigDTOFromJSON(json: any): OpenInstanceConfigDTO { @@ -59,31 +60,28 @@ export function OpenInstanceConfigDTOFromJSON(json: any): OpenInstanceConfigDTO } export function OpenInstanceConfigDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenInstanceConfigDTO { - if (json == null) { + if ((json === undefined) || (json === null)) { return json; } return { - - 'release': json['release'] == null ? undefined : OpenReleaseDTOFromJSON(json['release']), - 'releaseDeliveryTime': json['releaseDeliveryTime'] == null ? undefined : json['releaseDeliveryTime'], - 'dataChangeLastModifiedTime': json['dataChangeLastModifiedTime'] == null ? undefined : json['dataChangeLastModifiedTime'], - }; -} -export function OpenInstanceConfigDTOToJSON(json: any): OpenInstanceConfigDTO { - return OpenInstanceConfigDTOToJSONTyped(json, false); + 'release': !exists(json, 'release') ? undefined : OpenReleaseDTOFromJSON(json['release']), + 'releaseDeliveryTime': !exists(json, 'releaseDeliveryTime') ? undefined : json['releaseDeliveryTime'], + 'dataChangeLastModifiedTime': !exists(json, 'dataChangeLastModifiedTime') ? undefined : json['dataChangeLastModifiedTime'], + }; } -export function OpenInstanceConfigDTOToJSONTyped(value?: OpenInstanceConfigDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; +export function OpenInstanceConfigDTOToJSON(value?: OpenInstanceConfigDTO | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; } - return { - - 'release': OpenReleaseDTOToJSON(value['release']), - 'releaseDeliveryTime': value['releaseDeliveryTime'], - 'dataChangeLastModifiedTime': value['dataChangeLastModifiedTime'], + + 'release': OpenReleaseDTOToJSON(value.release), + 'releaseDeliveryTime': value.releaseDeliveryTime, + 'dataChangeLastModifiedTime': value.dataChangeLastModifiedTime, }; } - diff --git a/typescript/src/models/OpenInstanceDTO.ts b/typescript/src/models/OpenInstanceDTO.ts index 947be200..9aad8dac 100644 --- a/typescript/src/models/OpenInstanceDTO.ts +++ b/typescript/src/models/OpenInstanceDTO.ts @@ -2,69 +2,68 @@ /* eslint-disable */ /** * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 { mapValues } from '../runtime'; +import { exists, mapValues } from '../runtime'; import type { OpenInstanceConfigDTO } from './OpenInstanceConfigDTO'; import { OpenInstanceConfigDTOFromJSON, OpenInstanceConfigDTOFromJSONTyped, OpenInstanceConfigDTOToJSON, - OpenInstanceConfigDTOToJSONTyped, } from './OpenInstanceConfigDTO'; /** - * + * * @export * @interface OpenInstanceDTO */ export interface OpenInstanceDTO { /** - * + * 实例ID * @type {number} * @memberof OpenInstanceDTO */ id?: number; /** - * + * 实例所属应用ID * @type {string} * @memberof OpenInstanceDTO */ appId?: string; /** - * + * 实例所属集群名称 * @type {string} * @memberof OpenInstanceDTO */ clusterName?: string; /** - * + * 数据中心/机房标识 * @type {string} * @memberof OpenInstanceDTO */ dataCenter?: string; /** - * + * 实例IP地址 * @type {string} * @memberof OpenInstanceDTO */ ip?: string; /** - * + * 实例当前生效的配置列表 * @type {Array} * @memberof OpenInstanceDTO */ configs?: Array; /** - * + * 数据创建时间(ISO 8601) * @type {string} * @memberof OpenInstanceDTO */ @@ -74,8 +73,10 @@ export interface OpenInstanceDTO { /** * Check if a given object implements the OpenInstanceDTO interface. */ -export function instanceOfOpenInstanceDTO(value: object): value is OpenInstanceDTO { - return true; +export function instanceOfOpenInstanceDTO(value: object): boolean { + let isInstance = true; + + return isInstance; } export function OpenInstanceDTOFromJSON(json: any): OpenInstanceDTO { @@ -83,39 +84,36 @@ export function OpenInstanceDTOFromJSON(json: any): OpenInstanceDTO { } export function OpenInstanceDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenInstanceDTO { - if (json == null) { + if ((json === undefined) || (json === null)) { return json; } return { - - 'id': json['id'] == null ? undefined : json['id'], - 'appId': json['appId'] == null ? undefined : json['appId'], - 'clusterName': json['clusterName'] == null ? undefined : json['clusterName'], - 'dataCenter': json['dataCenter'] == null ? undefined : json['dataCenter'], - 'ip': json['ip'] == null ? undefined : json['ip'], - 'configs': json['configs'] == null ? undefined : ((json['configs'] as Array).map(OpenInstanceConfigDTOFromJSON)), - 'dataChangeCreatedTime': json['dataChangeCreatedTime'] == null ? undefined : json['dataChangeCreatedTime'], - }; -} -export function OpenInstanceDTOToJSON(json: any): OpenInstanceDTO { - return OpenInstanceDTOToJSONTyped(json, false); + 'id': !exists(json, 'id') ? undefined : json['id'], + 'appId': !exists(json, 'appId') ? undefined : json['appId'], + 'clusterName': !exists(json, 'clusterName') ? undefined : json['clusterName'], + 'dataCenter': !exists(json, 'dataCenter') ? undefined : json['dataCenter'], + 'ip': !exists(json, 'ip') ? undefined : json['ip'], + 'configs': !exists(json, 'configs') ? undefined : ((json['configs'] as Array).map(OpenInstanceConfigDTOFromJSON)), + 'dataChangeCreatedTime': !exists(json, 'dataChangeCreatedTime') ? undefined : json['dataChangeCreatedTime'], + }; } -export function OpenInstanceDTOToJSONTyped(value?: OpenInstanceDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; +export function OpenInstanceDTOToJSON(value?: OpenInstanceDTO | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; } - return { - - 'id': value['id'], - 'appId': value['appId'], - 'clusterName': value['clusterName'], - 'dataCenter': value['dataCenter'], - 'ip': value['ip'], - 'configs': value['configs'] == null ? undefined : ((value['configs'] as Array).map(OpenInstanceConfigDTOToJSON)), - 'dataChangeCreatedTime': value['dataChangeCreatedTime'], + + 'id': value.id, + 'appId': value.appId, + 'clusterName': value.clusterName, + 'dataCenter': value.dataCenter, + 'ip': value.ip, + 'configs': value.configs === undefined ? undefined : ((value.configs as Array).map(OpenInstanceConfigDTOToJSON)), + 'dataChangeCreatedTime': value.dataChangeCreatedTime, }; } - diff --git a/typescript/src/models/OpenItemChangeSets.ts b/typescript/src/models/OpenItemChangeSets.ts new file mode 100644 index 00000000..a88f1dc3 --- /dev/null +++ b/typescript/src/models/OpenItemChangeSets.ts @@ -0,0 +1,135 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Apollo OpenAPI + *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
+ * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { OpenItemDTO } from './OpenItemDTO'; +import { + OpenItemDTOFromJSON, + OpenItemDTOFromJSONTyped, + OpenItemDTOToJSON, +} from './OpenItemDTO'; + +/** + * + * @export + * @interface OpenItemChangeSets + */ +export interface OpenItemChangeSets { + /** + * 变更集合创建者用户名 + * @type {string} + * @memberof OpenItemChangeSets + */ + dataChangeCreatedBy?: string; + /** + * 变更集合最后修改者用户名 + * @type {string} + * @memberof OpenItemChangeSets + */ + dataChangeLastModifiedBy?: string; + /** + * 创建者显示名 + * @type {string} + * @memberof OpenItemChangeSets + */ + dataChangeCreatedByDisplayName?: string; + /** + * 最后修改者显示名 + * @type {string} + * @memberof OpenItemChangeSets + */ + dataChangeLastModifiedByDisplayName?: string; + /** + * 变更集合创建时间(ISO 8601) + * @type {string} + * @memberof OpenItemChangeSets + */ + dataChangeCreatedTime?: string; + /** + * 变更集合最后修改时间(ISO 8601) + * @type {string} + * @memberof OpenItemChangeSets + */ + dataChangeLastModifiedTime?: string; + /** + * 待创建的配置项列表 + * @type {Array} + * @memberof OpenItemChangeSets + */ + createItems?: Array; + /** + * 待更新的配置项列表 + * @type {Array} + * @memberof OpenItemChangeSets + */ + updateItems?: Array; + /** + * 待删除的配置项列表 + * @type {Array} + * @memberof OpenItemChangeSets + */ + deleteItems?: Array; +} + +/** + * Check if a given object implements the OpenItemChangeSets interface. + */ +export function instanceOfOpenItemChangeSets(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function OpenItemChangeSetsFromJSON(json: any): OpenItemChangeSets { + return OpenItemChangeSetsFromJSONTyped(json, false); +} + +export function OpenItemChangeSetsFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenItemChangeSets { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'dataChangeCreatedBy': !exists(json, 'dataChangeCreatedBy') ? undefined : json['dataChangeCreatedBy'], + 'dataChangeLastModifiedBy': !exists(json, 'dataChangeLastModifiedBy') ? undefined : json['dataChangeLastModifiedBy'], + 'dataChangeCreatedByDisplayName': !exists(json, 'dataChangeCreatedByDisplayName') ? undefined : json['dataChangeCreatedByDisplayName'], + 'dataChangeLastModifiedByDisplayName': !exists(json, 'dataChangeLastModifiedByDisplayName') ? undefined : json['dataChangeLastModifiedByDisplayName'], + 'dataChangeCreatedTime': !exists(json, 'dataChangeCreatedTime') ? undefined : json['dataChangeCreatedTime'], + 'dataChangeLastModifiedTime': !exists(json, 'dataChangeLastModifiedTime') ? undefined : json['dataChangeLastModifiedTime'], + 'createItems': !exists(json, 'createItems') ? undefined : ((json['createItems'] as Array).map(OpenItemDTOFromJSON)), + 'updateItems': !exists(json, 'updateItems') ? undefined : ((json['updateItems'] as Array).map(OpenItemDTOFromJSON)), + 'deleteItems': !exists(json, 'deleteItems') ? undefined : ((json['deleteItems'] as Array).map(OpenItemDTOFromJSON)), + }; +} + +export function OpenItemChangeSetsToJSON(value?: OpenItemChangeSets | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'dataChangeCreatedBy': value.dataChangeCreatedBy, + 'dataChangeLastModifiedBy': value.dataChangeLastModifiedBy, + 'dataChangeCreatedByDisplayName': value.dataChangeCreatedByDisplayName, + 'dataChangeLastModifiedByDisplayName': value.dataChangeLastModifiedByDisplayName, + 'dataChangeCreatedTime': value.dataChangeCreatedTime, + 'dataChangeLastModifiedTime': value.dataChangeLastModifiedTime, + 'createItems': value.createItems === undefined ? undefined : ((value.createItems as Array).map(OpenItemDTOToJSON)), + 'updateItems': value.updateItems === undefined ? undefined : ((value.updateItems as Array).map(OpenItemDTOToJSON)), + 'deleteItems': value.deleteItems === undefined ? undefined : ((value.deleteItems as Array).map(OpenItemDTOToJSON)), + }; +} diff --git a/typescript/src/models/OpenItemDTO.ts b/typescript/src/models/OpenItemDTO.ts index 1cfd977e..7ae6abc4 100644 --- a/typescript/src/models/OpenItemDTO.ts +++ b/typescript/src/models/OpenItemDTO.ts @@ -2,17 +2,17 @@ /* eslint-disable */ /** * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 { mapValues } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** * Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 * @export @@ -72,8 +72,10 @@ export interface OpenItemDTO { /** * Check if a given object implements the OpenItemDTO interface. */ -export function instanceOfOpenItemDTO(value: object): value is OpenItemDTO { - return true; +export function instanceOfOpenItemDTO(value: object): boolean { + let isInstance = true; + + return isInstance; } export function OpenItemDTOFromJSON(json: any): OpenItemDTO { @@ -81,41 +83,38 @@ export function OpenItemDTOFromJSON(json: any): OpenItemDTO { } export function OpenItemDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenItemDTO { - if (json == null) { + if ((json === undefined) || (json === null)) { return json; } return { - - 'dataChangeCreatedBy': json['dataChangeCreatedBy'] == null ? undefined : json['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': json['dataChangeLastModifiedBy'] == null ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeCreatedTime': json['dataChangeCreatedTime'] == null ? undefined : json['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': json['dataChangeLastModifiedTime'] == null ? undefined : json['dataChangeLastModifiedTime'], - 'key': json['key'] == null ? undefined : json['key'], - 'type': json['type'] == null ? undefined : json['type'], - 'value': json['value'] == null ? undefined : json['value'], - 'comment': json['comment'] == null ? undefined : json['comment'], - }; -} -export function OpenItemDTOToJSON(json: any): OpenItemDTO { - return OpenItemDTOToJSONTyped(json, false); + 'dataChangeCreatedBy': !exists(json, 'dataChangeCreatedBy') ? undefined : json['dataChangeCreatedBy'], + 'dataChangeLastModifiedBy': !exists(json, 'dataChangeLastModifiedBy') ? undefined : json['dataChangeLastModifiedBy'], + 'dataChangeCreatedTime': !exists(json, 'dataChangeCreatedTime') ? undefined : json['dataChangeCreatedTime'], + 'dataChangeLastModifiedTime': !exists(json, 'dataChangeLastModifiedTime') ? undefined : json['dataChangeLastModifiedTime'], + 'key': !exists(json, 'key') ? undefined : json['key'], + 'type': !exists(json, 'type') ? undefined : json['type'], + 'value': !exists(json, 'value') ? undefined : json['value'], + 'comment': !exists(json, 'comment') ? undefined : json['comment'], + }; } -export function OpenItemDTOToJSONTyped(value?: OpenItemDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; +export function OpenItemDTOToJSON(value?: OpenItemDTO | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; } - return { - - 'dataChangeCreatedBy': value['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': value['dataChangeLastModifiedBy'], - 'dataChangeCreatedTime': value['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': value['dataChangeLastModifiedTime'], - 'key': value['key'], - 'type': value['type'], - 'value': value['value'], - 'comment': value['comment'], + + 'dataChangeCreatedBy': value.dataChangeCreatedBy, + 'dataChangeLastModifiedBy': value.dataChangeLastModifiedBy, + 'dataChangeCreatedTime': value.dataChangeCreatedTime, + 'dataChangeLastModifiedTime': value.dataChangeLastModifiedTime, + 'key': value.key, + 'type': value.type, + 'value': value.value, + 'comment': value.comment, }; } - diff --git a/typescript/src/models/OpenItemDiffs.ts b/typescript/src/models/OpenItemDiffs.ts new file mode 100644 index 00000000..23129144 --- /dev/null +++ b/typescript/src/models/OpenItemDiffs.ts @@ -0,0 +1,93 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Apollo OpenAPI + *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
+ * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { OpenItemChangeSets } from './OpenItemChangeSets'; +import { + OpenItemChangeSetsFromJSON, + OpenItemChangeSetsFromJSONTyped, + OpenItemChangeSetsToJSON, +} from './OpenItemChangeSets'; +import type { OpenNamespaceIdentifier } from './OpenNamespaceIdentifier'; +import { + OpenNamespaceIdentifierFromJSON, + OpenNamespaceIdentifierFromJSONTyped, + OpenNamespaceIdentifierToJSON, +} from './OpenNamespaceIdentifier'; + +/** + * + * @export + * @interface OpenItemDiffs + */ +export interface OpenItemDiffs { + /** + * + * @type {OpenNamespaceIdentifier} + * @memberof OpenItemDiffs + */ + namespace?: OpenNamespaceIdentifier; + /** + * + * @type {OpenItemChangeSets} + * @memberof OpenItemDiffs + */ + diffs?: OpenItemChangeSets; + /** + * 扩展信息 + * @type {string} + * @memberof OpenItemDiffs + */ + extInfo?: string; +} + +/** + * Check if a given object implements the OpenItemDiffs interface. + */ +export function instanceOfOpenItemDiffs(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function OpenItemDiffsFromJSON(json: any): OpenItemDiffs { + return OpenItemDiffsFromJSONTyped(json, false); +} + +export function OpenItemDiffsFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenItemDiffs { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'namespace': !exists(json, 'namespace') ? undefined : OpenNamespaceIdentifierFromJSON(json['namespace']), + 'diffs': !exists(json, 'diffs') ? undefined : OpenItemChangeSetsFromJSON(json['diffs']), + 'extInfo': !exists(json, 'extInfo') ? undefined : json['extInfo'], + }; +} + +export function OpenItemDiffsToJSON(value?: OpenItemDiffs | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'namespace': OpenNamespaceIdentifierToJSON(value.namespace), + 'diffs': OpenItemChangeSetsToJSON(value.diffs), + 'extInfo': value.extInfo, + }; +} diff --git a/typescript/src/models/OpenNamespaceDTO.ts b/typescript/src/models/OpenNamespaceDTO.ts index 07fce28c..71fbeed9 100644 --- a/typescript/src/models/OpenNamespaceDTO.ts +++ b/typescript/src/models/OpenNamespaceDTO.ts @@ -2,23 +2,22 @@ /* eslint-disable */ /** * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 { mapValues } from '../runtime'; +import { exists, mapValues } from '../runtime'; import type { OpenItemDTO } from './OpenItemDTO'; import { OpenItemDTOFromJSON, OpenItemDTOFromJSONTyped, OpenItemDTOToJSON, - OpenItemDTOToJSONTyped, } from './OpenItemDTO'; /** @@ -98,8 +97,10 @@ export interface OpenNamespaceDTO { /** * Check if a given object implements the OpenNamespaceDTO interface. */ -export function instanceOfOpenNamespaceDTO(value: object): value is OpenNamespaceDTO { - return true; +export function instanceOfOpenNamespaceDTO(value: object): boolean { + let isInstance = true; + + return isInstance; } export function OpenNamespaceDTOFromJSON(json: any): OpenNamespaceDTO { @@ -107,47 +108,44 @@ export function OpenNamespaceDTOFromJSON(json: any): OpenNamespaceDTO { } export function OpenNamespaceDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenNamespaceDTO { - if (json == null) { + if ((json === undefined) || (json === null)) { return json; } return { - - 'dataChangeCreatedBy': json['dataChangeCreatedBy'] == null ? undefined : json['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': json['dataChangeLastModifiedBy'] == null ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeCreatedTime': json['dataChangeCreatedTime'] == null ? undefined : json['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': json['dataChangeLastModifiedTime'] == null ? undefined : json['dataChangeLastModifiedTime'], - 'appId': json['appId'] == null ? undefined : json['appId'], - 'clusterName': json['clusterName'] == null ? undefined : json['clusterName'], - 'namespaceName': json['namespaceName'] == null ? undefined : json['namespaceName'], - 'comment': json['comment'] == null ? undefined : json['comment'], - 'format': json['format'] == null ? undefined : json['format'], - 'isPublic': json['isPublic'] == null ? undefined : json['isPublic'], - 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(OpenItemDTOFromJSON)), - }; -} -export function OpenNamespaceDTOToJSON(json: any): OpenNamespaceDTO { - return OpenNamespaceDTOToJSONTyped(json, false); + 'dataChangeCreatedBy': !exists(json, 'dataChangeCreatedBy') ? undefined : json['dataChangeCreatedBy'], + 'dataChangeLastModifiedBy': !exists(json, 'dataChangeLastModifiedBy') ? undefined : json['dataChangeLastModifiedBy'], + 'dataChangeCreatedTime': !exists(json, 'dataChangeCreatedTime') ? undefined : json['dataChangeCreatedTime'], + 'dataChangeLastModifiedTime': !exists(json, 'dataChangeLastModifiedTime') ? undefined : json['dataChangeLastModifiedTime'], + 'appId': !exists(json, 'appId') ? undefined : json['appId'], + 'clusterName': !exists(json, 'clusterName') ? undefined : json['clusterName'], + 'namespaceName': !exists(json, 'namespaceName') ? undefined : json['namespaceName'], + 'comment': !exists(json, 'comment') ? undefined : json['comment'], + 'format': !exists(json, 'format') ? undefined : json['format'], + 'isPublic': !exists(json, 'isPublic') ? undefined : json['isPublic'], + 'items': !exists(json, 'items') ? undefined : ((json['items'] as Array).map(OpenItemDTOFromJSON)), + }; } -export function OpenNamespaceDTOToJSONTyped(value?: OpenNamespaceDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; +export function OpenNamespaceDTOToJSON(value?: OpenNamespaceDTO | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; } - return { - - 'dataChangeCreatedBy': value['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': value['dataChangeLastModifiedBy'], - 'dataChangeCreatedTime': value['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': value['dataChangeLastModifiedTime'], - 'appId': value['appId'], - 'clusterName': value['clusterName'], - 'namespaceName': value['namespaceName'], - 'comment': value['comment'], - 'format': value['format'], - 'isPublic': value['isPublic'], - 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(OpenItemDTOToJSON)), + + 'dataChangeCreatedBy': value.dataChangeCreatedBy, + 'dataChangeLastModifiedBy': value.dataChangeLastModifiedBy, + 'dataChangeCreatedTime': value.dataChangeCreatedTime, + 'dataChangeLastModifiedTime': value.dataChangeLastModifiedTime, + 'appId': value.appId, + 'clusterName': value.clusterName, + 'namespaceName': value.namespaceName, + 'comment': value.comment, + 'format': value.format, + 'isPublic': value.isPublic, + 'items': value.items === undefined ? undefined : ((value.items as Array).map(OpenItemDTOToJSON)), }; } - diff --git a/typescript/src/models/OpenNamespaceIdentifier.ts b/typescript/src/models/OpenNamespaceIdentifier.ts new file mode 100644 index 00000000..d7786b87 --- /dev/null +++ b/typescript/src/models/OpenNamespaceIdentifier.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 OpenNamespaceIdentifier + */ +export interface OpenNamespaceIdentifier { + /** + * 应用唯一标识 + * @type {string} + * @memberof OpenNamespaceIdentifier + */ + appId?: string; + /** + * 环境标识 + * @type {string} + * @memberof OpenNamespaceIdentifier + */ + env?: string; + /** + * 集群名称 + * @type {string} + * @memberof OpenNamespaceIdentifier + */ + clusterName?: string; + /** + * 命名空间名称 + * @type {string} + * @memberof OpenNamespaceIdentifier + */ + namespaceName?: string; +} + +/** + * Check if a given object implements the OpenNamespaceIdentifier interface. + */ +export function instanceOfOpenNamespaceIdentifier(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function OpenNamespaceIdentifierFromJSON(json: any): OpenNamespaceIdentifier { + return OpenNamespaceIdentifierFromJSONTyped(json, false); +} + +export function OpenNamespaceIdentifierFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenNamespaceIdentifier { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'appId': !exists(json, 'appId') ? undefined : json['appId'], + 'env': !exists(json, 'env') ? undefined : json['env'], + 'clusterName': !exists(json, 'clusterName') ? undefined : json['clusterName'], + 'namespaceName': !exists(json, 'namespaceName') ? undefined : json['namespaceName'], + }; +} + +export function OpenNamespaceIdentifierToJSON(value?: OpenNamespaceIdentifier | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'appId': value.appId, + 'env': value.env, + 'clusterName': value.clusterName, + 'namespaceName': value.namespaceName, + }; +} diff --git a/typescript/src/models/OpenNamespaceLockDTO.ts b/typescript/src/models/OpenNamespaceLockDTO.ts index c1b75f1a..cbf021c8 100644 --- a/typescript/src/models/OpenNamespaceLockDTO.ts +++ b/typescript/src/models/OpenNamespaceLockDTO.ts @@ -2,17 +2,17 @@ /* eslint-disable */ /** * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 { mapValues } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** * Apollo命名空间锁状态数据传输对象 * @export @@ -42,8 +42,10 @@ export interface OpenNamespaceLockDTO { /** * Check if a given object implements the OpenNamespaceLockDTO interface. */ -export function instanceOfOpenNamespaceLockDTO(value: object): value is OpenNamespaceLockDTO { - return true; +export function instanceOfOpenNamespaceLockDTO(value: object): boolean { + let isInstance = true; + + return isInstance; } export function OpenNamespaceLockDTOFromJSON(json: any): OpenNamespaceLockDTO { @@ -51,31 +53,28 @@ export function OpenNamespaceLockDTOFromJSON(json: any): OpenNamespaceLockDTO { } export function OpenNamespaceLockDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenNamespaceLockDTO { - if (json == null) { + if ((json === undefined) || (json === null)) { return json; } return { - - 'namespaceName': json['namespaceName'] == null ? undefined : json['namespaceName'], - 'isLocked': json['isLocked'] == null ? undefined : json['isLocked'], - 'lockedBy': json['lockedBy'] == null ? undefined : json['lockedBy'], - }; -} -export function OpenNamespaceLockDTOToJSON(json: any): OpenNamespaceLockDTO { - return OpenNamespaceLockDTOToJSONTyped(json, false); + 'namespaceName': !exists(json, 'namespaceName') ? undefined : json['namespaceName'], + 'isLocked': !exists(json, 'isLocked') ? undefined : json['isLocked'], + 'lockedBy': !exists(json, 'lockedBy') ? undefined : json['lockedBy'], + }; } -export function OpenNamespaceLockDTOToJSONTyped(value?: OpenNamespaceLockDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; +export function OpenNamespaceLockDTOToJSON(value?: OpenNamespaceLockDTO | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; } - return { - - 'namespaceName': value['namespaceName'], - 'isLocked': value['isLocked'], - 'lockedBy': value['lockedBy'], + + 'namespaceName': value.namespaceName, + 'isLocked': value.isLocked, + 'lockedBy': value.lockedBy, }; } - diff --git a/typescript/src/models/OpenNamespaceSyncModel.ts b/typescript/src/models/OpenNamespaceSyncModel.ts new file mode 100644 index 00000000..3ae563bd --- /dev/null +++ b/typescript/src/models/OpenNamespaceSyncModel.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Apollo OpenAPI + *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
+ * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { OpenItemDTO } from './OpenItemDTO'; +import { + OpenItemDTOFromJSON, + OpenItemDTOFromJSONTyped, + OpenItemDTOToJSON, +} from './OpenItemDTO'; +import type { OpenNamespaceIdentifier } from './OpenNamespaceIdentifier'; +import { + OpenNamespaceIdentifierFromJSON, + OpenNamespaceIdentifierFromJSONTyped, + OpenNamespaceIdentifierToJSON, +} from './OpenNamespaceIdentifier'; + +/** + * + * @export + * @interface OpenNamespaceSyncModel + */ +export interface OpenNamespaceSyncModel { + /** + * 目标命名空间标识列表 + * @type {Array} + * @memberof OpenNamespaceSyncModel + */ + syncToNamespaces?: Array; + /** + * 需要同步的配置项列表 + * @type {Array} + * @memberof OpenNamespaceSyncModel + */ + syncItems?: Array; +} + +/** + * Check if a given object implements the OpenNamespaceSyncModel interface. + */ +export function instanceOfOpenNamespaceSyncModel(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function OpenNamespaceSyncModelFromJSON(json: any): OpenNamespaceSyncModel { + return OpenNamespaceSyncModelFromJSONTyped(json, false); +} + +export function OpenNamespaceSyncModelFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenNamespaceSyncModel { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'syncToNamespaces': !exists(json, 'syncToNamespaces') ? undefined : ((json['syncToNamespaces'] as Array).map(OpenNamespaceIdentifierFromJSON)), + 'syncItems': !exists(json, 'syncItems') ? undefined : ((json['syncItems'] as Array).map(OpenItemDTOFromJSON)), + }; +} + +export function OpenNamespaceSyncModelToJSON(value?: OpenNamespaceSyncModel | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'syncToNamespaces': value.syncToNamespaces === undefined ? undefined : ((value.syncToNamespaces as Array).map(OpenNamespaceIdentifierToJSON)), + 'syncItems': value.syncItems === undefined ? undefined : ((value.syncItems as Array).map(OpenItemDTOToJSON)), + }; +} diff --git a/typescript/src/models/OpenNamespaceTextModel.ts b/typescript/src/models/OpenNamespaceTextModel.ts new file mode 100644 index 00000000..abeebfd7 --- /dev/null +++ b/typescript/src/models/OpenNamespaceTextModel.ts @@ -0,0 +1,120 @@ +/* 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 OpenNamespaceTextModel + */ +export interface OpenNamespaceTextModel { + /** + * 应用唯一标识 + * @type {string} + * @memberof OpenNamespaceTextModel + */ + appId?: string; + /** + * 环境标识 + * @type {string} + * @memberof OpenNamespaceTextModel + */ + env?: string; + /** + * 集群名称 + * @type {string} + * @memberof OpenNamespaceTextModel + */ + clusterName?: string; + /** + * 命名空间名称 + * @type {string} + * @memberof OpenNamespaceTextModel + */ + namespaceName?: string; + /** + * 命名空间ID + * @type {number} + * @memberof OpenNamespaceTextModel + */ + namespaceId?: number; + /** + * 命名空间格式类型(properties/xml/json/yml等) + * @type {string} + * @memberof OpenNamespaceTextModel + */ + format?: string; + /** + * 配置内容的原始文本 + * @type {string} + * @memberof OpenNamespaceTextModel + */ + configText?: string; + /** + * 操作者用户名 + * @type {string} + * @memberof OpenNamespaceTextModel + */ + operator?: string; +} + +/** + * Check if a given object implements the OpenNamespaceTextModel interface. + */ +export function instanceOfOpenNamespaceTextModel(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function OpenNamespaceTextModelFromJSON(json: any): OpenNamespaceTextModel { + return OpenNamespaceTextModelFromJSONTyped(json, false); +} + +export function OpenNamespaceTextModelFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenNamespaceTextModel { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'appId': !exists(json, 'appId') ? undefined : json['appId'], + 'env': !exists(json, 'env') ? undefined : json['env'], + 'clusterName': !exists(json, 'clusterName') ? undefined : json['clusterName'], + 'namespaceName': !exists(json, 'namespaceName') ? undefined : json['namespaceName'], + 'namespaceId': !exists(json, 'namespaceId') ? undefined : json['namespaceId'], + 'format': !exists(json, 'format') ? undefined : json['format'], + 'configText': !exists(json, 'configText') ? undefined : json['configText'], + 'operator': !exists(json, 'operator') ? undefined : json['operator'], + }; +} + +export function OpenNamespaceTextModelToJSON(value?: OpenNamespaceTextModel | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'appId': value.appId, + 'env': value.env, + 'clusterName': value.clusterName, + 'namespaceName': value.namespaceName, + 'namespaceId': value.namespaceId, + 'format': value.format, + 'configText': value.configText, + 'operator': value.operator, + }; +} diff --git a/typescript/src/models/OpenOrganizationDto.ts b/typescript/src/models/OpenOrganizationDto.ts index fddb3d62..15826aa9 100644 --- a/typescript/src/models/OpenOrganizationDto.ts +++ b/typescript/src/models/OpenOrganizationDto.ts @@ -2,31 +2,31 @@ /* eslint-disable */ /** * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 { mapValues } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** - * + * * @export * @interface OpenOrganizationDto */ export interface OpenOrganizationDto { /** - * + * 组织ID * @type {string} * @memberof OpenOrganizationDto */ orgId?: string; /** - * + * 组织名称 * @type {string} * @memberof OpenOrganizationDto */ @@ -36,8 +36,10 @@ export interface OpenOrganizationDto { /** * Check if a given object implements the OpenOrganizationDto interface. */ -export function instanceOfOpenOrganizationDto(value: object): value is OpenOrganizationDto { - return true; +export function instanceOfOpenOrganizationDto(value: object): boolean { + let isInstance = true; + + return isInstance; } export function OpenOrganizationDtoFromJSON(json: any): OpenOrganizationDto { @@ -45,29 +47,26 @@ export function OpenOrganizationDtoFromJSON(json: any): OpenOrganizationDto { } export function OpenOrganizationDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenOrganizationDto { - if (json == null) { + if ((json === undefined) || (json === null)) { return json; } return { - - 'orgId': json['orgId'] == null ? undefined : json['orgId'], - 'orgName': json['orgName'] == null ? undefined : json['orgName'], - }; -} -export function OpenOrganizationDtoToJSON(json: any): OpenOrganizationDto { - return OpenOrganizationDtoToJSONTyped(json, false); + 'orgId': !exists(json, 'orgId') ? undefined : json['orgId'], + 'orgName': !exists(json, 'orgName') ? undefined : json['orgName'], + }; } -export function OpenOrganizationDtoToJSONTyped(value?: OpenOrganizationDto | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; +export function OpenOrganizationDtoToJSON(value?: OpenOrganizationDto | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; } - return { - - 'orgId': value['orgId'], - 'orgName': value['orgName'], + + 'orgId': value.orgId, + 'orgName': value.orgName, }; } - diff --git a/typescript/src/models/OpenPageDTOOpenInstanceDTO.ts b/typescript/src/models/OpenPageDTOOpenInstanceDTO.ts index d3701c95..12f853e4 100644 --- a/typescript/src/models/OpenPageDTOOpenInstanceDTO.ts +++ b/typescript/src/models/OpenPageDTOOpenInstanceDTO.ts @@ -2,23 +2,22 @@ /* eslint-disable */ /** * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 { mapValues } from '../runtime'; +import { exists, mapValues } from '../runtime'; import type { OpenInstanceDTO } from './OpenInstanceDTO'; import { OpenInstanceDTOFromJSON, OpenInstanceDTOFromJSONTyped, OpenInstanceDTOToJSON, - OpenInstanceDTOToJSONTyped, } from './OpenInstanceDTO'; /** @@ -56,8 +55,10 @@ export interface OpenPageDTOOpenInstanceDTO { /** * Check if a given object implements the OpenPageDTOOpenInstanceDTO interface. */ -export function instanceOfOpenPageDTOOpenInstanceDTO(value: object): value is OpenPageDTOOpenInstanceDTO { - return true; +export function instanceOfOpenPageDTOOpenInstanceDTO(value: object): boolean { + let isInstance = true; + + return isInstance; } export function OpenPageDTOOpenInstanceDTOFromJSON(json: any): OpenPageDTOOpenInstanceDTO { @@ -65,33 +66,30 @@ export function OpenPageDTOOpenInstanceDTOFromJSON(json: any): OpenPageDTOOpenIn } export function OpenPageDTOOpenInstanceDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenPageDTOOpenInstanceDTO { - if (json == null) { + if ((json === undefined) || (json === null)) { return json; } return { - - 'page': json['page'] == null ? undefined : json['page'], - 'size': json['size'] == null ? undefined : json['size'], - 'total': json['total'] == null ? undefined : json['total'], - 'content': json['content'] == null ? undefined : ((json['content'] as Array).map(OpenInstanceDTOFromJSON)), - }; -} -export function OpenPageDTOOpenInstanceDTOToJSON(json: any): OpenPageDTOOpenInstanceDTO { - return OpenPageDTOOpenInstanceDTOToJSONTyped(json, false); + '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)), + }; } -export function OpenPageDTOOpenInstanceDTOToJSONTyped(value?: OpenPageDTOOpenInstanceDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; +export function OpenPageDTOOpenInstanceDTOToJSON(value?: OpenPageDTOOpenInstanceDTO | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; } - return { - - 'page': value['page'], - 'size': value['size'], - 'total': value['total'], - 'content': value['content'] == null ? undefined : ((value['content'] as Array).map(OpenInstanceDTOToJSON)), + + 'page': value.page, + 'size': value.size, + 'total': value.total, + 'content': value.content === undefined ? undefined : ((value.content as Array).map(OpenInstanceDTOToJSON)), }; } - diff --git a/typescript/src/models/OpenPageDTOOpenItemDTO.ts b/typescript/src/models/OpenPageDTOOpenItemDTO.ts index 9434e110..9273d2b7 100644 --- a/typescript/src/models/OpenPageDTOOpenItemDTO.ts +++ b/typescript/src/models/OpenPageDTOOpenItemDTO.ts @@ -2,23 +2,22 @@ /* eslint-disable */ /** * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 { mapValues } from '../runtime'; +import { exists, mapValues } from '../runtime'; import type { OpenItemDTO } from './OpenItemDTO'; import { OpenItemDTOFromJSON, OpenItemDTOFromJSONTyped, OpenItemDTOToJSON, - OpenItemDTOToJSONTyped, } from './OpenItemDTO'; /** @@ -56,8 +55,10 @@ export interface OpenPageDTOOpenItemDTO { /** * Check if a given object implements the OpenPageDTOOpenItemDTO interface. */ -export function instanceOfOpenPageDTOOpenItemDTO(value: object): value is OpenPageDTOOpenItemDTO { - return true; +export function instanceOfOpenPageDTOOpenItemDTO(value: object): boolean { + let isInstance = true; + + return isInstance; } export function OpenPageDTOOpenItemDTOFromJSON(json: any): OpenPageDTOOpenItemDTO { @@ -65,33 +66,30 @@ export function OpenPageDTOOpenItemDTOFromJSON(json: any): OpenPageDTOOpenItemDT } export function OpenPageDTOOpenItemDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenPageDTOOpenItemDTO { - if (json == null) { + if ((json === undefined) || (json === null)) { return json; } return { - - 'page': json['page'] == null ? undefined : json['page'], - 'size': json['size'] == null ? undefined : json['size'], - 'total': json['total'] == null ? undefined : json['total'], - 'content': json['content'] == null ? undefined : ((json['content'] as Array).map(OpenItemDTOFromJSON)), - }; -} -export function OpenPageDTOOpenItemDTOToJSON(json: any): OpenPageDTOOpenItemDTO { - return OpenPageDTOOpenItemDTOToJSONTyped(json, false); + '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(OpenItemDTOFromJSON)), + }; } -export function OpenPageDTOOpenItemDTOToJSONTyped(value?: OpenPageDTOOpenItemDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; +export function OpenPageDTOOpenItemDTOToJSON(value?: OpenPageDTOOpenItemDTO | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; } - return { - - 'page': value['page'], - 'size': value['size'], - 'total': value['total'], - 'content': value['content'] == null ? undefined : ((value['content'] as Array).map(OpenItemDTOToJSON)), + + 'page': value.page, + 'size': value.size, + 'total': value.total, + 'content': value.content === undefined ? undefined : ((value.content as Array).map(OpenItemDTOToJSON)), }; } - diff --git a/typescript/src/models/OpenReleaseBO.ts b/typescript/src/models/OpenReleaseBO.ts new file mode 100644 index 00000000..67a3ff35 --- /dev/null +++ b/typescript/src/models/OpenReleaseBO.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Apollo OpenAPI + *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
+ * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { KVEntity } from './KVEntity'; +import { + KVEntityFromJSON, + KVEntityFromJSONTyped, + KVEntityToJSON, +} from './KVEntity'; +import type { OpenReleaseDTO } from './OpenReleaseDTO'; +import { + OpenReleaseDTOFromJSON, + OpenReleaseDTOFromJSONTyped, + OpenReleaseDTOToJSON, +} from './OpenReleaseDTO'; + +/** + * + * @export + * @interface OpenReleaseBO + */ +export interface OpenReleaseBO { + /** + * + * @type {OpenReleaseDTO} + * @memberof OpenReleaseBO + */ + baseInfo?: OpenReleaseDTO; + /** + * + * @type {Array} + * @memberof OpenReleaseBO + */ + items?: Array; +} + +/** + * Check if a given object implements the OpenReleaseBO interface. + */ +export function instanceOfOpenReleaseBO(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function OpenReleaseBOFromJSON(json: any): OpenReleaseBO { + return OpenReleaseBOFromJSONTyped(json, false); +} + +export function OpenReleaseBOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenReleaseBO { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'baseInfo': !exists(json, 'baseInfo') ? undefined : OpenReleaseDTOFromJSON(json['baseInfo']), + 'items': !exists(json, 'items') ? undefined : ((json['items'] as Array).map(KVEntityFromJSON)), + }; +} + +export function OpenReleaseBOToJSON(value?: OpenReleaseBO | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'baseInfo': OpenReleaseDTOToJSON(value.baseInfo), + 'items': value.items === undefined ? undefined : ((value.items as Array).map(KVEntityToJSON)), + }; +} diff --git a/typescript/src/models/OpenReleaseDTO.ts b/typescript/src/models/OpenReleaseDTO.ts index f82b1459..05114857 100644 --- a/typescript/src/models/OpenReleaseDTO.ts +++ b/typescript/src/models/OpenReleaseDTO.ts @@ -2,25 +2,17 @@ /* eslint-disable */ /** * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 { mapValues } from '../runtime'; -import type { MapString } from './MapString'; -import { - MapStringFromJSON, - MapStringFromJSONTyped, - MapStringToJSON, - MapStringToJSONTyped, -} from './MapString'; - +import { exists, mapValues } from '../runtime'; /** * Apollo发布信息数据传输对象,表示一次配置发布的完整信息 * @export @@ -82,11 +74,11 @@ export interface OpenReleaseDTO { */ name?: string; /** - * - * @type {MapString} + * + * @type {{ [key: string]: string; }} * @memberof OpenReleaseDTO */ - configurations?: MapString; + configurations?: { [key: string]: string; }; /** * 发布备注,描述本次发布的变更内容和目的 * @type {string} @@ -98,8 +90,10 @@ export interface OpenReleaseDTO { /** * Check if a given object implements the OpenReleaseDTO interface. */ -export function instanceOfOpenReleaseDTO(value: object): value is OpenReleaseDTO { - return true; +export function instanceOfOpenReleaseDTO(value: object): boolean { + let isInstance = true; + + return isInstance; } export function OpenReleaseDTOFromJSON(json: any): OpenReleaseDTO { @@ -107,47 +101,44 @@ export function OpenReleaseDTOFromJSON(json: any): OpenReleaseDTO { } export function OpenReleaseDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenReleaseDTO { - if (json == null) { + if ((json === undefined) || (json === null)) { return json; } return { - - 'dataChangeCreatedBy': json['dataChangeCreatedBy'] == null ? undefined : json['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': json['dataChangeLastModifiedBy'] == null ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeCreatedTime': json['dataChangeCreatedTime'] == null ? undefined : json['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': json['dataChangeLastModifiedTime'] == null ? undefined : json['dataChangeLastModifiedTime'], - 'id': json['id'] == null ? undefined : json['id'], - 'appId': json['appId'] == null ? undefined : json['appId'], - 'clusterName': json['clusterName'] == null ? undefined : json['clusterName'], - 'namespaceName': json['namespaceName'] == null ? undefined : json['namespaceName'], - 'name': json['name'] == null ? undefined : json['name'], - 'configurations': json['configurations'] == null ? undefined : MapStringFromJSON(json['configurations']), - 'comment': json['comment'] == null ? undefined : json['comment'], - }; -} -export function OpenReleaseDTOToJSON(json: any): OpenReleaseDTO { - return OpenReleaseDTOToJSONTyped(json, false); + 'dataChangeCreatedBy': !exists(json, 'dataChangeCreatedBy') ? undefined : json['dataChangeCreatedBy'], + 'dataChangeLastModifiedBy': !exists(json, 'dataChangeLastModifiedBy') ? undefined : json['dataChangeLastModifiedBy'], + 'dataChangeCreatedTime': !exists(json, 'dataChangeCreatedTime') ? undefined : json['dataChangeCreatedTime'], + 'dataChangeLastModifiedTime': !exists(json, 'dataChangeLastModifiedTime') ? undefined : json['dataChangeLastModifiedTime'], + 'id': !exists(json, 'id') ? undefined : json['id'], + 'appId': !exists(json, 'appId') ? undefined : json['appId'], + 'clusterName': !exists(json, 'clusterName') ? undefined : json['clusterName'], + 'namespaceName': !exists(json, 'namespaceName') ? undefined : json['namespaceName'], + 'name': !exists(json, 'name') ? undefined : json['name'], + 'configurations': !exists(json, 'configurations') ? undefined : json['configurations'], + 'comment': !exists(json, 'comment') ? undefined : json['comment'], + }; } -export function OpenReleaseDTOToJSONTyped(value?: OpenReleaseDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; +export function OpenReleaseDTOToJSON(value?: OpenReleaseDTO | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; } - return { - - 'dataChangeCreatedBy': value['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': value['dataChangeLastModifiedBy'], - 'dataChangeCreatedTime': value['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': value['dataChangeLastModifiedTime'], - 'id': value['id'], - 'appId': value['appId'], - 'clusterName': value['clusterName'], - 'namespaceName': value['namespaceName'], - 'name': value['name'], - 'configurations': MapStringToJSON(value['configurations']), - 'comment': value['comment'], + + 'dataChangeCreatedBy': value.dataChangeCreatedBy, + 'dataChangeLastModifiedBy': value.dataChangeLastModifiedBy, + 'dataChangeCreatedTime': value.dataChangeCreatedTime, + 'dataChangeLastModifiedTime': value.dataChangeLastModifiedTime, + 'id': value.id, + 'appId': value.appId, + 'clusterName': value.clusterName, + 'namespaceName': value.namespaceName, + 'name': value.name, + 'configurations': value.configurations, + 'comment': value.comment, }; } - diff --git a/typescript/src/models/OpenapiV1AppsGet401Response.ts b/typescript/src/models/OpenapiV1AppsGet401Response.ts deleted file mode 100644 index 075ba736..00000000 --- a/typescript/src/models/OpenapiV1AppsGet401Response.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface OpenapiV1AppsGet401Response - */ -export interface OpenapiV1AppsGet401Response { - /** - * - * @type {string} - * @memberof OpenapiV1AppsGet401Response - */ - message?: string; -} - -/** - * Check if a given object implements the OpenapiV1AppsGet401Response interface. - */ -export function instanceOfOpenapiV1AppsGet401Response(value: object): value is OpenapiV1AppsGet401Response { - return true; -} - -export function OpenapiV1AppsGet401ResponseFromJSON(json: any): OpenapiV1AppsGet401Response { - return OpenapiV1AppsGet401ResponseFromJSONTyped(json, false); -} - -export function OpenapiV1AppsGet401ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenapiV1AppsGet401Response { - if (json == null) { - return json; - } - return { - - 'message': json['message'] == null ? undefined : json['message'], - }; -} - -export function OpenapiV1AppsGet401ResponseToJSON(json: any): OpenapiV1AppsGet401Response { - return OpenapiV1AppsGet401ResponseToJSONTyped(json, false); -} - -export function OpenapiV1AppsGet401ResponseToJSONTyped(value?: OpenapiV1AppsGet401Response | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'message': value['message'], - }; -} - diff --git a/typescript/src/models/OpenapiV1AppsPost400Response.ts b/typescript/src/models/OpenapiV1AppsPost400Response.ts deleted file mode 100644 index 9227b29b..00000000 --- a/typescript/src/models/OpenapiV1AppsPost400Response.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface OpenapiV1AppsPost400Response - */ -export interface OpenapiV1AppsPost400Response { - /** - * - * @type {string} - * @memberof OpenapiV1AppsPost400Response - */ - message?: string; - /** - * - * @type {string} - * @memberof OpenapiV1AppsPost400Response - */ - exception?: string; -} - -/** - * Check if a given object implements the OpenapiV1AppsPost400Response interface. - */ -export function instanceOfOpenapiV1AppsPost400Response(value: object): value is OpenapiV1AppsPost400Response { - return true; -} - -export function OpenapiV1AppsPost400ResponseFromJSON(json: any): OpenapiV1AppsPost400Response { - return OpenapiV1AppsPost400ResponseFromJSONTyped(json, false); -} - -export function OpenapiV1AppsPost400ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenapiV1AppsPost400Response { - if (json == null) { - return json; - } - return { - - 'message': json['message'] == null ? undefined : json['message'], - 'exception': json['exception'] == null ? undefined : json['exception'], - }; -} - -export function OpenapiV1AppsPost400ResponseToJSON(json: any): OpenapiV1AppsPost400Response { - return OpenapiV1AppsPost400ResponseToJSONTyped(json, false); -} - -export function OpenapiV1AppsPost400ResponseToJSONTyped(value?: OpenapiV1AppsPost400Response | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'message': value['message'], - 'exception': value['exception'], - }; -} - diff --git a/typescript/src/models/OpenapiV1AppsPostRequest.ts b/typescript/src/models/OpenapiV1AppsPostRequest.ts deleted file mode 100644 index 519eaa2a..00000000 --- a/typescript/src/models/OpenapiV1AppsPostRequest.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { OpenAppDTO } from './OpenAppDTO'; -import { - OpenAppDTOFromJSON, - OpenAppDTOFromJSONTyped, - OpenAppDTOToJSON, - OpenAppDTOToJSONTyped, -} from './OpenAppDTO'; - -/** - * - * @export - * @interface OpenapiV1AppsPostRequest - */ -export interface OpenapiV1AppsPostRequest { - /** - * - * @type {OpenAppDTO} - * @memberof OpenapiV1AppsPostRequest - */ - app: OpenAppDTO; - /** - * 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 - * @type {boolean} - * @memberof OpenapiV1AppsPostRequest - */ - assignAppRoleToSelf: boolean; - /** - * 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 - * @type {Array} - * @memberof OpenapiV1AppsPostRequest - */ - admins: Array; -} - -/** - * Check if a given object implements the OpenapiV1AppsPostRequest interface. - */ -export function instanceOfOpenapiV1AppsPostRequest(value: object): value is OpenapiV1AppsPostRequest { - if (!('app' in value) || value['app'] === undefined) return false; - if (!('assignAppRoleToSelf' in value) || value['assignAppRoleToSelf'] === undefined) return false; - if (!('admins' in value) || value['admins'] === undefined) return false; - return true; -} - -export function OpenapiV1AppsPostRequestFromJSON(json: any): OpenapiV1AppsPostRequest { - return OpenapiV1AppsPostRequestFromJSONTyped(json, false); -} - -export function OpenapiV1AppsPostRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenapiV1AppsPostRequest { - if (json == null) { - return json; - } - return { - - 'app': OpenAppDTOFromJSON(json['app']), - 'assignAppRoleToSelf': json['assignAppRoleToSelf'], - 'admins': json['admins'], - }; -} - -export function OpenapiV1AppsPostRequestToJSON(json: any): OpenapiV1AppsPostRequest { - return OpenapiV1AppsPostRequestToJSONTyped(json, false); -} - -export function OpenapiV1AppsPostRequestToJSONTyped(value?: OpenapiV1AppsPostRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'app': OpenAppDTOToJSON(value['app']), - 'assignAppRoleToSelf': value['assignAppRoleToSelf'], - 'admins': value['admins'], - }; -} - diff --git a/typescript/src/models/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.ts b/typescript/src/models/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.ts deleted file mode 100644 index 559c376f..00000000 --- a/typescript/src/models/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - */ -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response { - /** - * - * @type {boolean} - * @memberof OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - */ - valid?: boolean; - /** - * - * @type {string} - * @memberof OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - */ - message?: string; -} - -/** - * Check if a given object implements the OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response interface. - */ -export function instanceOfOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response(value: object): value is OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response { - return true; -} - -export function OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseFromJSON(json: any): OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response { - return OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseFromJSONTyped(json, false); -} - -export function OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response { - if (json == null) { - return json; - } - return { - - 'valid': json['valid'] == null ? undefined : json['valid'], - 'message': json['message'] == null ? undefined : json['message'], - }; -} - -export function OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseToJSON(json: any): OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response { - return OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseToJSONTyped(json, false); -} - -export function OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseToJSONTyped(value?: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'valid': value['valid'], - 'message': value['message'], - }; -} - diff --git a/typescript/src/models/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.ts b/typescript/src/models/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.ts deleted file mode 100644 index 93d3a8f9..00000000 --- a/typescript/src/models/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - */ -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response { - /** - * - * @type {boolean} - * @memberof OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - */ - valid?: boolean; - /** - * - * @type {string} - * @memberof OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - */ - message?: string; - /** - * - * @type {Array} - * @memberof OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - */ - errors?: Array; -} - -/** - * Check if a given object implements the OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response interface. - */ -export function instanceOfOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response(value: object): value is OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response { - return true; -} - -export function OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400ResponseFromJSON(json: any): OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response { - return OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400ResponseFromJSONTyped(json, false); -} - -export function OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response { - if (json == null) { - return json; - } - return { - - 'valid': json['valid'] == null ? undefined : json['valid'], - 'message': json['message'] == null ? undefined : json['message'], - 'errors': json['errors'] == null ? undefined : json['errors'], - }; -} - -export function OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400ResponseToJSON(json: any): OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response { - return OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400ResponseToJSONTyped(json, false); -} - -export function OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400ResponseToJSONTyped(value?: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'valid': value['valid'], - 'message': value['message'], - 'errors': value['errors'], - }; -} - diff --git a/typescript/src/models/OpenapiV1EnvsEnvReleasesCompareGet200Response.ts b/typescript/src/models/OpenapiV1EnvsEnvReleasesCompareGet200Response.ts deleted file mode 100644 index 7885938f..00000000 --- a/typescript/src/models/OpenapiV1EnvsEnvReleasesCompareGet200Response.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { Change } from './Change'; -import { - ChangeFromJSON, - ChangeFromJSONTyped, - ChangeToJSON, - ChangeToJSONTyped, -} from './Change'; - -/** - * - * @export - * @interface OpenapiV1EnvsEnvReleasesCompareGet200Response - */ -export interface OpenapiV1EnvsEnvReleasesCompareGet200Response { - /** - * - * @type {Array} - * @memberof OpenapiV1EnvsEnvReleasesCompareGet200Response - */ - changes?: Array; -} - -/** - * Check if a given object implements the OpenapiV1EnvsEnvReleasesCompareGet200Response interface. - */ -export function instanceOfOpenapiV1EnvsEnvReleasesCompareGet200Response(value: object): value is OpenapiV1EnvsEnvReleasesCompareGet200Response { - return true; -} - -export function OpenapiV1EnvsEnvReleasesCompareGet200ResponseFromJSON(json: any): OpenapiV1EnvsEnvReleasesCompareGet200Response { - return OpenapiV1EnvsEnvReleasesCompareGet200ResponseFromJSONTyped(json, false); -} - -export function OpenapiV1EnvsEnvReleasesCompareGet200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenapiV1EnvsEnvReleasesCompareGet200Response { - if (json == null) { - return json; - } - return { - - 'changes': json['changes'] == null ? undefined : ((json['changes'] as Array).map(ChangeFromJSON)), - }; -} - -export function OpenapiV1EnvsEnvReleasesCompareGet200ResponseToJSON(json: any): OpenapiV1EnvsEnvReleasesCompareGet200Response { - return OpenapiV1EnvsEnvReleasesCompareGet200ResponseToJSONTyped(json, false); -} - -export function OpenapiV1EnvsEnvReleasesCompareGet200ResponseToJSONTyped(value?: OpenapiV1EnvsEnvReleasesCompareGet200Response | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'changes': value['changes'] == null ? undefined : ((value['changes'] as Array).map(ChangeToJSON)), - }; -} - diff --git a/typescript/src/models/ReleaseDTO.ts b/typescript/src/models/ReleaseDTO.ts deleted file mode 100644 index 8f5516c0..00000000 --- a/typescript/src/models/ReleaseDTO.ts +++ /dev/null @@ -1,177 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface ReleaseDTO - */ -export interface ReleaseDTO { - /** - * - * @type {string} - * @memberof ReleaseDTO - */ - dataChangeCreatedBy?: string; - /** - * - * @type {string} - * @memberof ReleaseDTO - */ - dataChangeLastModifiedBy?: string; - /** - * - * @type {string} - * @memberof ReleaseDTO - */ - dataChangeCreatedByDisplayName?: string; - /** - * - * @type {string} - * @memberof ReleaseDTO - */ - dataChangeLastModifiedByDisplayName?: string; - /** - * - * @type {string} - * @memberof ReleaseDTO - */ - dataChangeCreatedTime?: string; - /** - * - * @type {string} - * @memberof ReleaseDTO - */ - dataChangeLastModifiedTime?: string; - /** - * - * @type {number} - * @memberof ReleaseDTO - */ - id?: number; - /** - * - * @type {string} - * @memberof ReleaseDTO - */ - releaseKey?: string; - /** - * - * @type {string} - * @memberof ReleaseDTO - */ - name?: string; - /** - * - * @type {string} - * @memberof ReleaseDTO - */ - appId?: string; - /** - * - * @type {string} - * @memberof ReleaseDTO - */ - clusterName?: string; - /** - * - * @type {string} - * @memberof ReleaseDTO - */ - namespaceName?: string; - /** - * - * @type {string} - * @memberof ReleaseDTO - */ - configurations?: string; - /** - * - * @type {string} - * @memberof ReleaseDTO - */ - comment?: string; - /** - * - * @type {boolean} - * @memberof ReleaseDTO - */ - isAbandoned?: boolean; -} - -/** - * Check if a given object implements the ReleaseDTO interface. - */ -export function instanceOfReleaseDTO(value: object): value is ReleaseDTO { - return true; -} - -export function ReleaseDTOFromJSON(json: any): ReleaseDTO { - return ReleaseDTOFromJSONTyped(json, false); -} - -export function ReleaseDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReleaseDTO { - if (json == null) { - return json; - } - return { - - 'dataChangeCreatedBy': json['dataChangeCreatedBy'] == null ? undefined : json['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': json['dataChangeLastModifiedBy'] == null ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeCreatedByDisplayName': json['dataChangeCreatedByDisplayName'] == null ? undefined : json['dataChangeCreatedByDisplayName'], - 'dataChangeLastModifiedByDisplayName': json['dataChangeLastModifiedByDisplayName'] == null ? undefined : json['dataChangeLastModifiedByDisplayName'], - 'dataChangeCreatedTime': json['dataChangeCreatedTime'] == null ? undefined : json['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': json['dataChangeLastModifiedTime'] == null ? undefined : json['dataChangeLastModifiedTime'], - 'id': json['id'] == null ? undefined : json['id'], - 'releaseKey': json['releaseKey'] == null ? undefined : json['releaseKey'], - 'name': json['name'] == null ? undefined : json['name'], - 'appId': json['appId'] == null ? undefined : json['appId'], - 'clusterName': json['clusterName'] == null ? undefined : json['clusterName'], - 'namespaceName': json['namespaceName'] == null ? undefined : json['namespaceName'], - 'configurations': json['configurations'] == null ? undefined : json['configurations'], - 'comment': json['comment'] == null ? undefined : json['comment'], - 'isAbandoned': json['isAbandoned'] == null ? undefined : json['isAbandoned'], - }; -} - -export function ReleaseDTOToJSON(json: any): ReleaseDTO { - return ReleaseDTOToJSONTyped(json, false); -} - -export function ReleaseDTOToJSONTyped(value?: ReleaseDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'dataChangeCreatedBy': value['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': value['dataChangeLastModifiedBy'], - 'dataChangeCreatedByDisplayName': value['dataChangeCreatedByDisplayName'], - 'dataChangeLastModifiedByDisplayName': value['dataChangeLastModifiedByDisplayName'], - 'dataChangeCreatedTime': value['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': value['dataChangeLastModifiedTime'], - 'id': value['id'], - 'releaseKey': value['releaseKey'], - 'name': value['name'], - 'appId': value['appId'], - 'clusterName': value['clusterName'], - 'namespaceName': value['namespaceName'], - 'configurations': value['configurations'], - 'comment': value['comment'], - 'isAbandoned': value['isAbandoned'], - }; -} - diff --git a/typescript/src/models/RichResponseEntity.ts b/typescript/src/models/RichResponseEntity.ts new file mode 100644 index 00000000..eb009a65 --- /dev/null +++ b/typescript/src/models/RichResponseEntity.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Apollo OpenAPI + *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
+ * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * A wrapper for a single response entity with code, message, and body + * @export + * @interface RichResponseEntity + */ +export interface RichResponseEntity { + /** + * HTTP status code + * @type {number} + * @memberof RichResponseEntity + */ + code: number; + /** + * Response message (can be string or object) + * @type {object} + * @memberof RichResponseEntity + */ + message: object; + /** + * Response payload (generic type T) + * @type {object} + * @memberof RichResponseEntity + */ + body?: object; +} + +/** + * Check if a given object implements the RichResponseEntity interface. + */ +export function instanceOfRichResponseEntity(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "code" in value; + isInstance = isInstance && "message" in value; + + return isInstance; +} + +export function RichResponseEntityFromJSON(json: any): RichResponseEntity { + return RichResponseEntityFromJSONTyped(json, false); +} + +export function RichResponseEntityFromJSONTyped(json: any, ignoreDiscriminator: boolean): RichResponseEntity { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'code': json['code'], + 'message': json['message'], + 'body': !exists(json, 'body') ? undefined : json['body'], + }; +} + +export function RichResponseEntityToJSON(value?: RichResponseEntity | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'code': value.code, + 'message': value.message, + 'body': value.body, + }; +} diff --git a/typescript/src/models/index.ts b/typescript/src/models/index.ts index 220e4b43..eaaa6aed 100644 --- a/typescript/src/models/index.ts +++ b/typescript/src/models/index.ts @@ -1,40 +1,30 @@ /* tslint:disable */ /* eslint-disable */ -export * from './Change'; -export * from './ClusterDTO'; -export * from './EntityPairKVEntity'; -export * from './EnvClusterInfo'; -export * from './ItemChangeSets'; -export * from './ItemDTO'; export * from './KVEntity'; -export * from './ListItemDiffs'; -export * from './ListReleaseBO'; -export * from './MapString'; +export * from './MultiResponseEntity'; export * from './NamespaceGrayDelReleaseDTO'; -export * from './NamespaceIdentifier'; export * from './NamespaceReleaseDTO'; -export * from './NamespaceSyncModel'; -export * from './NamespaceTextModel'; export * from './OpenAppDTO'; export * from './OpenAppNamespaceDTO'; export * from './OpenClusterDTO'; export * from './OpenCreateAppDTO'; export * from './OpenEnvClusterDTO'; +export * from './OpenEnvClusterInfo'; export * from './OpenGrayReleaseRuleDTO'; export * from './OpenGrayReleaseRuleItemDTO'; export * from './OpenInstanceConfigDTO'; export * from './OpenInstanceDTO'; +export * from './OpenItemChangeSets'; export * from './OpenItemDTO'; +export * from './OpenItemDiffs'; 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 './OpenapiV1AppsGet401Response'; -export * from './OpenapiV1AppsPost400Response'; -export * from './OpenapiV1AppsPostRequest'; -export * from './OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response'; -export * from './OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response'; -export * from './OpenapiV1EnvsEnvReleasesCompareGet200Response'; -export * from './ReleaseDTO'; +export * from './RichResponseEntity'; diff --git a/typescript/src/runtime.ts b/typescript/src/runtime.ts index 6dd9e836..653f4586 100644 --- a/typescript/src/runtime.ts +++ b/typescript/src/runtime.ts @@ -2,10 +2,10 @@ /* eslint-disable */ /** * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` + *

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 @@ -22,7 +22,7 @@ export interface ConfigurationParameters { queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings username?: string; // parameter for basic security password?: string; // parameter for basic security - apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + apiKey?: string | ((name: string) => string); // parameter for apiKey security accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security headers?: HTTPHeaders; //header params we want to use on every request credentials?: RequestCredentials; //value for the credentials param we want to use on each request @@ -59,7 +59,7 @@ export class Configuration { return this.configuration.password; } - get apiKey(): ((name: string) => string | Promise) | undefined { + get apiKey(): ((name: string) => string) | undefined { const apiKey = this.configuration.apiKey; if (apiKey) { return typeof apiKey === 'function' ? apiKey : () => apiKey; @@ -91,7 +91,7 @@ export const DefaultConfig = new Configuration(); */ export class BaseAPI { - private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); + private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); private middleware: Middleware[]; constructor(protected configuration = DefaultConfig) { @@ -172,20 +172,14 @@ export class BaseAPI { })) }; - let body: any; - if (isFormData(overriddenInit.body) - || (overriddenInit.body instanceof URLSearchParams) - || isBlob(overriddenInit.body)) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers['Content-Type'])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } - const init: RequestInit = { ...overriddenInit, - body + body: + isFormData(overriddenInit.body) || + overriddenInit.body instanceof URLSearchParams || + isBlob(overriddenInit.body) + ? overriddenInit.body + : JSON.stringify(overriddenInit.body), }; return { url, init }; @@ -310,6 +304,11 @@ export interface RequestOpts { body?: HTTPBody; } +export function exists(json: any, key: string) { + const value = json[key]; + return value !== null && value !== undefined; +} + export function querystring(params: HTTPQuery, prefix: string = ''): string { return Object.keys(params) .map(key => querystringSingleKey(key, params[key], prefix)) @@ -337,17 +336,11 @@ function querystringSingleKey(key: string, value: string | number | null | undef return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; } -export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; -} - export function mapValues(data: any, fn: (item: any) => any) { - const result: { [key: string]: any } = {}; - for (const key of Object.keys(data)) { - result[key] = fn(data[key]); - } - return result; + return Object.keys(data).reduce( + (acc, key) => ({ ...acc, [key]: fn(data[key]) }), + {} + ); } export function canConsumeForm(consumes: Consume[]): boolean { From 51c2911a1f5e27f52435ab60f0f4d8035ef64ce9 Mon Sep 17 00:00:00 2001 From: tacklequestions Date: Sun, 19 Oct 2025 21:57:18 +0800 Subject: [PATCH 2/2] fix: fixed unintuitive function naming --- apollo-openapi.yaml | 4 +- java-client/README.md | 6 +- java-client/api/openapi.yaml | 5 +- java-client/docs/InstanceManagementApi.md | 74 ++-- java-client/docs/OpenCreateAppDTO.md | 2 +- .../org/openapitools/client/ApiException.java | 2 +- .../openapitools/client/Configuration.java | 2 +- .../java/org/openapitools/client/Pair.java | 2 +- .../org/openapitools/client/StringUtil.java | 2 +- .../client/api/InstanceManagementApi.java | 242 +++++------ .../openapitools/client/auth/ApiKeyAuth.java | 2 +- .../client/auth/HttpBearerAuth.java | 2 +- .../client/model/AbstractOpenApiSchema.java | 2 +- .../openapitools/client/model/KVEntity.java | 2 +- .../client/model/MultiResponseEntity.java | 2 +- .../model/NamespaceGrayDelReleaseDTO.java | 2 +- .../client/model/NamespaceReleaseDTO.java | 2 +- .../openapitools/client/model/OpenAppDTO.java | 2 +- .../client/model/OpenAppNamespaceDTO.java | 2 +- .../client/model/OpenClusterDTO.java | 2 +- .../client/model/OpenCreateAppDTO.java | 16 +- .../client/model/OpenEnvClusterDTO.java | 2 +- .../client/model/OpenEnvClusterInfo.java | 2 +- .../client/model/OpenGrayReleaseRuleDTO.java | 2 +- .../model/OpenGrayReleaseRuleItemDTO.java | 2 +- .../client/model/OpenInstanceConfigDTO.java | 2 +- .../client/model/OpenInstanceDTO.java | 2 +- .../client/model/OpenItemChangeSets.java | 2 +- .../client/model/OpenItemDTO.java | 2 +- .../client/model/OpenItemDiffs.java | 2 +- .../client/model/OpenNamespaceDTO.java | 2 +- .../client/model/OpenNamespaceIdentifier.java | 2 +- .../client/model/OpenNamespaceLockDTO.java | 2 +- .../client/model/OpenNamespaceSyncModel.java | 2 +- .../client/model/OpenNamespaceTextModel.java | 2 +- .../client/model/OpenOrganizationDto.java | 2 +- .../model/OpenPageDTOOpenInstanceDTO.java | 2 +- .../client/model/OpenPageDTOOpenItemDTO.java | 2 +- .../client/model/OpenReleaseBO.java | 2 +- .../client/model/OpenReleaseDTO.java | 2 +- .../client/model/RichResponseEntity.java | 2 +- .../client/api/InstanceManagementApiTest.java | 32 +- .../client/model/OpenCreateAppDTOTest.java | 4 +- python/README.md | 4 +- python/apollo_openapi/apis/path_to_api.py | 6 +- ...spaces_namespace_name_instances_not_int.py | 7 - .../apis/tags/instance_management_api.py | 8 +- .../model/open_create_app_dto.py | 1 + python/apollo_openapi/paths/__init__.py | 2 +- .../__init__.py | 7 - .../get.py | 401 ------------------ .../get.pyi | 393 ----------------- .../get.py | 22 +- .../get.pyi | 22 +- .../docs/apis/tags/InstanceManagementApi.md | 164 +++---- .../__init__.py | 1 - .../test_get.py | 41 -- .../openapi/server/api/AppManagementApi.java | 2 +- .../api/AppManagementApiController.java | 2 +- .../server/api/AppManagementApiDelegate.java | 2 +- .../server/api/ClusterManagementApi.java | 2 +- .../api/ClusterManagementApiController.java | 2 +- .../api/ClusterManagementApiDelegate.java | 2 +- .../server/api/InstanceManagementApi.java | 80 ++-- .../api/InstanceManagementApiController.java | 2 +- .../api/InstanceManagementApiDelegate.java | 70 +-- .../openapi/server/api/ItemManagementApi.java | 2 +- .../api/ItemManagementApiController.java | 2 +- .../server/api/ItemManagementApiDelegate.java | 2 +- .../api/NamespaceBranchManagementApi.java | 2 +- ...amespaceBranchManagementApiController.java | 2 +- .../NamespaceBranchManagementApiDelegate.java | 2 +- .../server/api/NamespaceManagementApi.java | 2 +- .../api/NamespaceManagementApiController.java | 2 +- .../api/NamespaceManagementApiDelegate.java | 2 +- .../server/api/OrganizationManagementApi.java | 2 +- .../OrganizationManagementApiController.java | 2 +- .../OrganizationManagementApiDelegate.java | 2 +- .../server/api/ReleaseManagementApi.java | 2 +- .../api/ReleaseManagementApiController.java | 2 +- .../api/ReleaseManagementApiDelegate.java | 2 +- .../apollo/openapi/server/model/KVEntity.java | 2 +- .../server/model/MultiResponseEntity.java | 2 +- .../model/NamespaceGrayDelReleaseDTO.java | 2 +- .../server/model/NamespaceReleaseDTO.java | 2 +- .../openapi/server/model/OpenAppDTO.java | 2 +- .../server/model/OpenAppNamespaceDTO.java | 2 +- .../openapi/server/model/OpenClusterDTO.java | 2 +- .../server/model/OpenCreateAppDTO.java | 18 +- .../server/model/OpenEnvClusterDTO.java | 2 +- .../server/model/OpenEnvClusterInfo.java | 2 +- .../server/model/OpenGrayReleaseRuleDTO.java | 2 +- .../model/OpenGrayReleaseRuleItemDTO.java | 2 +- .../server/model/OpenInstanceConfigDTO.java | 2 +- .../openapi/server/model/OpenInstanceDTO.java | 2 +- .../server/model/OpenItemChangeSets.java | 2 +- .../openapi/server/model/OpenItemDTO.java | 2 +- .../openapi/server/model/OpenItemDiffs.java | 2 +- .../server/model/OpenNamespaceDTO.java | 2 +- .../server/model/OpenNamespaceIdentifier.java | 2 +- .../server/model/OpenNamespaceLockDTO.java | 2 +- .../server/model/OpenNamespaceSyncModel.java | 2 +- .../server/model/OpenNamespaceTextModel.java | 2 +- .../server/model/OpenOrganizationDto.java | 2 +- .../model/OpenPageDTOOpenInstanceDTO.java | 2 +- .../server/model/OpenPageDTOOpenItemDTO.java | 2 +- .../openapi/server/model/OpenReleaseBO.java | 2 +- .../openapi/server/model/OpenReleaseDTO.java | 2 +- .../server/model/RichResponseEntity.java | 2 +- spring-boot2/src/main/resources/openapi.yaml | 5 +- typescript/src/apis/InstanceManagementApi.ts | 122 +++--- typescript/src/models/OpenCreateAppDTO.ts | 6 +- 112 files changed, 546 insertions(+), 1385 deletions(-) delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/get.pyi delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/test_get.py diff --git a/apollo-openapi.yaml b/apollo-openapi.yaml index 5054a9ab..9dc2479e 100644 --- a/apollo-openapi.yaml +++ b/apollo-openapi.yaml @@ -2395,6 +2395,7 @@ paths: /openapi/v1/envs/{env}/releases/{releaseId}/instances: get: summary: 根据发布版本查询实例(支持分页) (new added) + operationId: getByRelease deprecated: false description: GET /openapi/v1/envs/{env}/releases/{releaseId}/instances tags: @@ -2461,9 +2462,10 @@ paths: dataChangeLastModifiedTime: '' dataChangeCreatedTime: '' headers: {} - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int: # avoidng confliction with other server endpoint + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in: # avoidng confliction with other server endpoint get: summary: 查询不在指定发布版本中的实例 (new added) + operationId: getByReleasesNotIn deprecated: false description: >- GET diff --git a/java-client/README.md b/java-client/README.md index c7c1bed3..cd8064d4 100644 --- a/java-client/README.md +++ b/java-client/README.md @@ -2,7 +2,7 @@ Apollo OpenAPI - API version: 1.0.0 - - Build date: 2025-10-07T09:56:26.447+08:00[Asia/Shanghai] + - Build date: 2025-10-19T21:51:04.875+08:00[Asia/Shanghai]

Apollo配置中心OpenAPI接口文档

@@ -150,9 +150,9 @@ Class | Method | HTTP request | Description *ClusterManagementApi* | [**createCluster**](docs/ClusterManagementApi.md#createCluster) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters | 创建集群 (original openapi) *ClusterManagementApi* | [**deleteCluster**](docs/ClusterManagementApi.md#deleteCluster) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 删除集群 (new added) *ClusterManagementApi* | [**getCluster**](docs/ClusterManagementApi.md#getCluster) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 获取指定集群信息 (original openapi) +*InstanceManagementApi* | [**getByRelease**](docs/InstanceManagementApi.md#getByRelease) | **GET** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) (new added) +*InstanceManagementApi* | [**getByReleasesNotIn**](docs/InstanceManagementApi.md#getByReleasesNotIn) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in | 查询不在指定发布版本中的实例 (new added) *InstanceManagementApi* | [**getInstanceCountByNamespace**](docs/InstanceManagementApi.md#getInstanceCountByNamespace) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 获取命名空间下的实例数量 (original openapi) -*InstanceManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet**](docs/InstanceManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int | 查询不在指定发布版本中的实例 (new added) -*InstanceManagementApi* | [**openapiV1EnvsEnvReleasesReleaseIdInstancesGet**](docs/InstanceManagementApi.md#openapiV1EnvsEnvReleasesReleaseIdInstancesGet) | **GET** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) (new added) *ItemManagementApi* | [**batchUpdateItemsByText**](docs/ItemManagementApi.md#batchUpdateItemsByText) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate | 通过文本批量修改配置项 (new added) *ItemManagementApi* | [**compareItems**](docs/ItemManagementApi.md#compareItems) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare | 对比命名空间配置差异 (new added) *ItemManagementApi* | [**createItem**](docs/ItemManagementApi.md#createItem) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 创建新的配置项 (original openapi) diff --git a/java-client/api/openapi.yaml b/java-client/api/openapi.yaml index 83430ba8..0972f21d 100644 --- a/java-client/api/openapi.yaml +++ b/java-client/api/openapi.yaml @@ -2680,6 +2680,7 @@ paths: get: deprecated: false description: "GET /openapi/v1/envs/{env}/releases/{releaseId}/instances" + operationId: getByRelease parameters: - description: "" explode: false @@ -2754,10 +2755,11 @@ paths: tags: - Instance Management x-accepts: application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in: get: deprecated: false description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3" + operationId: getByReleasesNotIn parameters: - description: 环境标识 explode: false @@ -4113,6 +4115,7 @@ components: items: type: string type: array + uniqueItems: true app: $ref: '#/components/schemas/OpenAppDTO' type: object diff --git a/java-client/docs/InstanceManagementApi.md b/java-client/docs/InstanceManagementApi.md index 4976b4ad..6e2c7d72 100644 --- a/java-client/docs/InstanceManagementApi.md +++ b/java-client/docs/InstanceManagementApi.md @@ -4,18 +4,18 @@ All URIs are relative to *http://localhost* | Method | HTTP request | Description | |------------- | ------------- | -------------| +| [**getByRelease**](InstanceManagementApi.md#getByRelease) | **GET** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) (new added) | +| [**getByReleasesNotIn**](InstanceManagementApi.md#getByReleasesNotIn) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in | 查询不在指定发布版本中的实例 (new added) | | [**getInstanceCountByNamespace**](InstanceManagementApi.md#getInstanceCountByNamespace) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 获取命名空间下的实例数量 (original openapi) | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet**](InstanceManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int | 查询不在指定发布版本中的实例 (new added) | -| [**openapiV1EnvsEnvReleasesReleaseIdInstancesGet**](InstanceManagementApi.md#openapiV1EnvsEnvReleasesReleaseIdInstancesGet) | **GET** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) (new added) | - -# **getInstanceCountByNamespace** -> Integer getInstanceCountByNamespace(env, appId, clusterName, namespaceName) + +# **getByRelease** +> OpenPageDTOOpenInstanceDTO getByRelease(env, releaseId, page, size) -获取命名空间下的实例数量 (original openapi) +根据发布版本查询实例(支持分页) (new added) -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances +GET /openapi/v1/envs/{env}/releases/{releaseId}/instances ### Example ```java @@ -40,14 +40,14 @@ public class Example { InstanceManagementApi apiInstance = new InstanceManagementApi(defaultClient); String env = "env_example"; // String | - String appId = "appId_example"; // String | 应用ID - String clusterName = "clusterName_example"; // String | 集群名称 - String namespaceName = "namespaceName_example"; // String | 命名空间名称 + Integer releaseId = 56; // Integer | + Integer page = 0; // Integer | + Integer size = 20; // Integer | try { - Integer result = apiInstance.getInstanceCountByNamespace(env, appId, clusterName, namespaceName); + OpenPageDTOOpenInstanceDTO result = apiInstance.getByRelease(env, releaseId, page, size); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling InstanceManagementApi#getInstanceCountByNamespace"); + System.err.println("Exception when calling InstanceManagementApi#getByRelease"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -62,13 +62,13 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **env** | **String**| | | -| **appId** | **String**| 应用ID | | -| **clusterName** | **String**| 集群名称 | | -| **namespaceName** | **String**| 命名空间名称 | | +| **releaseId** | **Integer**| | | +| **page** | **Integer**| | | +| **size** | **Integer**| | | ### Return type -**Integer** +[**OpenPageDTOOpenInstanceDTO**](OpenPageDTOOpenInstanceDTO.md) ### Authorization @@ -82,11 +82,11 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | 成功返回实例数量 | - | +| **200** | | - | - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet** -> List<OpenInstanceDTO> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(env, appId, clusterName, namespaceName, excludeReleases) + +# **getByReleasesNotIn** +> List<OpenInstanceDTO> getByReleasesNotIn(env, appId, clusterName, namespaceName, excludeReleases) 查询不在指定发布版本中的实例 (new added) @@ -120,10 +120,10 @@ public class Example { String namespaceName = "namespaceName_example"; // String | 命名空间名称 String excludeReleases = "excludeReleases_example"; // String | 排除的发布ID列表,用逗号分隔 try { - List result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(env, appId, clusterName, namespaceName, excludeReleases); + List result = apiInstance.getByReleasesNotIn(env, appId, clusterName, namespaceName, excludeReleases); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling InstanceManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet"); + System.err.println("Exception when calling InstanceManagementApi#getByReleasesNotIn"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -161,13 +161,13 @@ public class Example { |-------------|-------------|------------------| | **200** | | - | - -# **openapiV1EnvsEnvReleasesReleaseIdInstancesGet** -> OpenPageDTOOpenInstanceDTO openapiV1EnvsEnvReleasesReleaseIdInstancesGet(env, releaseId, page, size) + +# **getInstanceCountByNamespace** +> Integer getInstanceCountByNamespace(env, appId, clusterName, namespaceName) -根据发布版本查询实例(支持分页) (new added) +获取命名空间下的实例数量 (original openapi) -GET /openapi/v1/envs/{env}/releases/{releaseId}/instances +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances ### Example ```java @@ -192,14 +192,14 @@ public class Example { InstanceManagementApi apiInstance = new InstanceManagementApi(defaultClient); String env = "env_example"; // String | - Integer releaseId = 56; // Integer | - Integer page = 0; // Integer | - Integer size = 20; // Integer | + String appId = "appId_example"; // String | 应用ID + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 命名空间名称 try { - OpenPageDTOOpenInstanceDTO result = apiInstance.openapiV1EnvsEnvReleasesReleaseIdInstancesGet(env, releaseId, page, size); + Integer result = apiInstance.getInstanceCountByNamespace(env, appId, clusterName, namespaceName); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling InstanceManagementApi#openapiV1EnvsEnvReleasesReleaseIdInstancesGet"); + System.err.println("Exception when calling InstanceManagementApi#getInstanceCountByNamespace"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -214,13 +214,13 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **env** | **String**| | | -| **releaseId** | **Integer**| | | -| **page** | **Integer**| | | -| **size** | **Integer**| | | +| **appId** | **String**| 应用ID | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 命名空间名称 | | ### Return type -[**OpenPageDTOOpenInstanceDTO**](OpenPageDTOOpenInstanceDTO.md) +**Integer** ### Authorization @@ -234,4 +234,4 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | | - | +| **200** | 成功返回实例数量 | - | diff --git a/java-client/docs/OpenCreateAppDTO.md b/java-client/docs/OpenCreateAppDTO.md index e297c906..7baaff94 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/src/main/java/org/openapitools/client/ApiException.java b/java-client/src/main/java/org/openapitools/client/ApiException.java index 0b80bebf..ff219a41 100644 --- a/java-client/src/main/java/org/openapitools/client/ApiException.java +++ b/java-client/src/main/java/org/openapitools/client/ApiException.java @@ -22,7 +22,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/java-client/src/main/java/org/openapitools/client/Configuration.java b/java-client/src/main/java/org/openapitools/client/Configuration.java index 63f0475b..4775e121 100644 --- a/java-client/src/main/java/org/openapitools/client/Configuration.java +++ b/java-client/src/main/java/org/openapitools/client/Configuration.java @@ -13,7 +13,7 @@ package org.openapitools.client; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class Configuration { public static final String VERSION = "0.0.1"; diff --git a/java-client/src/main/java/org/openapitools/client/Pair.java b/java-client/src/main/java/org/openapitools/client/Pair.java index 925570cb..070bbe07 100644 --- a/java-client/src/main/java/org/openapitools/client/Pair.java +++ b/java-client/src/main/java/org/openapitools/client/Pair.java @@ -13,7 +13,7 @@ package org.openapitools.client; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class Pair { private String name = ""; private String value = ""; diff --git a/java-client/src/main/java/org/openapitools/client/StringUtil.java b/java-client/src/main/java/org/openapitools/client/StringUtil.java index 9f539266..042ac19e 100644 --- a/java-client/src/main/java/org/openapitools/client/StringUtil.java +++ b/java-client/src/main/java/org/openapitools/client/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). 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 1e158f7d..80787b47 100644 --- a/java-client/src/main/java/org/openapitools/client/api/InstanceManagementApi.java +++ b/java-client/src/main/java/org/openapitools/client/api/InstanceManagementApi.java @@ -75,21 +75,21 @@ public void setCustomBaseUrl(String customBaseUrl) { } /** - * Build call for getInstanceCountByNamespace + * Build call for getByRelease * @param env (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) + * @param releaseId (required) + * @param page (required) + * @param size (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
Status Code Description Response Headers
200 成功返回实例数量 -
200 -
*/ - public okhttp3.Call getInstanceCountByNamespaceCall(String env, String appId, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getByReleaseCall(String env, Integer releaseId, Integer page, Integer size, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -106,11 +106,9 @@ public okhttp3.Call getInstanceCountByNamespaceCall(String env, String appId, St Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances" + String localVarPath = "/openapi/v1/envs/{env}/releases/{releaseId}/instances" .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); + .replace("{" + "releaseId" + "}", localVarApiClient.escapeString(releaseId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -118,6 +116,14 @@ public okhttp3.Call getInstanceCountByNamespaceCall(String env, String appId, St Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + if (size != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size)); + } + final String[] localVarAccepts = { "application/json" }; @@ -138,97 +144,97 @@ public okhttp3.Call getInstanceCountByNamespaceCall(String env, String appId, St } @SuppressWarnings("rawtypes") - private okhttp3.Call getInstanceCountByNamespaceValidateBeforeCall(String env, String appId, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getByReleaseValidateBeforeCall(String env, Integer releaseId, Integer page, Integer size, final ApiCallback _callback) throws ApiException { // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling getInstanceCountByNamespace(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling getByRelease(Async)"); } - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling getInstanceCountByNamespace(Async)"); + // verify the required parameter 'releaseId' is set + if (releaseId == null) { + throw new ApiException("Missing the required parameter 'releaseId' when calling getByRelease(Async)"); } - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling getInstanceCountByNamespace(Async)"); + // verify the required parameter 'page' is set + if (page == null) { + throw new ApiException("Missing the required parameter 'page' when calling getByRelease(Async)"); } - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling getInstanceCountByNamespace(Async)"); + // verify the required parameter 'size' is set + if (size == null) { + throw new ApiException("Missing the required parameter 'size' when calling getByRelease(Async)"); } - return getInstanceCountByNamespaceCall(env, appId, clusterName, namespaceName, _callback); + return getByReleaseCall(env, releaseId, page, size, _callback); } /** - * 获取命名空间下的实例数量 (original openapi) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances + * 根据发布版本查询实例(支持分页) (new added) + * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances * @param env (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @return Integer + * @param releaseId (required) + * @param page (required) + * @param size (required) + * @return OpenPageDTOOpenInstanceDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 成功返回实例数量 -
200 -
*/ - public Integer getInstanceCountByNamespace(String env, String appId, String clusterName, String namespaceName) throws ApiException { - ApiResponse localVarResp = getInstanceCountByNamespaceWithHttpInfo(env, appId, clusterName, namespaceName); + public OpenPageDTOOpenInstanceDTO getByRelease(String env, Integer releaseId, Integer page, Integer size) throws ApiException { + ApiResponse localVarResp = getByReleaseWithHttpInfo(env, releaseId, page, size); return localVarResp.getData(); } /** - * 获取命名空间下的实例数量 (original openapi) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances + * 根据发布版本查询实例(支持分页) (new added) + * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances * @param env (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @return ApiResponse<Integer> + * @param releaseId (required) + * @param page (required) + * @param size (required) + * @return ApiResponse<OpenPageDTOOpenInstanceDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 成功返回实例数量 -
200 -
*/ - public ApiResponse getInstanceCountByNamespaceWithHttpInfo(String env, String appId, String clusterName, String namespaceName) throws ApiException { - okhttp3.Call localVarCall = getInstanceCountByNamespaceValidateBeforeCall(env, appId, clusterName, namespaceName, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getByReleaseWithHttpInfo(String env, Integer releaseId, Integer page, Integer size) throws ApiException { + okhttp3.Call localVarCall = getByReleaseValidateBeforeCall(env, releaseId, page, size, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取命名空间下的实例数量 (original openapi) (asynchronously) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances + * 根据发布版本查询实例(支持分页) (new added) (asynchronously) + * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances * @param env (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) + * @param releaseId (required) + * @param page (required) + * @param size (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
Status Code Description Response Headers
200 成功返回实例数量 -
200 -
*/ - public okhttp3.Call getInstanceCountByNamespaceAsync(String env, String appId, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getByReleaseAsync(String env, Integer releaseId, Integer page, Integer size, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getInstanceCountByNamespaceValidateBeforeCall(env, appId, clusterName, namespaceName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getByReleaseValidateBeforeCall(env, releaseId, page, size, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet + * Build call for getByReleasesNotIn * @param env 环境标识 (required) * @param appId 应用ID (required) * @param clusterName 集群名称 (required) @@ -243,7 +249,7 @@ public okhttp3.Call getInstanceCountByNamespaceAsync(String env, String appId, S 200 - */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetCall(String env, String appId, String clusterName, String namespaceName, String excludeReleases, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getByReleasesNotInCall(String env, String appId, String clusterName, String namespaceName, String excludeReleases, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -260,7 +266,7 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in" .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) @@ -296,28 +302,28 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetValidateBeforeCall(String env, String appId, String clusterName, String namespaceName, String excludeReleases, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getByReleasesNotInValidateBeforeCall(String env, String appId, String clusterName, String namespaceName, String excludeReleases, final ApiCallback _callback) throws ApiException { // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling getByReleasesNotIn(Async)"); } // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling getByReleasesNotIn(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling getByReleasesNotIn(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling getByReleasesNotIn(Async)"); } - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetCall(env, appId, clusterName, namespaceName, excludeReleases, _callback); + return getByReleasesNotInCall(env, appId, clusterName, namespaceName, excludeReleases, _callback); } @@ -337,8 +343,8 @@ private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNames 200 - */ - public List openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(String env, String appId, String clusterName, String namespaceName, String excludeReleases) throws ApiException { - ApiResponse> localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetWithHttpInfo(env, appId, clusterName, namespaceName, excludeReleases); + public List getByReleasesNotIn(String env, String appId, String clusterName, String namespaceName, String excludeReleases) throws ApiException { + ApiResponse> localVarResp = getByReleasesNotInWithHttpInfo(env, appId, clusterName, namespaceName, excludeReleases); return localVarResp.getData(); } @@ -358,8 +364,8 @@ public List openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespa 200 - */ - public ApiResponse> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetWithHttpInfo(String env, String appId, String clusterName, String namespaceName, String excludeReleases) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetValidateBeforeCall(env, appId, clusterName, namespaceName, excludeReleases, null); + public ApiResponse> getByReleasesNotInWithHttpInfo(String env, String appId, String clusterName, String namespaceName, String excludeReleases) throws ApiException { + okhttp3.Call localVarCall = getByReleasesNotInValidateBeforeCall(env, appId, clusterName, namespaceName, excludeReleases, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -381,29 +387,29 @@ public ApiResponse> openapiV1EnvsEnvAppsAppIdClustersClust 200 - */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetAsync(String env, String appId, String clusterName, String namespaceName, String excludeReleases, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getByReleasesNotInAsync(String env, String appId, String clusterName, String namespaceName, String excludeReleases, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetValidateBeforeCall(env, appId, clusterName, namespaceName, excludeReleases, _callback); + okhttp3.Call localVarCall = getByReleasesNotInValidateBeforeCall(env, appId, clusterName, namespaceName, excludeReleases, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for openapiV1EnvsEnvReleasesReleaseIdInstancesGet + * Build call for getInstanceCountByNamespace * @param env (required) - * @param releaseId (required) - * @param page (required) - * @param size (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
Status Code Description Response Headers
200 -
200 成功返回实例数量 -
*/ - public okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdInstancesGetCall(String env, Integer releaseId, Integer page, Integer size, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getInstanceCountByNamespaceCall(String env, String appId, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -420,9 +426,11 @@ public okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdInstancesGetCall(String env Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/releases/{releaseId}/instances" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances" .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "releaseId" + "}", localVarApiClient.escapeString(releaseId.toString())); + .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) + .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -430,14 +438,6 @@ public okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdInstancesGetCall(String env Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (size != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size)); - } - final String[] localVarAccepts = { "application/json" }; @@ -458,92 +458,92 @@ public okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdInstancesGetCall(String env } @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdInstancesGetValidateBeforeCall(String env, Integer releaseId, Integer page, Integer size, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getInstanceCountByNamespaceValidateBeforeCall(String env, String appId, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling getInstanceCountByNamespace(Async)"); } - // verify the required parameter 'releaseId' is set - if (releaseId == null) { - throw new ApiException("Missing the required parameter 'releaseId' when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet(Async)"); + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling getInstanceCountByNamespace(Async)"); } - // verify the required parameter 'page' is set - if (page == null) { - throw new ApiException("Missing the required parameter 'page' when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet(Async)"); + // verify the required parameter 'clusterName' is set + if (clusterName == null) { + throw new ApiException("Missing the required parameter 'clusterName' when calling getInstanceCountByNamespace(Async)"); } - // verify the required parameter 'size' is set - if (size == null) { - throw new ApiException("Missing the required parameter 'size' when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet(Async)"); + // verify the required parameter 'namespaceName' is set + if (namespaceName == null) { + throw new ApiException("Missing the required parameter 'namespaceName' when calling getInstanceCountByNamespace(Async)"); } - return openapiV1EnvsEnvReleasesReleaseIdInstancesGetCall(env, releaseId, page, size, _callback); + return getInstanceCountByNamespaceCall(env, appId, clusterName, namespaceName, _callback); } /** - * 根据发布版本查询实例(支持分页) (new added) - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances + * 获取命名空间下的实例数量 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances * @param env (required) - * @param releaseId (required) - * @param page (required) - * @param size (required) - * @return OpenPageDTOOpenInstanceDTO + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @return Integer * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 -
200 成功返回实例数量 -
*/ - public OpenPageDTOOpenInstanceDTO openapiV1EnvsEnvReleasesReleaseIdInstancesGet(String env, Integer releaseId, Integer page, Integer size) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvReleasesReleaseIdInstancesGetWithHttpInfo(env, releaseId, page, size); + public Integer getInstanceCountByNamespace(String env, String appId, String clusterName, String namespaceName) throws ApiException { + ApiResponse localVarResp = getInstanceCountByNamespaceWithHttpInfo(env, appId, clusterName, namespaceName); return localVarResp.getData(); } /** - * 根据发布版本查询实例(支持分页) (new added) - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances + * 获取命名空间下的实例数量 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances * @param env (required) - * @param releaseId (required) - * @param page (required) - * @param size (required) - * @return ApiResponse<OpenPageDTOOpenInstanceDTO> + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @return ApiResponse<Integer> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 -
200 成功返回实例数量 -
*/ - public ApiResponse openapiV1EnvsEnvReleasesReleaseIdInstancesGetWithHttpInfo(String env, Integer releaseId, Integer page, Integer size) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvReleasesReleaseIdInstancesGetValidateBeforeCall(env, releaseId, page, size, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getInstanceCountByNamespaceWithHttpInfo(String env, String appId, String clusterName, String namespaceName) throws ApiException { + okhttp3.Call localVarCall = getInstanceCountByNamespaceValidateBeforeCall(env, appId, clusterName, namespaceName, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 根据发布版本查询实例(支持分页) (new added) (asynchronously) - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances + * 获取命名空间下的实例数量 (original openapi) (asynchronously) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances * @param env (required) - * @param releaseId (required) - * @param page (required) - * @param size (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
Status Code Description Response Headers
200 -
200 成功返回实例数量 -
*/ - public okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdInstancesGetAsync(String env, Integer releaseId, Integer page, Integer size, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getInstanceCountByNamespaceAsync(String env, String appId, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvReleasesReleaseIdInstancesGetValidateBeforeCall(env, releaseId, page, size, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getInstanceCountByNamespaceValidateBeforeCall(env, appId, clusterName, namespaceName, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/java-client/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/java-client/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java index 846a18e6..c2e41492 100644 --- a/java-client/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ b/java-client/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/java-client/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/java-client/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java index e7e456a4..4d69cf83 100644 --- a/java-client/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +++ b/java-client/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class HttpBearerAuth implements Authentication { private final String scheme; private String bearerToken; diff --git a/java-client/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java b/java-client/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java index 0572878b..63c1ff58 100644 --- a/java-client/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java +++ b/java-client/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java @@ -24,7 +24,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/java-client/src/main/java/org/openapitools/client/model/KVEntity.java b/java-client/src/main/java/org/openapitools/client/model/KVEntity.java index 9de12ed5..61cfea92 100644 --- a/java-client/src/main/java/org/openapitools/client/model/KVEntity.java +++ b/java-client/src/main/java/org/openapitools/client/model/KVEntity.java @@ -50,7 +50,7 @@ /** * KVEntity */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class KVEntity { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) diff --git a/java-client/src/main/java/org/openapitools/client/model/MultiResponseEntity.java b/java-client/src/main/java/org/openapitools/client/model/MultiResponseEntity.java index 7b0955ab..eb57ec8a 100644 --- a/java-client/src/main/java/org/openapitools/client/model/MultiResponseEntity.java +++ b/java-client/src/main/java/org/openapitools/client/model/MultiResponseEntity.java @@ -53,7 +53,7 @@ /** * A response container holding multiple RichResponseEntity objects */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class MultiResponseEntity { public static final String SERIALIZED_NAME_CODE = "code"; @SerializedName(SERIALIZED_NAME_CODE) diff --git a/java-client/src/main/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTO.java b/java-client/src/main/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTO.java index d8c95953..9632da4a 100644 --- a/java-client/src/main/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTO.java @@ -52,7 +52,7 @@ /** * 命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class NamespaceGrayDelReleaseDTO { public static final String SERIALIZED_NAME_RELEASE_TITLE = "releaseTitle"; @SerializedName(SERIALIZED_NAME_RELEASE_TITLE) diff --git a/java-client/src/main/java/org/openapitools/client/model/NamespaceReleaseDTO.java b/java-client/src/main/java/org/openapitools/client/model/NamespaceReleaseDTO.java index 0eb25a84..689f46d3 100644 --- a/java-client/src/main/java/org/openapitools/client/model/NamespaceReleaseDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/NamespaceReleaseDTO.java @@ -50,7 +50,7 @@ /** * 命名空间发布请求数据传输对象,用于创建新的配置发布 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class NamespaceReleaseDTO { public static final String SERIALIZED_NAME_RELEASE_TITLE = "releaseTitle"; @SerializedName(SERIALIZED_NAME_RELEASE_TITLE) 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 52396909..f6e67cad 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 @@ -50,7 +50,7 @@ /** * Apollo应用信息数据传输对象,包含应用的基本信息和元数据 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class OpenAppDTO { public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenAppNamespaceDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenAppNamespaceDTO.java index 0cf9bb88..173ddecf 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenAppNamespaceDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenAppNamespaceDTO.java @@ -50,7 +50,7 @@ /** * Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class OpenAppNamespaceDTO { public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenClusterDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenClusterDTO.java index a83ad015..b2224c68 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenClusterDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenClusterDTO.java @@ -50,7 +50,7 @@ /** * Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class OpenClusterDTO { public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) 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 69a13731..190a447e 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; @@ -53,7 +53,7 @@ /** * 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class OpenCreateAppDTO { public static final String SERIALIZED_NAME_ASSIGN_APP_ROLE_TO_SELF = "assignAppRoleToSelf"; @SerializedName(SERIALIZED_NAME_ASSIGN_APP_ROLE_TO_SELF) @@ -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/OpenEnvClusterDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenEnvClusterDTO.java index 6d4b7f67..1e61738c 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenEnvClusterDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenEnvClusterDTO.java @@ -52,7 +52,7 @@ /** * OpenEnvClusterDTO */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class OpenEnvClusterDTO { public static final String SERIALIZED_NAME_ENV = "env"; @SerializedName(SERIALIZED_NAME_ENV) 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 4a8323ca..bae151e7 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 @@ -53,7 +53,7 @@ /** * OpenEnvClusterInfo */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class OpenEnvClusterInfo { public static final String SERIALIZED_NAME_ENV = "env"; @SerializedName(SERIALIZED_NAME_ENV) diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleDTO.java index d1954326..1dbf1e88 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleDTO.java @@ -53,7 +53,7 @@ /** * Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class OpenGrayReleaseRuleDTO { public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTO.java index 57500fb2..50f39cde 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTO.java @@ -52,7 +52,7 @@ /** * Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class OpenGrayReleaseRuleItemDTO { public static final String SERIALIZED_NAME_CLIENT_APP_ID = "clientAppId"; @SerializedName(SERIALIZED_NAME_CLIENT_APP_ID) diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenInstanceConfigDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenInstanceConfigDTO.java index 5ba715e5..2c302075 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenInstanceConfigDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenInstanceConfigDTO.java @@ -51,7 +51,7 @@ /** * OpenInstanceConfigDTO */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class OpenInstanceConfigDTO { public static final String SERIALIZED_NAME_RELEASE = "release"; @SerializedName(SERIALIZED_NAME_RELEASE) diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenInstanceDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenInstanceDTO.java index c12f692e..15d4b884 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenInstanceDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenInstanceDTO.java @@ -53,7 +53,7 @@ /** * OpenInstanceDTO */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class OpenInstanceDTO { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenItemChangeSets.java b/java-client/src/main/java/org/openapitools/client/model/OpenItemChangeSets.java index f5a46a3e..193a3248 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenItemChangeSets.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenItemChangeSets.java @@ -53,7 +53,7 @@ /** * OpenItemChangeSets */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class OpenItemChangeSets { public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenItemDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenItemDTO.java index de3d86cf..af227078 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenItemDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenItemDTO.java @@ -50,7 +50,7 @@ /** * Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class OpenItemDTO { public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenItemDiffs.java b/java-client/src/main/java/org/openapitools/client/model/OpenItemDiffs.java index 3d502389..d89d61be 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenItemDiffs.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenItemDiffs.java @@ -52,7 +52,7 @@ /** * OpenItemDiffs */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class OpenItemDiffs { public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceDTO.java index 0e1d5e8a..26155f80 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceDTO.java @@ -53,7 +53,7 @@ /** * Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class OpenNamespaceDTO { public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceIdentifier.java b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceIdentifier.java index 550998b0..6dd5fe5b 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceIdentifier.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceIdentifier.java @@ -50,7 +50,7 @@ /** * OpenNamespaceIdentifier */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class OpenNamespaceIdentifier { public static final String SERIALIZED_NAME_APP_ID = "appId"; @SerializedName(SERIALIZED_NAME_APP_ID) diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceLockDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceLockDTO.java index 579e1e16..30946ad7 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceLockDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceLockDTO.java @@ -50,7 +50,7 @@ /** * Apollo命名空间锁状态数据传输对象 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class OpenNamespaceLockDTO { public static final String SERIALIZED_NAME_NAMESPACE_NAME = "namespaceName"; @SerializedName(SERIALIZED_NAME_NAMESPACE_NAME) diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceSyncModel.java b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceSyncModel.java index 4b5da345..69f3b973 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceSyncModel.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceSyncModel.java @@ -54,7 +54,7 @@ /** * OpenNamespaceSyncModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class OpenNamespaceSyncModel { public static final String SERIALIZED_NAME_SYNC_TO_NAMESPACES = "syncToNamespaces"; @SerializedName(SERIALIZED_NAME_SYNC_TO_NAMESPACES) diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceTextModel.java b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceTextModel.java index 0566759c..84893aa0 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceTextModel.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceTextModel.java @@ -50,7 +50,7 @@ /** * OpenNamespaceTextModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class OpenNamespaceTextModel { public static final String SERIALIZED_NAME_APP_ID = "appId"; @SerializedName(SERIALIZED_NAME_APP_ID) diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenOrganizationDto.java b/java-client/src/main/java/org/openapitools/client/model/OpenOrganizationDto.java index 13f5045d..6e0bb521 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenOrganizationDto.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenOrganizationDto.java @@ -50,7 +50,7 @@ /** * OpenOrganizationDto */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class OpenOrganizationDto { public static final String SERIALIZED_NAME_ORG_ID = "orgId"; @SerializedName(SERIALIZED_NAME_ORG_ID) diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenPageDTOOpenInstanceDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenPageDTOOpenInstanceDTO.java index da6e7dec..4e7754c4 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenPageDTOOpenInstanceDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenPageDTOOpenInstanceDTO.java @@ -53,7 +53,7 @@ /** * 分页实例数据传输对象,用于返回分页查询的实例列表结果 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class OpenPageDTOOpenInstanceDTO { public static final String SERIALIZED_NAME_PAGE = "page"; @SerializedName(SERIALIZED_NAME_PAGE) diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenPageDTOOpenItemDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenPageDTOOpenItemDTO.java index 12af823f..5d92124b 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenPageDTOOpenItemDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenPageDTOOpenItemDTO.java @@ -53,7 +53,7 @@ /** * 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class OpenPageDTOOpenItemDTO { public static final String SERIALIZED_NAME_PAGE = "page"; @SerializedName(SERIALIZED_NAME_PAGE) diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenReleaseBO.java b/java-client/src/main/java/org/openapitools/client/model/OpenReleaseBO.java index 5fb0cdcc..b1e1e8e7 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenReleaseBO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenReleaseBO.java @@ -54,7 +54,7 @@ /** * OpenReleaseBO */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class OpenReleaseBO { public static final String SERIALIZED_NAME_BASE_INFO = "baseInfo"; @SerializedName(SERIALIZED_NAME_BASE_INFO) diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenReleaseDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenReleaseDTO.java index 7363f4c9..d754da41 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenReleaseDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenReleaseDTO.java @@ -52,7 +52,7 @@ /** * Apollo发布信息数据传输对象,表示一次配置发布的完整信息 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class OpenReleaseDTO { public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) diff --git a/java-client/src/main/java/org/openapitools/client/model/RichResponseEntity.java b/java-client/src/main/java/org/openapitools/client/model/RichResponseEntity.java index 0775597c..c2aca954 100644 --- a/java-client/src/main/java/org/openapitools/client/model/RichResponseEntity.java +++ b/java-client/src/main/java/org/openapitools/client/model/RichResponseEntity.java @@ -50,7 +50,7 @@ /** * A wrapper for a single response entity with code, message, and body */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-07T09:56:26.447+08:00[Asia/Shanghai]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T21:51:04.875+08:00[Asia/Shanghai]") public class RichResponseEntity { public static final String SERIALIZED_NAME_CODE = "code"; @SerializedName(SERIALIZED_NAME_CODE) 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 70a0cc71..906a4ac2 100644 --- a/java-client/src/test/java/org/openapitools/client/api/InstanceManagementApiTest.java +++ b/java-client/src/test/java/org/openapitools/client/api/InstanceManagementApiTest.java @@ -33,19 +33,19 @@ public class InstanceManagementApiTest { private final InstanceManagementApi api = new InstanceManagementApi(); /** - * 获取命名空间下的实例数量 (original openapi) + * 根据发布版本查询实例(支持分页) (new added) * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances + * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances * * @throws ApiException if the Api call fails */ @Test - public void getInstanceCountByNamespaceTest() throws ApiException { + public void getByReleaseTest() throws ApiException { String env = null; - String appId = null; - String clusterName = null; - String namespaceName = null; - Integer response = api.getInstanceCountByNamespace(env, appId, clusterName, namespaceName); + Integer releaseId = null; + Integer page = null; + Integer size = null; + OpenPageDTOOpenInstanceDTO response = api.getByRelease(env, releaseId, page, size); // TODO: test validations } @@ -57,30 +57,30 @@ public void getInstanceCountByNamespaceTest() throws ApiException { * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetTest() throws ApiException { + public void getByReleasesNotInTest() throws ApiException { String env = null; String appId = null; String clusterName = null; String namespaceName = null; String excludeReleases = null; - List response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(env, appId, clusterName, namespaceName, excludeReleases); + List response = api.getByReleasesNotIn(env, appId, clusterName, namespaceName, excludeReleases); // TODO: test validations } /** - * 根据发布版本查询实例(支持分页) (new added) + * 获取命名空间下的实例数量 (original openapi) * - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances * * @throws ApiException if the Api call fails */ @Test - public void openapiV1EnvsEnvReleasesReleaseIdInstancesGetTest() throws ApiException { + public void getInstanceCountByNamespaceTest() throws ApiException { String env = null; - Integer releaseId = null; - Integer page = null; - Integer size = null; - OpenPageDTOOpenInstanceDTO response = api.openapiV1EnvsEnvReleasesReleaseIdInstancesGet(env, releaseId, page, size); + String appId = null; + String clusterName = null; + String namespaceName = null; + Integer response = api.getInstanceCountByNamespace(env, appId, clusterName, namespaceName); // TODO: test validations } diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenCreateAppDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenCreateAppDTOTest.java index 1b5a0156..e2046413 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/python/README.md b/python/README.md index c0452a4e..f4777cde 100644 --- a/python/README.md +++ b/python/README.md @@ -229,9 +229,9 @@ Class | Method | HTTP request | Description *ClusterManagementApi* | [**create_cluster**](docs/apis/tags/ClusterManagementApi.md#create_cluster) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters | 创建集群 (original openapi) *ClusterManagementApi* | [**delete_cluster**](docs/apis/tags/ClusterManagementApi.md#delete_cluster) | **delete** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 删除集群 (new added) *ClusterManagementApi* | [**get_cluster**](docs/apis/tags/ClusterManagementApi.md#get_cluster) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 获取指定集群信息 (original openapi) +*InstanceManagementApi* | [**get_by_release**](docs/apis/tags/InstanceManagementApi.md#get_by_release) | **get** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) (new added) +*InstanceManagementApi* | [**get_by_releases_not_in**](docs/apis/tags/InstanceManagementApi.md#get_by_releases_not_in) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in | 查询不在指定发布版本中的实例 (new added) *InstanceManagementApi* | [**get_instance_count_by_namespace**](docs/apis/tags/InstanceManagementApi.md#get_instance_count_by_namespace) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 获取命名空间下的实例数量 (original openapi) -*InstanceManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get**](docs/apis/tags/InstanceManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int | 查询不在指定发布版本中的实例 (new added) -*InstanceManagementApi* | [**openapi_v1_envs_env_releases_release_id_instances_get**](docs/apis/tags/InstanceManagementApi.md#openapi_v1_envs_env_releases_release_id_instances_get) | **get** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) (new added) *ItemManagementApi* | [**batch_update_items_by_text**](docs/apis/tags/ItemManagementApi.md#batch_update_items_by_text) | **put** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate | 通过文本批量修改配置项 (new added) *ItemManagementApi* | [**compare_items**](docs/apis/tags/ItemManagementApi.md#compare_items) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare | 对比命名空间配置差异 (new added) *ItemManagementApi* | [**create_item**](docs/apis/tags/ItemManagementApi.md#create_item) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 创建新的配置项 (original openapi) diff --git a/python/apollo_openapi/apis/path_to_api.py b/python/apollo_openapi/apis/path_to_api.py index 1850d561..73252942 100644 --- a/python/apollo_openapi/apis/path_to_api.py +++ b/python/apollo_openapi/apis/path_to_api.py @@ -31,7 +31,7 @@ from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActive from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstances from apollo_openapi.apis.paths.openapi_v1_envs_env_releases_release_id_instances import OpenapiV1EnvsEnvReleasesReleaseIdInstances -from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotInt +from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_in import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIn from apollo_openapi.apis.paths.openapi_v1_apps_app_id_appnamespaces import OpenapiV1AppsAppIdAppnamespaces from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespaces from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceName @@ -81,7 +81,7 @@ PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_ACTIVE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActive, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstances, PathValues.OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID_INSTANCES: OpenapiV1EnvsEnvReleasesReleaseIdInstances, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_NOT_INT: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotInt, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_NOT_IN: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIn, PathValues.OPENAPI_V1_APPS_APP_ID_APPNAMESPACES: OpenapiV1AppsAppIdAppnamespaces, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespaces, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceName, @@ -132,7 +132,7 @@ PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_ACTIVE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActive, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstances, PathValues.OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID_INSTANCES: OpenapiV1EnvsEnvReleasesReleaseIdInstances, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_NOT_INT: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotInt, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_NOT_IN: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIn, PathValues.OPENAPI_V1_APPS_APP_ID_APPNAMESPACES: OpenapiV1AppsAppIdAppnamespaces, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespaces, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceName, diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int.py deleted file mode 100644 index 74a45f75..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int.get import ApiForget - - -class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotInt( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/tags/instance_management_api.py b/python/apollo_openapi/apis/tags/instance_management_api.py index c381c87c..30cf505d 100644 --- a/python/apollo_openapi/apis/tags/instance_management_api.py +++ b/python/apollo_openapi/apis/tags/instance_management_api.py @@ -9,15 +9,15 @@ Generated by: https://openapi-generator.tech """ +from apollo_openapi.paths.openapi_v1_envs_env_releases_release_id_instances.get import GetByRelease +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_in.get import GetByReleasesNotIn from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances.get import GetInstanceCountByNamespace -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int.get import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet -from apollo_openapi.paths.openapi_v1_envs_env_releases_release_id_instances.get import OpenapiV1EnvsEnvReleasesReleaseIdInstancesGet class InstanceManagementApi( + GetByRelease, + GetByReleasesNotIn, GetInstanceCountByNamespace, - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet, - OpenapiV1EnvsEnvReleasesReleaseIdInstancesGet, ): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech diff --git a/python/apollo_openapi/model/open_create_app_dto.py b/python/apollo_openapi/model/open_create_app_dto.py index 97b1ef15..7239270b 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/paths/__init__.py b/python/apollo_openapi/paths/__init__.py index 57366bec..e441c486 100644 --- a/python/apollo_openapi/paths/__init__.py +++ b/python/apollo_openapi/paths/__init__.py @@ -36,7 +36,7 @@ class PathValues(str, enum.Enum): OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_ACTIVE = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active" OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances" OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID_INSTANCES = "/openapi/v1/envs/{env}/releases/{releaseId}/instances" - OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_NOT_INT = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int" + OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_NOT_IN = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in" OPENAPI_V1_APPS_APP_ID_APPNAMESPACES = "/openapi/v1/apps/{appId}/appnamespaces" OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces" OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}" diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/__init__.py deleted file mode 100644 index d2052f61..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_NOT_INT diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/get.py deleted file mode 100644 index 7c93e90b..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/get.py +++ /dev/null @@ -1,401 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from apollo_openapi import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from apollo_openapi import schemas # noqa: F401 - -from apollo_openapi.model.open_instance_dto import OpenInstanceDTO - -from . import path - -# Query params -ExcludeReleasesSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'excludeReleases': typing.Union[ExcludeReleasesSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_exclude_releases = api_client.QueryParameter( - name="excludeReleases", - style=api_client.ParameterStyle.FORM, - schema=ExcludeReleasesSchema, - explode=True, -) -# Path params -EnvSchema = schemas.StrSchema -AppIdSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -NamespaceNameSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'env': typing.Union[EnvSchema, str, ], - 'appId': typing.Union[AppIdSchema, str, ], - 'clusterName': typing.Union[ClusterNameSchema, str, ], - 'namespaceName': typing.Union[NamespaceNameSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_env = api_client.PathParameter( - name="env", - style=api_client.ParameterStyle.SIMPLE, - schema=EnvSchema, - required=True, -) -request_path_app_id = api_client.PathParameter( - name="appId", - style=api_client.ParameterStyle.SIMPLE, - schema=AppIdSchema, - required=True, -) -request_path_cluster_name = api_client.PathParameter( - name="clusterName", - style=api_client.ParameterStyle.SIMPLE, - schema=ClusterNameSchema, - required=True, -) -request_path_namespace_name = api_client.PathParameter( - name="namespaceName", - style=api_client.ParameterStyle.SIMPLE, - schema=NamespaceNameSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenInstanceDTO']: - return OpenInstanceDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenInstanceDTO'], typing.List['OpenInstanceDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenInstanceDTO': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 查询不在指定发布版本中的实例 (new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_env, - request_path_app_id, - request_path_cluster_name, - request_path_namespace_name, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_exclude_releases, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/get.pyi deleted file mode 100644 index cc2a38c6..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/get.pyi +++ /dev/null @@ -1,393 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from apollo_openapi import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from apollo_openapi import schemas # noqa: F401 - -from apollo_openapi.model.open_instance_dto import OpenInstanceDTO - -# Query params -ExcludeReleasesSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'excludeReleases': typing.Union[ExcludeReleasesSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_exclude_releases = api_client.QueryParameter( - name="excludeReleases", - style=api_client.ParameterStyle.FORM, - schema=ExcludeReleasesSchema, - explode=True, -) -# Path params -EnvSchema = schemas.StrSchema -AppIdSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -NamespaceNameSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'env': typing.Union[EnvSchema, str, ], - 'appId': typing.Union[AppIdSchema, str, ], - 'clusterName': typing.Union[ClusterNameSchema, str, ], - 'namespaceName': typing.Union[NamespaceNameSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_env = api_client.PathParameter( - name="env", - style=api_client.ParameterStyle.SIMPLE, - schema=EnvSchema, - required=True, -) -request_path_app_id = api_client.PathParameter( - name="appId", - style=api_client.ParameterStyle.SIMPLE, - schema=AppIdSchema, - required=True, -) -request_path_cluster_name = api_client.PathParameter( - name="clusterName", - style=api_client.ParameterStyle.SIMPLE, - schema=ClusterNameSchema, - required=True, -) -request_path_namespace_name = api_client.PathParameter( - name="namespaceName", - style=api_client.ParameterStyle.SIMPLE, - schema=NamespaceNameSchema, - required=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenInstanceDTO']: - return OpenInstanceDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenInstanceDTO'], typing.List['OpenInstanceDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenInstanceDTO': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 查询不在指定发布版本中的实例 (new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_env, - request_path_app_id, - request_path_cluster_name, - request_path_namespace_name, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_exclude_releases, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.py index 8d563059..421e98cb 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.py @@ -131,7 +131,7 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): @typing.overload - def _openapi_v1_envs_env_releases_release_id_instances_get_oapg( + def _get_by_release_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -144,7 +144,7 @@ def _openapi_v1_envs_env_releases_release_id_instances_get_oapg( ]: ... @typing.overload - def _openapi_v1_envs_env_releases_release_id_instances_get_oapg( + def _get_by_release_oapg( self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), @@ -155,7 +155,7 @@ def _openapi_v1_envs_env_releases_release_id_instances_get_oapg( ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def _openapi_v1_envs_env_releases_release_id_instances_get_oapg( + def _get_by_release_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -168,7 +168,7 @@ def _openapi_v1_envs_env_releases_release_id_instances_get_oapg( api_client.ApiResponseWithoutDeserialization, ]: ... - def _openapi_v1_envs_env_releases_release_id_instances_get_oapg( + def _get_by_release_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -249,11 +249,11 @@ class instances return api_response -class OpenapiV1EnvsEnvReleasesReleaseIdInstancesGet(BaseApi): +class GetByRelease(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload - def openapi_v1_envs_env_releases_release_id_instances_get( + def get_by_release( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -266,7 +266,7 @@ def openapi_v1_envs_env_releases_release_id_instances_get( ]: ... @typing.overload - def openapi_v1_envs_env_releases_release_id_instances_get( + def get_by_release( self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), @@ -277,7 +277,7 @@ def openapi_v1_envs_env_releases_release_id_instances_get( ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def openapi_v1_envs_env_releases_release_id_instances_get( + def get_by_release( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -290,7 +290,7 @@ def openapi_v1_envs_env_releases_release_id_instances_get( api_client.ApiResponseWithoutDeserialization, ]: ... - def openapi_v1_envs_env_releases_release_id_instances_get( + def get_by_release( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -299,7 +299,7 @@ def openapi_v1_envs_env_releases_release_id_instances_get( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._openapi_v1_envs_env_releases_release_id_instances_get_oapg( + return self._get_by_release_oapg( query_params=query_params, path_params=path_params, accept_content_types=accept_content_types, @@ -359,7 +359,7 @@ def get( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._openapi_v1_envs_env_releases_release_id_instances_get_oapg( + return self._get_by_release_oapg( query_params=query_params, path_params=path_params, accept_content_types=accept_content_types, diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.pyi index 350b2f73..692c88df 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.pyi @@ -123,7 +123,7 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): @typing.overload - def _openapi_v1_envs_env_releases_release_id_instances_get_oapg( + def _get_by_release_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -136,7 +136,7 @@ class BaseApi(api_client.Api): ]: ... @typing.overload - def _openapi_v1_envs_env_releases_release_id_instances_get_oapg( + def _get_by_release_oapg( self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), @@ -147,7 +147,7 @@ class BaseApi(api_client.Api): ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def _openapi_v1_envs_env_releases_release_id_instances_get_oapg( + def _get_by_release_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -160,7 +160,7 @@ class BaseApi(api_client.Api): api_client.ApiResponseWithoutDeserialization, ]: ... - def _openapi_v1_envs_env_releases_release_id_instances_get_oapg( + def _get_by_release_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -241,11 +241,11 @@ class BaseApi(api_client.Api): return api_response -class OpenapiV1EnvsEnvReleasesReleaseIdInstancesGet(BaseApi): +class GetByRelease(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload - def openapi_v1_envs_env_releases_release_id_instances_get( + def get_by_release( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -258,7 +258,7 @@ class OpenapiV1EnvsEnvReleasesReleaseIdInstancesGet(BaseApi): ]: ... @typing.overload - def openapi_v1_envs_env_releases_release_id_instances_get( + def get_by_release( self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), @@ -269,7 +269,7 @@ class OpenapiV1EnvsEnvReleasesReleaseIdInstancesGet(BaseApi): ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def openapi_v1_envs_env_releases_release_id_instances_get( + def get_by_release( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -282,7 +282,7 @@ class OpenapiV1EnvsEnvReleasesReleaseIdInstancesGet(BaseApi): api_client.ApiResponseWithoutDeserialization, ]: ... - def openapi_v1_envs_env_releases_release_id_instances_get( + def get_by_release( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -291,7 +291,7 @@ class OpenapiV1EnvsEnvReleasesReleaseIdInstancesGet(BaseApi): timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._openapi_v1_envs_env_releases_release_id_instances_get_oapg( + return self._get_by_release_oapg( query_params=query_params, path_params=path_params, accept_content_types=accept_content_types, @@ -351,7 +351,7 @@ class ApiForget(BaseApi): timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._openapi_v1_envs_env_releases_release_id_instances_get_oapg( + return self._get_by_release_oapg( query_params=query_params, path_params=path_params, accept_content_types=accept_content_types, diff --git a/python/docs/apis/tags/InstanceManagementApi.md b/python/docs/apis/tags/InstanceManagementApi.md index 797c1f78..02cc397f 100644 --- a/python/docs/apis/tags/InstanceManagementApi.md +++ b/python/docs/apis/tags/InstanceManagementApi.md @@ -5,17 +5,17 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- +[**get_by_release**](#get_by_release) | **get** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) (new added) +[**get_by_releases_not_in**](#get_by_releases_not_in) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in | 查询不在指定发布版本中的实例 (new added) [**get_instance_count_by_namespace**](#get_instance_count_by_namespace) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 获取命名空间下的实例数量 (original openapi) -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get**](#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int | 查询不在指定发布版本中的实例 (new added) -[**openapi_v1_envs_env_releases_release_id_instances_get**](#openapi_v1_envs_env_releases_release_id_instances_get) | **get** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) (new added) -# **get_instance_count_by_namespace** - -> int get_instance_count_by_namespace(envapp_idcluster_namenamespace_name) +# **get_by_release** + +> OpenPageDTOOpenInstanceDTO get_by_release(envrelease_idpagesize) -获取命名空间下的实例数量 (original openapi) +根据发布版本查询实例(支持分页) (new added) -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances +GET /openapi/v1/envs/{env}/releases/{releaseId}/instances ### Example @@ -23,6 +23,7 @@ GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{names ```python import apollo_openapi from apollo_openapi.apis.tags import instance_management_api +from apollo_openapi.model.open_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO from pprint import pprint # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. @@ -48,75 +49,86 @@ with apollo_openapi.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set path_params = { 'env': "env_example", - 'appId': "appId_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", + 'releaseId': 1, + } + query_params = { + 'page': 0, + 'size': 20, } try: - # 获取命名空间下的实例数量 (original openapi) - api_response = api_instance.get_instance_count_by_namespace( + # 根据发布版本查询实例(支持分页) (new added) + api_response = api_instance.get_by_release( path_params=path_params, + query_params=query_params, ) pprint(api_response) except apollo_openapi.ApiException as e: - print("Exception when calling InstanceManagementApi->get_instance_count_by_namespace: %s\n" % e) + print("Exception when calling InstanceManagementApi->get_by_release: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | path_params | RequestPathParams | | accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### path_params -#### RequestPathParams +### query_params +#### RequestQueryParams Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -env | EnvSchema | | -appId | AppIdSchema | | -clusterName | ClusterNameSchema | | -namespaceName | NamespaceNameSchema | | +page | PageSchema | | +size | SizeSchema | | -# EnvSchema + +# PageSchema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- -str, | str, | | +decimal.Decimal, int, | decimal.Decimal, | | -# AppIdSchema +# SizeSchema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- -str, | str, | | +decimal.Decimal, int, | decimal.Decimal, | | -# ClusterNameSchema +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +env | EnvSchema | | +releaseId | ReleaseIdSchema | | + +# EnvSchema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# NamespaceNameSchema +# ReleaseIdSchema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- -str, | str, | | +decimal.Decimal, int, | decimal.Decimal, | | ### Return Types, Responses Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_instance_count_by_namespace.ApiResponseFor200) | 成功返回实例数量 +200 | [ApiResponseFor200](#get_by_release.ApiResponseFor200) | -#### get_instance_count_by_namespace.ApiResponseFor200 +#### get_by_release.ApiResponseFor200 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -124,11 +136,10 @@ body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenPageDTOOpenInstanceDTO**](../../models/OpenPageDTOOpenInstanceDTO.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | ### Authorization @@ -136,9 +147,9 @@ decimal.Decimal, int, | decimal.Decimal, | | [[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get** - -> [OpenInstanceDTO] openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get(envapp_idcluster_namenamespace_name) +# **get_by_releases_not_in** + +> [OpenInstanceDTO] get_by_releases_not_in(envapp_idcluster_namenamespace_name) 查询不在指定发布版本中的实例 (new added) @@ -184,13 +195,13 @@ with apollo_openapi.ApiClient(configuration) as api_client: } try: # 查询不在指定发布版本中的实例 (new added) - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get( + api_response = api_instance.get_by_releases_not_in( path_params=path_params, query_params=query_params, ) pprint(api_response) except apollo_openapi.ApiException as e: - print("Exception when calling InstanceManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get: %s\n" % e) + print("Exception when calling InstanceManagementApi->get_by_releases_not_in: %s\n" % e) # example passing only optional values path_params = { @@ -204,13 +215,13 @@ with apollo_openapi.ApiClient(configuration) as api_client: } try: # 查询不在指定发布版本中的实例 (new added) - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get( + api_response = api_instance.get_by_releases_not_in( path_params=path_params, query_params=query_params, ) pprint(api_response) except apollo_openapi.ApiException as e: - print("Exception when calling InstanceManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get: %s\n" % e) + print("Exception when calling InstanceManagementApi->get_by_releases_not_in: %s\n" % e) ``` ### Parameters @@ -281,9 +292,9 @@ str, | str, | | Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get.ApiResponseFor200) | +200 | [ApiResponseFor200](#get_by_releases_not_in.ApiResponseFor200) | -#### openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get.ApiResponseFor200 +#### get_by_releases_not_in.ApiResponseFor200 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -308,13 +319,13 @@ Class Name | Input Type | Accessed Type | Description | Notes [[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) -# **openapi_v1_envs_env_releases_release_id_instances_get** - -> OpenPageDTOOpenInstanceDTO openapi_v1_envs_env_releases_release_id_instances_get(envrelease_idpagesize) +# **get_instance_count_by_namespace** + +> int get_instance_count_by_namespace(envapp_idcluster_namenamespace_name) -根据发布版本查询实例(支持分页) (new added) +获取命名空间下的实例数量 (original openapi) -GET /openapi/v1/envs/{env}/releases/{releaseId}/instances +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances ### Example @@ -322,7 +333,6 @@ GET /openapi/v1/envs/{env}/releases/{releaseId}/instances ```python import apollo_openapi from apollo_openapi.apis.tags import instance_management_api -from apollo_openapi.model.open_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO from pprint import pprint # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. @@ -348,86 +358,75 @@ with apollo_openapi.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set path_params = { 'env': "env_example", - 'releaseId': 1, - } - query_params = { - 'page': 0, - 'size': 20, + 'appId': "appId_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", } try: - # 根据发布版本查询实例(支持分页) (new added) - api_response = api_instance.openapi_v1_envs_env_releases_release_id_instances_get( + # 获取命名空间下的实例数量 (original openapi) + api_response = api_instance.get_instance_count_by_namespace( path_params=path_params, - query_params=query_params, ) pprint(api_response) except apollo_openapi.ApiException as e: - print("Exception when calling InstanceManagementApi->openapi_v1_envs_env_releases_release_id_instances_get: %s\n" % e) + print("Exception when calling InstanceManagementApi->get_instance_count_by_namespace: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | path_params | RequestPathParams | | accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### query_params -#### RequestQueryParams +### path_params +#### RequestPathParams Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -page | PageSchema | | -size | SizeSchema | | - +env | EnvSchema | | +appId | AppIdSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | -# PageSchema +# EnvSchema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | +str, | str, | | -# SizeSchema +# AppIdSchema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -env | EnvSchema | | -releaseId | ReleaseIdSchema | | +str, | str, | | -# EnvSchema +# ClusterNameSchema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# ReleaseIdSchema +# NamespaceNameSchema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | +str, | str, | | ### Return Types, Responses Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#openapi_v1_envs_env_releases_release_id_instances_get.ApiResponseFor200) | +200 | [ApiResponseFor200](#get_instance_count_by_namespace.ApiResponseFor200) | 成功返回实例数量 -#### openapi_v1_envs_env_releases_release_id_instances_get.ApiResponseFor200 +#### get_instance_count_by_namespace.ApiResponseFor200 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -435,10 +434,11 @@ body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OpenPageDTOOpenInstanceDTO**](../../models/OpenPageDTOOpenInstanceDTO.md) | | +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | ### Authorization diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/test_get.py deleted file mode 100644 index c1b19009..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import apollo_openapi -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotInt(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotInt unit test stubs - 查询不在指定发布版本中的实例 (new added) # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApi.java index 1b1f7b9a..4f7f6a31 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 @@ -32,7 +32,7 @@ import java.util.Map; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") @Validated @Tag(name = "App Management", description = "应用管理相关接口,包括应用的创建、查询、更新、删除等操作") public interface AppManagementApi { 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 9376963b..0c98a7e4 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 @@ -29,7 +29,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") @Controller @RequestMapping("${openapi.apolloOpen.base-path:}") public class AppManagementApiController implements AppManagementApi { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApiDelegate.java index 6a3b1b57..9be7ac85 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 @@ -20,7 +20,7 @@ * A delegate to be called by the {@link AppManagementApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public interface AppManagementApiDelegate { default Optional getRequest() { 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 d664f53b..01669b59 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 @@ -29,7 +29,7 @@ import java.util.Map; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") @Validated @Tag(name = "Cluster Management", description = "集群管理相关接口,包括集群的创建、查询、删除等操作") public interface ClusterManagementApi { 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 a3336957..2af657e6 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 @@ -26,7 +26,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") @Controller @RequestMapping("${openapi.apolloOpen.base-path:}") public class ClusterManagementApiController implements ClusterManagementApi { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApiDelegate.java index dc5da6c0..be0f2864 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 @@ -17,7 +17,7 @@ * A delegate to be called by the {@link ClusterManagementApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public interface ClusterManagementApiDelegate { default Optional getRequest() { 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 1ee4efcc..c106e75c 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 @@ -29,7 +29,7 @@ import java.util.Map; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") @Validated @Tag(name = "Instance Management", description = "实例管理相关接口,包括实例查询、配置生效状态等功能") public interface InstanceManagementApi { @@ -39,23 +39,23 @@ default InstanceManagementApiDelegate getDelegate() { } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances : 获取命名空间下的实例数量 (original openapi) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances + * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances : 根据发布版本查询实例(支持分页) (new added) + * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances * * @param env (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @return 成功返回实例数量 (status code 200) + * @param releaseId (required) + * @param page (required) + * @param size (required) + * @return (status code 200) */ @Operation( - operationId = "getInstanceCountByNamespace", - summary = "获取命名空间下的实例数量 (original openapi)", - description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances", + operationId = "getByRelease", + summary = "根据发布版本查询实例(支持分页) (new added)", + description = "GET /openapi/v1/envs/{env}/releases/{releaseId}/instances", tags = { "Instance Management" }, responses = { - @ApiResponse(responseCode = "200", description = "成功返回实例数量", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Integer.class)) + @ApiResponse(responseCode = "200", description = "", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenPageDTOOpenInstanceDTO.class)) }) }, security = { @@ -64,21 +64,21 @@ default InstanceManagementApiDelegate getDelegate() { ) @RequestMapping( method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances", + value = "/openapi/v1/envs/{env}/releases/{releaseId}/instances", produces = { "application/json" } ) - default ResponseEntity getInstanceCountByNamespace( + default ResponseEntity getByRelease( @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName + @Parameter(name = "releaseId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("releaseId") Integer releaseId, + @NotNull @Parameter(name = "page", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = true) Integer page, + @NotNull @Parameter(name = "size", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = true) Integer size ) { - return getDelegate().getInstanceCountByNamespace(env, appId, clusterName, namespaceName); + return getDelegate().getByRelease(env, releaseId, page, size); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int : 查询不在指定发布版本中的实例 (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in : 查询不在指定发布版本中的实例 (new added) * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 * * @param env 环境标识 (required) @@ -89,7 +89,7 @@ default ResponseEntity getInstanceCountByNamespace( * @return (status code 200) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet", + operationId = "getByReleasesNotIn", summary = "查询不在指定发布版本中的实例 (new added)", description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3", tags = { "Instance Management" }, @@ -104,38 +104,38 @@ default ResponseEntity getInstanceCountByNamespace( ) @RequestMapping( method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int", + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in", produces = { "application/json" } ) - default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet( + default ResponseEntity> getByReleasesNotIn( @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, @Parameter(name = "excludeReleases", description = "排除的发布ID列表,用逗号分隔", in = ParameterIn.QUERY) @Valid @RequestParam(value = "excludeReleases", required = false) String excludeReleases ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(env, appId, clusterName, namespaceName, excludeReleases); + return getDelegate().getByReleasesNotIn(env, appId, clusterName, namespaceName, excludeReleases); } /** - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances : 根据发布版本查询实例(支持分页) (new added) - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances : 获取命名空间下的实例数量 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances * * @param env (required) - * @param releaseId (required) - * @param page (required) - * @param size (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @return 成功返回实例数量 (status code 200) */ @Operation( - operationId = "openapiV1EnvsEnvReleasesReleaseIdInstancesGet", - summary = "根据发布版本查询实例(支持分页) (new added)", - description = "GET /openapi/v1/envs/{env}/releases/{releaseId}/instances", + operationId = "getInstanceCountByNamespace", + summary = "获取命名空间下的实例数量 (original openapi)", + description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances", tags = { "Instance Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenPageDTOOpenInstanceDTO.class)) + @ApiResponse(responseCode = "200", description = "成功返回实例数量", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Integer.class)) }) }, security = { @@ -144,16 +144,16 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersC ) @RequestMapping( method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/releases/{releaseId}/instances", + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances", produces = { "application/json" } ) - default ResponseEntity openapiV1EnvsEnvReleasesReleaseIdInstancesGet( + default ResponseEntity getInstanceCountByNamespace( @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "releaseId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("releaseId") Integer releaseId, - @NotNull @Parameter(name = "page", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = true) Integer page, - @NotNull @Parameter(name = "size", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = true) Integer size + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName ) { - return getDelegate().openapiV1EnvsEnvReleasesReleaseIdInstancesGet(env, releaseId, page, size); + return getDelegate().getInstanceCountByNamespace(env, appId, clusterName, namespaceName); } } diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApiController.java index 479b10a7..c2cc0145 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 @@ -26,7 +26,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") @Controller @RequestMapping("${openapi.apolloOpen.base-path:}") public class InstanceManagementApiController implements InstanceManagementApi { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApiDelegate.java index c856fbce..83af210e 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 @@ -17,7 +17,7 @@ * A delegate to be called by the {@link InstanceManagementApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public interface InstanceManagementApiDelegate { default Optional getRequest() { @@ -25,26 +25,35 @@ default Optional getRequest() { } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances : 获取命名空间下的实例数量 (original openapi) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances + * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances : 根据发布版本查询实例(支持分页) (new added) + * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances * * @param env (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @return 成功返回实例数量 (status code 200) - * @see InstanceManagementApi#getInstanceCountByNamespace + * @param releaseId (required) + * @param page (required) + * @param size (required) + * @return (status code 200) + * @see InstanceManagementApi#getByRelease */ - default ResponseEntity getInstanceCountByNamespace(String env, - String appId, - String clusterName, - String namespaceName) { + default ResponseEntity getByRelease(String env, + Integer releaseId, + Integer page, + Integer size) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"total\" : 1, \"size\" : 6, \"page\" : 0, \"content\" : [ { \"configs\" : [ { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 }, { \"configs\" : [ { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 } ] }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int : 查询不在指定发布版本中的实例 (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in : 查询不在指定发布版本中的实例 (new added) * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 * * @param env 环境标识 (required) @@ -53,9 +62,9 @@ default ResponseEntity getInstanceCountByNamespace(String env, * @param namespaceName 命名空间名称 (required) * @param excludeReleases 排除的发布ID列表,用逗号分隔 (optional) * @return (status code 200) - * @see InstanceManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet + * @see InstanceManagementApi#getByReleasesNotIn */ - default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(String env, + default ResponseEntity> getByReleasesNotIn(String env, String appId, String clusterName, String namespaceName, @@ -74,29 +83,20 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersC } /** - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances : 根据发布版本查询实例(支持分页) (new added) - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances : 获取命名空间下的实例数量 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances * * @param env (required) - * @param releaseId (required) - * @param page (required) - * @param size (required) - * @return (status code 200) - * @see InstanceManagementApi#openapiV1EnvsEnvReleasesReleaseIdInstancesGet + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @return 成功返回实例数量 (status code 200) + * @see InstanceManagementApi#getInstanceCountByNamespace */ - default ResponseEntity openapiV1EnvsEnvReleasesReleaseIdInstancesGet(String env, - Integer releaseId, - Integer page, - Integer size) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"total\" : 1, \"size\" : 6, \"page\" : 0, \"content\" : [ { \"configs\" : [ { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 }, { \"configs\" : [ { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 } ] }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); + default ResponseEntity getInstanceCountByNamespace(String env, + String appId, + String clusterName, + String namespaceName) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApi.java index 147ffef3..fc9305f0 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 @@ -33,7 +33,7 @@ import java.util.Map; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") @Validated @Tag(name = "Item Management", description = "配置项管理相关接口,包括配置的增删改查、批量操作、同步等功能") public interface ItemManagementApi { 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 d47dd5b2..4724ae5d 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 @@ -30,7 +30,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") @Controller @RequestMapping("${openapi.apolloOpen.base-path:}") public class ItemManagementApiController implements ItemManagementApi { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApiDelegate.java index 28379ae8..9a9e3951 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 @@ -21,7 +21,7 @@ * A delegate to be called by the {@link ItemManagementApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public interface ItemManagementApiDelegate { default Optional getRequest() { 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 ac043e6f..16df5485 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 @@ -32,7 +32,7 @@ import java.util.Map; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") @Validated @Tag(name = "Namespace Branch Management", description = "the Namespace Branch Management API") public interface NamespaceBranchManagementApi { 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 996e2b81..c96294c8 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 @@ -29,7 +29,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") @Controller @RequestMapping("${openapi.apolloOpen.base-path:}") public class NamespaceBranchManagementApiController implements NamespaceBranchManagementApi { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApiDelegate.java index 3583b6bd..e18fb35c 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 @@ -20,7 +20,7 @@ * A delegate to be called by the {@link NamespaceBranchManagementApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public interface NamespaceBranchManagementApiDelegate { default Optional getRequest() { 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 a50c5c62..61fcaf51 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 @@ -31,7 +31,7 @@ import java.util.Map; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") @Validated @Tag(name = "Namespace Management", description = "命名空间管理相关接口,包括命名空间的创建、查询、配置等操作") public interface NamespaceManagementApi { 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 e0d2fe77..c2734d85 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 @@ -28,7 +28,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") @Controller @RequestMapping("${openapi.apolloOpen.base-path:}") public class NamespaceManagementApiController implements NamespaceManagementApi { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApiDelegate.java index 14c8ad8e..acdb2cc1 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 @@ -19,7 +19,7 @@ * A delegate to be called by the {@link NamespaceManagementApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public interface NamespaceManagementApiDelegate { default Optional getRequest() { 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 b077eac9..f22923a2 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 @@ -29,7 +29,7 @@ import java.util.Map; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") @Validated @Tag(name = "Organization Management", description = "组织管理相关接口,包括组织信息查询等功能") public interface OrganizationManagementApi { 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 eb3b05f4..25139350 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 @@ -26,7 +26,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") @Controller @RequestMapping("${openapi.apolloOpen.base-path:}") public class OrganizationManagementApiController implements OrganizationManagementApi { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApiDelegate.java index c4cf161d..626b7b8c 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 @@ -17,7 +17,7 @@ * A delegate to be called by the {@link OrganizationManagementApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public interface OrganizationManagementApiDelegate { default Optional getRequest() { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApi.java index 84e0bade..b7d85af4 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 @@ -32,7 +32,7 @@ import java.util.Map; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") @Validated @Tag(name = "Release Management", description = "发布管理相关接口,包括配置发布、发布历史、灰度发布等功能") public interface ReleaseManagementApi { 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 52820b21..d29d87f2 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 @@ -29,7 +29,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") @Controller @RequestMapping("${openapi.apolloOpen.base-path:}") public class ReleaseManagementApiController implements ReleaseManagementApi { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiDelegate.java index 669f4450..7558f6c3 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 @@ -20,7 +20,7 @@ * A delegate to be called by the {@link ReleaseManagementApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public interface ReleaseManagementApiDelegate { default Optional getRequest() { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/KVEntity.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/KVEntity.java index 48ee7601..3457150b 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/KVEntity.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/KVEntity.java @@ -18,7 +18,7 @@ * KVEntity */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public class KVEntity { private String key; diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/MultiResponseEntity.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/MultiResponseEntity.java index f76b3d2f..6346f85f 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/MultiResponseEntity.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/MultiResponseEntity.java @@ -22,7 +22,7 @@ */ @Schema(name = "MultiResponseEntity", description = "A response container holding multiple RichResponseEntity objects") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public class MultiResponseEntity { private Integer code; diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceGrayDelReleaseDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceGrayDelReleaseDTO.java index 002554c5..6ceb16bc 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceGrayDelReleaseDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceGrayDelReleaseDTO.java @@ -21,7 +21,7 @@ */ @Schema(name = "NamespaceGrayDelReleaseDTO", description = "命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public class NamespaceGrayDelReleaseDTO { private String releaseTitle; diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceReleaseDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceReleaseDTO.java index bf73645f..2a0fc617 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceReleaseDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceReleaseDTO.java @@ -19,7 +19,7 @@ */ @Schema(name = "NamespaceReleaseDTO", description = "命名空间发布请求数据传输对象,用于创建新的配置发布") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public class NamespaceReleaseDTO { private String releaseTitle; 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 95e89405..f80f6c5d 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 @@ -19,7 +19,7 @@ */ @Schema(name = "OpenAppDTO", description = "Apollo应用信息数据传输对象,包含应用的基本信息和元数据") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public class OpenAppDTO { private String dataChangeCreatedBy; diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppNamespaceDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppNamespaceDTO.java index 57ebe2a7..1fefdc21 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppNamespaceDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppNamespaceDTO.java @@ -19,7 +19,7 @@ */ @Schema(name = "OpenAppNamespaceDTO", description = "Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public class OpenAppNamespaceDTO { private String dataChangeCreatedBy; diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenClusterDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenClusterDTO.java index b3a3330e..a9806ed4 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenClusterDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenClusterDTO.java @@ -19,7 +19,7 @@ */ @Schema(name = "OpenClusterDTO", description = "Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public class OpenClusterDTO { private String dataChangeCreatedBy; 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 7d566dd8..ad177fb1 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; @@ -22,13 +23,13 @@ */ @Schema(name = "OpenCreateAppDTO", description = "创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") 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/OpenEnvClusterDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvClusterDTO.java index 8bd091e6..6d524c2f 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvClusterDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvClusterDTO.java @@ -20,7 +20,7 @@ * OpenEnvClusterDTO */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public class OpenEnvClusterDTO { private String env; 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 76882271..39046fb8 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 @@ -21,7 +21,7 @@ * OpenEnvClusterInfo */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public class OpenEnvClusterInfo { private String env; diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleDTO.java index e0c1ee19..ba108896 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleDTO.java @@ -22,7 +22,7 @@ */ @Schema(name = "OpenGrayReleaseRuleDTO", description = "Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public class OpenGrayReleaseRuleDTO { private String dataChangeCreatedBy; diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleItemDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleItemDTO.java index 8d49b0b9..2e1f0b55 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleItemDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleItemDTO.java @@ -21,7 +21,7 @@ */ @Schema(name = "OpenGrayReleaseRuleItemDTO", description = "Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public class OpenGrayReleaseRuleItemDTO { private String clientAppId; diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstanceConfigDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstanceConfigDTO.java index 7b2e3c47..7db22be6 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstanceConfigDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstanceConfigDTO.java @@ -19,7 +19,7 @@ * OpenInstanceConfigDTO */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public class OpenInstanceConfigDTO { private OpenReleaseDTO release; diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstanceDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstanceDTO.java index 19bca9a0..d468e351 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstanceDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstanceDTO.java @@ -21,7 +21,7 @@ * OpenInstanceDTO */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public class OpenInstanceDTO { private Long id; diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemChangeSets.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemChangeSets.java index 87bec2f2..66f0f426 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemChangeSets.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemChangeSets.java @@ -21,7 +21,7 @@ * OpenItemChangeSets */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public class OpenItemChangeSets { private String dataChangeCreatedBy; diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDTO.java index 8e6b2720..5166bd4b 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDTO.java @@ -19,7 +19,7 @@ */ @Schema(name = "OpenItemDTO", description = "Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public class OpenItemDTO { private String dataChangeCreatedBy; diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDiffs.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDiffs.java index e5f98e51..21fae488 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDiffs.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDiffs.java @@ -20,7 +20,7 @@ * OpenItemDiffs */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public class OpenItemDiffs { private OpenNamespaceIdentifier namespace; diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceDTO.java index d9edef01..65f6bfe2 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceDTO.java @@ -22,7 +22,7 @@ */ @Schema(name = "OpenNamespaceDTO", description = "Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public class OpenNamespaceDTO { private String dataChangeCreatedBy; diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceIdentifier.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceIdentifier.java index 94502b4c..f432a0b0 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceIdentifier.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceIdentifier.java @@ -18,7 +18,7 @@ * OpenNamespaceIdentifier */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public class OpenNamespaceIdentifier { private String appId; diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceLockDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceLockDTO.java index c94bac89..b6e84bbd 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceLockDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceLockDTO.java @@ -19,7 +19,7 @@ */ @Schema(name = "OpenNamespaceLockDTO", description = "Apollo命名空间锁状态数据传输对象") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public class OpenNamespaceLockDTO { private String namespaceName; diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceSyncModel.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceSyncModel.java index 0ba3c7d0..414e61c9 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceSyncModel.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceSyncModel.java @@ -22,7 +22,7 @@ * OpenNamespaceSyncModel */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public class OpenNamespaceSyncModel { @Valid diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceTextModel.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceTextModel.java index a6c923c3..48736a9d 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceTextModel.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceTextModel.java @@ -18,7 +18,7 @@ * OpenNamespaceTextModel */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public class OpenNamespaceTextModel { private String appId; diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenOrganizationDto.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenOrganizationDto.java index 084d9035..cd5c03fe 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenOrganizationDto.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenOrganizationDto.java @@ -18,7 +18,7 @@ * OpenOrganizationDto */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public class OpenOrganizationDto { private String orgId; diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenInstanceDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenInstanceDTO.java index 8421d5a1..dd6e1f65 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenInstanceDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenInstanceDTO.java @@ -22,7 +22,7 @@ */ @Schema(name = "OpenPageDTOOpenInstanceDTO", description = "分页实例数据传输对象,用于返回分页查询的实例列表结果") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public class OpenPageDTOOpenInstanceDTO { private Integer page; diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenItemDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenItemDTO.java index eb3f58b6..735ac5c6 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenItemDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenItemDTO.java @@ -22,7 +22,7 @@ */ @Schema(name = "OpenPageDTOOpenItemDTO", description = "分页配置项数据传输对象,用于返回分页查询的配置项列表结果") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public class OpenPageDTOOpenItemDTO { private Integer page; diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseBO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseBO.java index c9644d0f..af8abdc1 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseBO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseBO.java @@ -22,7 +22,7 @@ * OpenReleaseBO */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public class OpenReleaseBO { private OpenReleaseDTO baseInfo; diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseDTO.java index 28fa0bfa..3eb17320 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseDTO.java @@ -21,7 +21,7 @@ */ @Schema(name = "OpenReleaseDTO", description = "Apollo发布信息数据传输对象,表示一次配置发布的完整信息") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public class OpenReleaseDTO { private String dataChangeCreatedBy; diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/RichResponseEntity.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/RichResponseEntity.java index ff1497c5..b50fe36b 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/RichResponseEntity.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/RichResponseEntity.java @@ -19,7 +19,7 @@ */ @Schema(name = "RichResponseEntity", description = "A wrapper for a single response entity with code, message, and body") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-07T09:56:27.881+08:00[Asia/Shanghai]") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-10-19T21:51:06.429+08:00[Asia/Shanghai]") public class RichResponseEntity { private Integer code; diff --git a/spring-boot2/src/main/resources/openapi.yaml b/spring-boot2/src/main/resources/openapi.yaml index 3dd6d6b6..0314282f 100644 --- a/spring-boot2/src/main/resources/openapi.yaml +++ b/spring-boot2/src/main/resources/openapi.yaml @@ -2756,6 +2756,7 @@ paths: get: deprecated: false description: "GET /openapi/v1/envs/{env}/releases/{releaseId}/instances" + operationId: getByRelease parameters: - description: "" explode: false @@ -2832,10 +2833,11 @@ paths: x-accepts: application/json x-tags: - tag: Instance Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in: get: deprecated: false description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3" + operationId: getByReleasesNotIn parameters: - description: 环境标识 explode: false @@ -4233,6 +4235,7 @@ components: items: type: string type: array + uniqueItems: true app: $ref: '#/components/schemas/OpenAppDTO' type: object diff --git a/typescript/src/apis/InstanceManagementApi.ts b/typescript/src/apis/InstanceManagementApi.ts index d87a8cfc..954050a1 100644 --- a/typescript/src/apis/InstanceManagementApi.ts +++ b/typescript/src/apis/InstanceManagementApi.ts @@ -25,14 +25,14 @@ import { OpenPageDTOOpenInstanceDTOToJSON, } from '../models'; -export interface GetInstanceCountByNamespaceRequest { +export interface GetByReleaseRequest { env: string; - appId: string; - clusterName: string; - namespaceName: string; + releaseId: number; + page: number; + size: number; } -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetRequest { +export interface GetByReleasesNotInRequest { env: string; appId: string; clusterName: string; @@ -40,11 +40,11 @@ export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespace excludeReleases?: string; } -export interface OpenapiV1EnvsEnvReleasesReleaseIdInstancesGetRequest { +export interface GetInstanceCountByNamespaceRequest { env: string; - releaseId: number; - page: number; - size: number; + appId: string; + clusterName: string; + namespaceName: string; } /** @@ -53,28 +53,36 @@ export interface OpenapiV1EnvsEnvReleasesReleaseIdInstancesGetRequest { export class InstanceManagementApi extends runtime.BaseAPI { /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances - * 获取命名空间下的实例数量 (original openapi) + * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances + * 根据发布版本查询实例(支持分页) (new added) */ - async getInstanceCountByNamespaceRaw(requestParameters: GetInstanceCountByNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getByReleaseRaw(requestParameters: GetByReleaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getInstanceCountByNamespace.'); + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getByRelease.'); } - if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getInstanceCountByNamespace.'); + if (requestParameters.releaseId === null || requestParameters.releaseId === undefined) { + throw new runtime.RequiredError('releaseId','Required parameter requestParameters.releaseId was null or undefined when calling getByRelease.'); } - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling getInstanceCountByNamespace.'); + if (requestParameters.page === null || requestParameters.page === undefined) { + throw new runtime.RequiredError('page','Required parameter requestParameters.page was null or undefined when calling getByRelease.'); } - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getInstanceCountByNamespace.'); + if (requestParameters.size === null || requestParameters.size === undefined) { + throw new runtime.RequiredError('size','Required parameter requestParameters.size was null or undefined when calling getByRelease.'); } const queryParameters: any = {}; + if (requestParameters.page !== undefined) { + queryParameters['page'] = requestParameters.page; + } + + if (requestParameters.size !== undefined) { + queryParameters['size'] = requestParameters.size; + } + const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { @@ -82,25 +90,21 @@ export class InstanceManagementApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), + path: `/openapi/v1/envs/{env}/releases/{releaseId}/instances`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"releaseId"}}`, encodeURIComponent(String(requestParameters.releaseId))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - if (this.isJsonMime(response.headers.get('content-type'))) { - return new runtime.JSONApiResponse(response); - } else { - return new runtime.TextApiResponse(response) as any; - } + return new runtime.JSONApiResponse(response, (jsonValue) => OpenPageDTOOpenInstanceDTOFromJSON(jsonValue)); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances - * 获取命名空间下的实例数量 (original openapi) + * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances + * 根据发布版本查询实例(支持分页) (new added) */ - async getInstanceCountByNamespace(requestParameters: GetInstanceCountByNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getInstanceCountByNamespaceRaw(requestParameters, initOverrides); + async getByRelease(requestParameters: GetByReleaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getByReleaseRaw(requestParameters, initOverrides); return await response.value(); } @@ -108,21 +112,21 @@ export class InstanceManagementApi extends runtime.BaseAPI { * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 * 查询不在指定发布版本中的实例 (new added) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + async getByReleasesNotInRaw(requestParameters: GetByReleasesNotInRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet.'); + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getByReleasesNotIn.'); } if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet.'); + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getByReleasesNotIn.'); } if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet.'); + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling getByReleasesNotIn.'); } if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet.'); + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getByReleasesNotIn.'); } const queryParameters: any = {}; @@ -138,7 +142,7 @@ export class InstanceManagementApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -151,42 +155,34 @@ export class InstanceManagementApi extends runtime.BaseAPI { * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 * 查询不在指定发布版本中的实例 (new added) */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetRaw(requestParameters, initOverrides); + async getByReleasesNotIn(requestParameters: GetByReleasesNotInRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getByReleasesNotInRaw(requestParameters, initOverrides); return await response.value(); } /** - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances - * 根据发布版本查询实例(支持分页) (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances + * 获取命名空间下的实例数量 (original openapi) */ - async openapiV1EnvsEnvReleasesReleaseIdInstancesGetRaw(requestParameters: OpenapiV1EnvsEnvReleasesReleaseIdInstancesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getInstanceCountByNamespaceRaw(requestParameters: GetInstanceCountByNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet.'); + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getInstanceCountByNamespace.'); } - if (requestParameters.releaseId === null || requestParameters.releaseId === undefined) { - throw new runtime.RequiredError('releaseId','Required parameter requestParameters.releaseId was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet.'); + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getInstanceCountByNamespace.'); } - if (requestParameters.page === null || requestParameters.page === undefined) { - throw new runtime.RequiredError('page','Required parameter requestParameters.page was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet.'); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling getInstanceCountByNamespace.'); } - if (requestParameters.size === null || requestParameters.size === undefined) { - throw new runtime.RequiredError('size','Required parameter requestParameters.size was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet.'); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getInstanceCountByNamespace.'); } const queryParameters: any = {}; - if (requestParameters.page !== undefined) { - queryParameters['page'] = requestParameters.page; - } - - if (requestParameters.size !== undefined) { - queryParameters['size'] = requestParameters.size; - } - const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { @@ -194,21 +190,25 @@ export class InstanceManagementApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/openapi/v1/envs/{env}/releases/{releaseId}/instances`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"releaseId"}}`, encodeURIComponent(String(requestParameters.releaseId))), + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OpenPageDTOOpenInstanceDTOFromJSON(jsonValue)); + if (this.isJsonMime(response.headers.get('content-type'))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; + } } /** - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances - * 根据发布版本查询实例(支持分页) (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances + * 获取命名空间下的实例数量 (original openapi) */ - async openapiV1EnvsEnvReleasesReleaseIdInstancesGet(requestParameters: OpenapiV1EnvsEnvReleasesReleaseIdInstancesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvReleasesReleaseIdInstancesGetRaw(requestParameters, initOverrides); + async getInstanceCountByNamespace(requestParameters: GetInstanceCountByNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getInstanceCountByNamespaceRaw(requestParameters, initOverrides); return await response.value(); } diff --git a/typescript/src/models/OpenCreateAppDTO.ts b/typescript/src/models/OpenCreateAppDTO.ts index dca98b1c..2d319a4c 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), }; }